From 3d0202600860e33d127ce85399f52bcb0af61aca Mon Sep 17 00:00:00 2001 From: Richard Poole Date: Thu, 19 Dec 2024 15:33:36 +0000 Subject: [PATCH 1/2] update swagger spec --- docs/APIKeysApi.md | 157 + docs/ActivateBody.md | 9 + docs/AddBillingAccountUserPermissionBody.md | 13 + docs/AddDataCenterUserPermissionBody.md | 13 + docs/AddProjectUserPermissionBody.md | 13 + docs/ApiKey.md | 12 + docs/AttachSecurityGroupResponse.md | 9 + docs/AttachStorageDiskResponse.md | 9 + docs/BillingAccount.md | 27 + docs/BillingAccountPaymentMethod.md | 14 + docs/BillingAccountPaymentMethods.md | 10 + docs/BillingAccountProject.md | 11 + docs/BillingAccountResult.md | 12 + docs/BillingAccountSetupIntent.md | 11 + docs/BillingAccountSpendRow.md | 15 + docs/BillingAccountState.md | 9 + docs/BillingAddress.md | 17 + docs/BillingApi.md | 788 +++++ docs/Charge.md | 15 + docs/Cluster.md | 35 + docs/CommitmentTerm.md | 9 + docs/ConnectVMResponse.md | 11 + docs/CountHostsResponse.md | 10 + docs/CountVMsResponse.md | 10 + docs/CpuTopology.md | 12 + ...eateBillingAccountCreditPaymentResponse.md | 10 + docs/CreateBillingAccountRequest.md | 15 + docs/CreateDiskSnapshotBody.md | 11 + docs/CreateDiskSnapshotResponse.md | 9 + docs/CreateNetworkBody.md | 13 + docs/CreateNetworkResponse.md | 9 + docs/CreateObjectStorageUserBody.md | 10 + docs/CreatePrivateVMImageResponse.md | 10 + docs/CreateSecurityGroupResponse.md | 10 + docs/CreateStorageDiskBody.md | 11 + docs/CreateStorageDiskResponse.md | 9 + docs/CreateVMBody.md | 33 + docs/CreateVMRequestNIC.md | 12 + docs/CreateVMResponse.md | 11 + docs/CreditBalanceRecharge.md | 13 + docs/CreditBalanceTransaction.md | 13 + docs/DataCenterCommitment.md | 17 + docs/DataCenterCommitmentInterval.md | 16 + docs/DataCenterMachineType.md | 14 + docs/DataCenterRevenueResource.md | 14 + docs/DataCenterTimeRevenue.md | 11 + docs/DataCentersApi.md | 561 ++++ docs/Decimal.md | 10 + docs/DefaultApi.md | 436 +++ docs/DeleteDiskSnapshotResponse.md | 9 + docs/DeleteNetworkResponse.md | 9 + docs/DeletePrivateVMImageResponse.md | 9 + docs/DeleteSecurityGroupResponse.md | 9 + docs/DeleteStorageDiskResponse.md | 9 + docs/DetachSecurityGroupResponse.md | 9 + docs/DetachStorageDiskResponse.md | 9 + docs/Disk.md | 20 + docs/DiskResult.md | 18 + docs/DiskState.md | 9 + docs/DiskStorageClass.md | 9 + docs/DiskStoragePriceHr.md | 12 + docs/DiskType.md | 9 + docs/DisksApi.md | 514 ++++ docs/GenerateApiKeyRequest.md | 10 + docs/GetBillingAccountDetailsResponse.md | 11 + docs/GetBillingAccountSpendDetailsResponse.md | 10 + ...GetDataCenterCommitmentScheduleResponse.md | 10 + ...nterCommitmentTimeSeriesRequestInterval.md | 9 + ...tDataCenterCommitmentTimeSeriesResponse.md | 10 + docs/GetDataCenterLiveUtilizationResponse.md | 30 + .../GetDataCenterRevenueByResourceResponse.md | 10 + ...aCenterRevenueTimeSeriesRequestInterval.md | 9 + .../GetDataCenterRevenueTimeSeriesResponse.md | 10 + docs/GetDiskResponse.md | 11 + docs/GetMachineTypeLiveUtilizationResponse.md | 22 + docs/GetMachineTypeResponse.md | 29 + docs/GetNetworkResponse.md | 10 + docs/GetObjectStorageSessionKeyResponse.md | 14 + docs/GetPrivateVMImageResponse.md | 10 + docs/GetResponse.md | 10 + docs/GetSecurityGroupResponse.md | 10 + docs/GetVMResponse.md | 20 + docs/GpuModel.md | 13 + docs/Host.md | 25 + docs/IdentityVerificationSession.md | 11 + docs/Image.md | 16 + docs/ImageResult.md | 14 + docs/Invoice.md | 30 + docs/LastPaymentError.md | 11 + docs/ListApiKeysResponse.md | 13 + ...ccountCreditBalanceTransactionsResponse.md | 11 + docs/ListBillingAccountInvoicesResponse.md | 11 + docs/ListBillingAccountProjectsResponse.md | 10 + .../ListBillingAccountTransactionsResponse.md | 11 + docs/ListBillingAccountsResponse.md | 12 + docs/ListClustersResponse.md | 10 + ...ListDataCenterMachineTypePricesResponse.md | 10 + ...chineTypePricesResponseMachineTypePrice.md | 15 + docs/ListDataCentersResponse.md | 12 + docs/ListDiskSnapshotsResponse.md | 10 + docs/ListDisksResponse.md | 13 + docs/ListHostsResponse.md | 10 + docs/ListMachineTypesResponse.md | 10 + docs/ListNetworksResponse.md | 13 + docs/ListObjectStorageBucketsResponse.md | 13 + docs/ListObjectStorageUsersResponse.md | 13 + docs/ListOutstandingInvoicesResponse.md | 10 + docs/ListPrivateVMImagesResponse.md | 13 + docs/ListProjectSshKeysResponse.md | 10 + docs/ListProjectsResponse.md | 12 + docs/ListPublicVMImagesResponse.md | 10 + docs/ListRegionsResponse.md | 10 + docs/ListSecurityGroupsResponse.md | 13 + docs/ListSshKeysResponse.md | 13 + docs/ListUserPermissionsResponse.md | 12 + docs/ListVMDataCentersResponse.md | 10 + docs/ListVMDisksResponse.md | 10 + docs/ListVMGpuModelsResponse.md | 10 + docs/ListVMMachineTypes2Response.md | 10 + ...istVMMachineTypes2ResponseVMMachineType.md | 34 + docs/ListVMMachineTypesResponse.md | 10 + ...ListVMMachineTypesResponseVMMachineType.md | 35 + docs/ListVMsResponse.md | 10 + docs/MachineTypesApi.md | 153 + docs/MonitorVMResponse.md | 10 + docs/Network.md | 20 + docs/NetworkPriceHr.md | 11 + docs/NetworkResult.md | 18 + docs/NetworkState.md | 9 + docs/NetworksApi.md | 555 ++++ docs/ObjectStorageApi.md | 518 ++++ docs/ObjectStorageBucket.md | 17 + docs/ObjectStorageKey.md | 11 + docs/ObjectStorageUser.md | 15 + docs/Package.md | 12 + docs/PaymentIntent.md | 10 + docs/PaymentMethodCard.md | 15 + docs/PaymentMethodPaypal.md | 11 + docs/PaymentTerms.md | 9 + docs/PermissionsApi.md | 353 +++ docs/Point.md | 11 + docs/PrivateImage.md | 14 + docs/Profile.md | 13 + docs/Project.md | 13 + docs/ProjectResult.md | 12 + docs/ProjectsApi.md | 294 ++ docs/ProtobufAny.md | 10 + docs/README.md | 131 +- docs/RebootVMResponse.md | 9 + docs/Region.md | 12 + docs/RegionDataCenter.md | 10 + ...moveBillingAccountPaymentMethodResponse.md | 11 + .../RemoveBillingAccountUserPermissionBody.md | 13 + docs/RemoveDataCenterUserPermissionBody.md | 13 + docs/RemoveProjectUserPermissionBody.md | 13 + docs/ResizeVMDiskResponse.md | 9 + docs/ResizeVMResponse.md | 10 + docs/Result.md | 18 + docs/RevertDiskResponse.md | 9 + docs/Role.md | 9 + docs/Rule.md | 15 + docs/RuleProtocol.md | 9 + docs/RuleRuleType.md | 9 + docs/SSHKeysApi.md | 198 ++ docs/SearchApi.md | 51 + docs/SearchResourcesResponse.md | 10 + docs/SecurityGroup.md | 13 + docs/SecurityGroup1.md | 12 + docs/SecurityGroupRule.md | 15 + docs/SecurityGroupRuleProtocol.md | 9 + docs/SecurityGroupRuleRuleType.md | 9 + ...lingAccountDefaultPaymentMethodResponse.md | 11 + docs/Snapshot.md | 13 + docs/SshKey.md | 15 + docs/SshKeySource.md | 9 + docs/StartNetworkResponse.md | 9 + docs/StartVMResponse.md | 9 + docs/Status.md | 12 + docs/StopNetworkResponse.md | 9 + docs/StopVMResponse.md | 9 + docs/StripeCustomer.md | 13 + docs/SyncResponse.md | 9 + docs/Task.md | 12 + docs/TaxId.md | 12 + docs/TerminateVMResponse.md | 9 + docs/TrackRequest.md | 10 + docs/Transaction.md | 17 + docs/Unit.md | 9 + docs/UpdateBillingAccountBody.md | 11 + .../UpdateBillingAccountBodyBillingAccount.md | 26 + docs/UpdateDataCenterBody.md | 11 + docs/UpdateDataCenterBodyDataCenter.md | 16 + docs/UpdateHostResponse.md | 9 + docs/UpdateImageResponse.md | 9 + docs/UpdateNetResponse.md | 9 + docs/UpdatePrivateVMImageResponse.md | 9 + docs/UpdateProjectBody.md | 11 + docs/UpdateProjectBodyProject.md | 12 + docs/UpdateSecurityGroupResponse.md | 10 + docs/UpdateVMExpireTimeBody.md | 11 + docs/UpdateVMExpireTimeResponse.md | 10 + docs/UpdateVMMetadataBody.md | 11 + docs/UpdateVMMetadataResponse.md | 10 + docs/UpdateVMPasswordBody.md | 10 + docs/UpdateVMPasswordResponse.md | 9 + docs/UpdateVMResponse.md | 9 + docs/UserApi.md | 141 + docs/UserPermission.md | 14 + docs/V1DataCenter.md | 17 + docs/V1VRouterSize.md | 9 + docs/VM.md | 44 + docs/VMDataCenter.md | 17 + docs/VMDataCenterStorageClass.md | 9 + docs/VMDataCenterVRouterSize.md | 9 + docs/VMMachineTypeMachineTypePrice.md | 13 + docs/VMMonitoringItem.md | 18 + docs/VMNIC.md | 14 + docs/VMPrice.md | 19 + docs/VirtualMachineResult.md | 21 + docs/VirtualMachinesApi.md | 1237 ++++++++ docs/VmState.md | 9 + docs/cudo_compute/__init__.py | 243 ++ docs/cudo_compute/api/__init__.py | 19 + docs/cudo_compute/api/api_keys_api.py | 331 +++ docs/cudo_compute/api/billing_api.py | 1662 +++++++++++ docs/cudo_compute/api/data_centers_api.py | 1171 ++++++++ docs/cudo_compute/api/default_api.py | 971 ++++++ docs/cudo_compute/api/disks_api.py | 1132 +++++++ docs/cudo_compute/api/machine_types_api.py | 341 +++ docs/cudo_compute/api/networks_api.py | 1201 ++++++++ docs/cudo_compute/api/object_storage_api.py | 1148 +++++++ docs/cudo_compute/api/permissions_api.py | 765 +++++ docs/cudo_compute/api/projects_api.py | 624 ++++ docs/cudo_compute/api/search_api.py | 123 + docs/cudo_compute/api/ssh_keys_api.py | 422 +++ docs/cudo_compute/api/user_api.py | 305 ++ docs/cudo_compute/api/virtual_machines_api.py | 2644 +++++++++++++++++ docs/cudo_compute/api_client.py | 639 ++++ docs/cudo_compute/configuration.py | 251 ++ docs/cudo_compute/models/__init__.py | 223 ++ docs/cudo_compute/models/activate_body.py | 95 + ...dd_billing_account_user_permission_body.py | 203 ++ .../add_data_center_user_permission_body.py | 203 ++ .../add_project_user_permission_body.py | 203 ++ docs/cudo_compute/models/api_key.py | 175 ++ .../models/attach_security_group_response.py | 95 + .../models/attach_storage_disk_response.py | 95 + docs/cudo_compute/models/billing_account.py | 565 ++++ .../models/billing_account_payment_method.py | 227 ++ .../models/billing_account_payment_methods.py | 123 + .../models/billing_account_project.py | 151 + .../models/billing_account_result.py | 175 ++ .../models/billing_account_setup_intent.py | 151 + .../models/billing_account_spend_row.py | 259 ++ .../models/billing_account_state.py | 103 + docs/cudo_compute/models/billing_address.py | 305 ++ docs/cudo_compute/models/charge.py | 258 ++ docs/cudo_compute/models/cluster.py | 799 +++++ docs/cudo_compute/models/commitment_term.py | 107 + .../models/connect_vm_response.py | 151 + .../models/count_hosts_response.py | 124 + .../cudo_compute/models/count_vms_response.py | 124 + docs/cudo_compute/models/cpu_topology.py | 175 ++ ...billing_account_credit_payment_response.py | 124 + .../models/create_billing_account_request.py | 255 ++ .../models/create_disk_snapshot_body.py | 151 + .../models/create_disk_snapshot_response.py | 95 + .../models/create_network_body.py | 204 ++ .../models/create_network_response.py | 95 + .../models/create_object_storage_user_body.py | 124 + .../create_private_vm_image_response.py | 123 + .../models/create_security_group_response.py | 124 + .../models/create_storage_disk_body.py | 149 + .../models/create_storage_disk_response.py | 95 + docs/cudo_compute/models/create_vm_body.py | 728 +++++ .../models/create_vm_request_nic.py | 175 ++ .../cudo_compute/models/create_vm_response.py | 150 + .../models/credit_balance_recharge.py | 204 ++ .../models/credit_balance_transaction.py | 205 ++ .../models/data_center_commitment.py | 305 ++ .../models/data_center_commitment_interval.py | 279 ++ .../models/data_center_machine_type.py | 232 ++ .../models/data_center_revenue_resource.py | 232 ++ .../models/data_center_time_revenue.py | 151 + docs/cudo_compute/models/decimal.py | 125 + .../models/delete_disk_snapshot_response.py | 95 + .../models/delete_network_response.py | 95 + .../delete_private_vm_image_response.py | 95 + .../models/delete_security_group_response.py | 95 + .../models/delete_storage_disk_response.py | 95 + .../models/detach_security_group_response.py | 95 + .../models/detach_storage_disk_response.py | 95 + docs/cudo_compute/models/disk.py | 384 +++ docs/cudo_compute/models/disk_result.py | 331 +++ docs/cudo_compute/models/disk_state.py | 107 + .../cudo_compute/models/disk_storage_class.py | 102 + .../models/disk_storage_price_hr.py | 175 ++ docs/cudo_compute/models/disk_type.py | 102 + .../models/generate_api_key_request.py | 126 + .../get_billing_account_details_response.py | 151 + ..._billing_account_spend_details_response.py | 124 + ...ata_center_commitment_schedule_response.py | 124 + ...commitment_time_series_request_interval.py | 103 + ..._center_commitment_time_series_response.py | 124 + ...t_data_center_live_utilization_response.py | 664 +++++ ...ata_center_revenue_by_resource_response.py | 124 + ...er_revenue_time_series_request_interval.py | 103 + ...ata_center_revenue_time_series_response.py | 124 + docs/cudo_compute/models/get_disk_response.py | 149 + ..._machine_type_live_utilization_response.py | 448 +++ .../models/get_machine_type_response.py | 637 ++++ .../models/get_network_response.py | 124 + ...get_object_storage_session_key_response.py | 227 ++ .../models/get_private_vm_image_response.py | 123 + docs/cudo_compute/models/get_response.py | 124 + .../models/get_security_group_response.py | 124 + docs/cudo_compute/models/get_vm_response.py | 394 +++ docs/cudo_compute/models/gpu_model.py | 205 ++ docs/cudo_compute/models/host.py | 529 ++++ .../models/identity_verification_session.py | 149 + docs/cudo_compute/models/image.py | 286 ++ docs/cudo_compute/models/image_result.py | 227 ++ docs/cudo_compute/models/invoice.py | 643 ++++ .../cudo_compute/models/last_payment_error.py | 151 + .../models/list_api_keys_response.py | 205 ++ ...nt_credit_balance_transactions_response.py | 151 + .../list_billing_account_invoices_response.py | 151 + .../list_billing_account_projects_response.py | 124 + ...t_billing_account_transactions_response.py | 151 + .../models/list_billing_accounts_response.py | 178 ++ .../models/list_clusters_response.py | 124 + ...ata_center_machine_type_prices_response.py | 124 + ...type_prices_response_machine_type_price.py | 259 ++ .../models/list_data_centers_response.py | 178 ++ .../models/list_disk_snapshots_response.py | 124 + .../models/list_disks_response.py | 204 ++ .../models/list_hosts_response.py | 124 + .../models/list_machine_types_response.py | 124 + .../models/list_networks_response.py | 205 ++ .../list_object_storage_buckets_response.py | 205 ++ .../list_object_storage_users_response.py | 205 ++ .../list_outstanding_invoices_response.py | 124 + .../models/list_private_vm_images_response.py | 204 ++ .../models/list_project_ssh_keys_response.py | 124 + .../models/list_projects_response.py | 178 ++ .../models/list_public_vm_images_response.py | 124 + .../models/list_regions_response.py | 124 + .../models/list_security_groups_response.py | 205 ++ .../models/list_ssh_keys_response.py | 205 ++ .../models/list_user_permissions_response.py | 178 ++ .../models/list_vm_data_centers_response.py | 124 + .../models/list_vm_disks_response.py | 123 + .../models/list_vm_gpu_models_response.py | 123 + .../models/list_vm_machine_types2_response.py | 124 + ...machine_types2_response_vm_machine_type.py | 772 +++++ .../models/list_vm_machine_types_response.py | 124 + ..._machine_types_response_vm_machine_type.py | 799 +++++ docs/cudo_compute/models/list_vms_response.py | 123 + .../models/monitor_vm_response.py | 124 + docs/cudo_compute/models/network.py | 394 +++ docs/cudo_compute/models/network_price_hr.py | 149 + docs/cudo_compute/models/network_result.py | 331 +++ docs/cudo_compute/models/network_state.py | 118 + .../models/object_storage_bucket.py | 308 ++ .../cudo_compute/models/object_storage_key.py | 149 + .../models/object_storage_user.py | 257 ++ docs/cudo_compute/models/package.py | 178 ++ docs/cudo_compute/models/payment_intent.py | 124 + .../models/payment_method_card.py | 253 ++ .../models/payment_method_paypal.py | 149 + docs/cudo_compute/models/payment_terms.py | 102 + docs/cudo_compute/models/point.py | 149 + docs/cudo_compute/models/private_image.py | 227 ++ docs/cudo_compute/models/profile.py | 201 ++ docs/cudo_compute/models/project.py | 203 ++ docs/cudo_compute/models/project_result.py | 175 ++ docs/cudo_compute/models/protobuf_any.py | 125 + .../cudo_compute/models/reboot_vm_response.py | 95 + docs/cudo_compute/models/region.py | 175 ++ .../cudo_compute/models/region_data_center.py | 123 + ...billing_account_payment_method_response.py | 151 + ...ve_billing_account_user_permission_body.py | 203 ++ ...remove_data_center_user_permission_body.py | 203 ++ .../remove_project_user_permission_body.py | 203 ++ .../models/resize_vm_disk_response.py | 95 + .../cudo_compute/models/resize_vm_response.py | 124 + docs/cudo_compute/models/result.py | 331 +++ .../models/revert_disk_response.py | 95 + docs/cudo_compute/models/role.py | 103 + docs/cudo_compute/models/rule.py | 253 ++ docs/cudo_compute/models/rule_protocol.py | 106 + docs/cudo_compute/models/rule_rule_type.py | 102 + .../models/search_resources_response.py | 123 + docs/cudo_compute/models/security_group.py | 203 ++ docs/cudo_compute/models/security_group1.py | 176 ++ .../models/security_group_rule.py | 253 ++ .../models/security_group_rule_protocol.py | 106 + .../models/security_group_rule_rule_type.py | 102 + ...account_default_payment_method_response.py | 151 + docs/cudo_compute/models/snapshot.py | 201 ++ docs/cudo_compute/models/ssh_key.py | 254 ++ docs/cudo_compute/models/ssh_key_source.py | 103 + .../models/start_network_response.py | 95 + docs/cudo_compute/models/start_vm_response.py | 95 + docs/cudo_compute/models/status.py | 175 ++ .../models/stop_network_response.py | 95 + docs/cudo_compute/models/stop_vm_response.py | 95 + docs/cudo_compute/models/stripe_customer.py | 201 ++ docs/cudo_compute/models/sync_response.py | 95 + docs/cudo_compute/models/task.py | 175 ++ docs/cudo_compute/models/tax_id.py | 175 ++ .../models/terminate_vm_response.py | 95 + docs/cudo_compute/models/track_request.py | 123 + docs/cudo_compute/models/transaction.py | 313 ++ docs/cudo_compute/models/unit.py | 102 + .../models/update_billing_account_body.py | 150 + ...te_billing_account_body_billing_account.py | 539 ++++ .../models/update_data_center_body.py | 149 + .../update_data_center_body_data_center.py | 279 ++ .../models/update_host_response.py | 95 + .../models/update_image_response.py | 95 + .../models/update_net_response.py | 95 + .../update_private_vm_image_response.py | 95 + .../models/update_project_body.py | 149 + .../models/update_project_body_project.py | 175 ++ .../models/update_security_group_response.py | 124 + .../models/update_vm_expire_time_body.py | 149 + .../models/update_vm_expire_time_response.py | 123 + .../models/update_vm_metadata_body.py | 149 + .../models/update_vm_metadata_response.py | 123 + .../models/update_vm_password_body.py | 124 + .../models/update_vm_password_response.py | 95 + .../cudo_compute/models/update_vm_response.py | 95 + docs/cudo_compute/models/user_permission.py | 232 ++ docs/cudo_compute/models/v1_data_center.py | 308 ++ docs/cudo_compute/models/v1_v_router_size.py | 103 + .../models/virtual_machine_result.py | 409 +++ docs/cudo_compute/models/vm.py | 1010 +++++++ docs/cudo_compute/models/vm_data_center.py | 310 ++ .../models/vm_data_center_storage_class.py | 102 + .../models/vm_data_center_v_router_size.py | 103 + .../vm_machine_type_machine_type_price.py | 205 ++ .../cudo_compute/models/vm_monitoring_item.py | 331 +++ docs/cudo_compute/models/vm_price.py | 367 +++ docs/cudo_compute/models/vm_state.py | 119 + docs/cudo_compute/models/vmnic.py | 227 ++ docs/cudo_compute/rest.py | 323 ++ docs/src/cudo_compute/__init__.py | 4 + docs/src/cudo_compute/cudo_api.py | 115 +- ...blic.swagger.json => compute.swagger.json} | 1093 +++++-- tools/swaggerfix.py | 2 +- 451 files changed, 64293 insertions(+), 349 deletions(-) create mode 100644 docs/APIKeysApi.md create mode 100644 docs/ActivateBody.md create mode 100644 docs/AddBillingAccountUserPermissionBody.md create mode 100644 docs/AddDataCenterUserPermissionBody.md create mode 100644 docs/AddProjectUserPermissionBody.md create mode 100644 docs/ApiKey.md create mode 100644 docs/AttachSecurityGroupResponse.md create mode 100644 docs/AttachStorageDiskResponse.md create mode 100644 docs/BillingAccount.md create mode 100644 docs/BillingAccountPaymentMethod.md create mode 100644 docs/BillingAccountPaymentMethods.md create mode 100644 docs/BillingAccountProject.md create mode 100644 docs/BillingAccountResult.md create mode 100644 docs/BillingAccountSetupIntent.md create mode 100644 docs/BillingAccountSpendRow.md create mode 100644 docs/BillingAccountState.md create mode 100644 docs/BillingAddress.md create mode 100644 docs/BillingApi.md create mode 100644 docs/Charge.md create mode 100644 docs/Cluster.md create mode 100644 docs/CommitmentTerm.md create mode 100644 docs/ConnectVMResponse.md create mode 100644 docs/CountHostsResponse.md create mode 100644 docs/CountVMsResponse.md create mode 100644 docs/CpuTopology.md create mode 100644 docs/CreateBillingAccountCreditPaymentResponse.md create mode 100644 docs/CreateBillingAccountRequest.md create mode 100644 docs/CreateDiskSnapshotBody.md create mode 100644 docs/CreateDiskSnapshotResponse.md create mode 100644 docs/CreateNetworkBody.md create mode 100644 docs/CreateNetworkResponse.md create mode 100644 docs/CreateObjectStorageUserBody.md create mode 100644 docs/CreatePrivateVMImageResponse.md create mode 100644 docs/CreateSecurityGroupResponse.md create mode 100644 docs/CreateStorageDiskBody.md create mode 100644 docs/CreateStorageDiskResponse.md create mode 100644 docs/CreateVMBody.md create mode 100644 docs/CreateVMRequestNIC.md create mode 100644 docs/CreateVMResponse.md create mode 100644 docs/CreditBalanceRecharge.md create mode 100644 docs/CreditBalanceTransaction.md create mode 100644 docs/DataCenterCommitment.md create mode 100644 docs/DataCenterCommitmentInterval.md create mode 100644 docs/DataCenterMachineType.md create mode 100644 docs/DataCenterRevenueResource.md create mode 100644 docs/DataCenterTimeRevenue.md create mode 100644 docs/DataCentersApi.md create mode 100644 docs/Decimal.md create mode 100644 docs/DefaultApi.md create mode 100644 docs/DeleteDiskSnapshotResponse.md create mode 100644 docs/DeleteNetworkResponse.md create mode 100644 docs/DeletePrivateVMImageResponse.md create mode 100644 docs/DeleteSecurityGroupResponse.md create mode 100644 docs/DeleteStorageDiskResponse.md create mode 100644 docs/DetachSecurityGroupResponse.md create mode 100644 docs/DetachStorageDiskResponse.md create mode 100644 docs/Disk.md create mode 100644 docs/DiskResult.md create mode 100644 docs/DiskState.md create mode 100644 docs/DiskStorageClass.md create mode 100644 docs/DiskStoragePriceHr.md create mode 100644 docs/DiskType.md create mode 100644 docs/DisksApi.md create mode 100644 docs/GenerateApiKeyRequest.md create mode 100644 docs/GetBillingAccountDetailsResponse.md create mode 100644 docs/GetBillingAccountSpendDetailsResponse.md create mode 100644 docs/GetDataCenterCommitmentScheduleResponse.md create mode 100644 docs/GetDataCenterCommitmentTimeSeriesRequestInterval.md create mode 100644 docs/GetDataCenterCommitmentTimeSeriesResponse.md create mode 100644 docs/GetDataCenterLiveUtilizationResponse.md create mode 100644 docs/GetDataCenterRevenueByResourceResponse.md create mode 100644 docs/GetDataCenterRevenueTimeSeriesRequestInterval.md create mode 100644 docs/GetDataCenterRevenueTimeSeriesResponse.md create mode 100644 docs/GetDiskResponse.md create mode 100644 docs/GetMachineTypeLiveUtilizationResponse.md create mode 100644 docs/GetMachineTypeResponse.md create mode 100644 docs/GetNetworkResponse.md create mode 100644 docs/GetObjectStorageSessionKeyResponse.md create mode 100644 docs/GetPrivateVMImageResponse.md create mode 100644 docs/GetResponse.md create mode 100644 docs/GetSecurityGroupResponse.md create mode 100644 docs/GetVMResponse.md create mode 100644 docs/GpuModel.md create mode 100644 docs/Host.md create mode 100644 docs/IdentityVerificationSession.md create mode 100644 docs/Image.md create mode 100644 docs/ImageResult.md create mode 100644 docs/Invoice.md create mode 100644 docs/LastPaymentError.md create mode 100644 docs/ListApiKeysResponse.md create mode 100644 docs/ListBillingAccountCreditBalanceTransactionsResponse.md create mode 100644 docs/ListBillingAccountInvoicesResponse.md create mode 100644 docs/ListBillingAccountProjectsResponse.md create mode 100644 docs/ListBillingAccountTransactionsResponse.md create mode 100644 docs/ListBillingAccountsResponse.md create mode 100644 docs/ListClustersResponse.md create mode 100644 docs/ListDataCenterMachineTypePricesResponse.md create mode 100644 docs/ListDataCenterMachineTypePricesResponseMachineTypePrice.md create mode 100644 docs/ListDataCentersResponse.md create mode 100644 docs/ListDiskSnapshotsResponse.md create mode 100644 docs/ListDisksResponse.md create mode 100644 docs/ListHostsResponse.md create mode 100644 docs/ListMachineTypesResponse.md create mode 100644 docs/ListNetworksResponse.md create mode 100644 docs/ListObjectStorageBucketsResponse.md create mode 100644 docs/ListObjectStorageUsersResponse.md create mode 100644 docs/ListOutstandingInvoicesResponse.md create mode 100644 docs/ListPrivateVMImagesResponse.md create mode 100644 docs/ListProjectSshKeysResponse.md create mode 100644 docs/ListProjectsResponse.md create mode 100644 docs/ListPublicVMImagesResponse.md create mode 100644 docs/ListRegionsResponse.md create mode 100644 docs/ListSecurityGroupsResponse.md create mode 100644 docs/ListSshKeysResponse.md create mode 100644 docs/ListUserPermissionsResponse.md create mode 100644 docs/ListVMDataCentersResponse.md create mode 100644 docs/ListVMDisksResponse.md create mode 100644 docs/ListVMGpuModelsResponse.md create mode 100644 docs/ListVMMachineTypes2Response.md create mode 100644 docs/ListVMMachineTypes2ResponseVMMachineType.md create mode 100644 docs/ListVMMachineTypesResponse.md create mode 100644 docs/ListVMMachineTypesResponseVMMachineType.md create mode 100644 docs/ListVMsResponse.md create mode 100644 docs/MachineTypesApi.md create mode 100644 docs/MonitorVMResponse.md create mode 100644 docs/Network.md create mode 100644 docs/NetworkPriceHr.md create mode 100644 docs/NetworkResult.md create mode 100644 docs/NetworkState.md create mode 100644 docs/NetworksApi.md create mode 100644 docs/ObjectStorageApi.md create mode 100644 docs/ObjectStorageBucket.md create mode 100644 docs/ObjectStorageKey.md create mode 100644 docs/ObjectStorageUser.md create mode 100644 docs/Package.md create mode 100644 docs/PaymentIntent.md create mode 100644 docs/PaymentMethodCard.md create mode 100644 docs/PaymentMethodPaypal.md create mode 100644 docs/PaymentTerms.md create mode 100644 docs/PermissionsApi.md create mode 100644 docs/Point.md create mode 100644 docs/PrivateImage.md create mode 100644 docs/Profile.md create mode 100644 docs/Project.md create mode 100644 docs/ProjectResult.md create mode 100644 docs/ProjectsApi.md create mode 100644 docs/ProtobufAny.md create mode 100644 docs/RebootVMResponse.md create mode 100644 docs/Region.md create mode 100644 docs/RegionDataCenter.md create mode 100644 docs/RemoveBillingAccountPaymentMethodResponse.md create mode 100644 docs/RemoveBillingAccountUserPermissionBody.md create mode 100644 docs/RemoveDataCenterUserPermissionBody.md create mode 100644 docs/RemoveProjectUserPermissionBody.md create mode 100644 docs/ResizeVMDiskResponse.md create mode 100644 docs/ResizeVMResponse.md create mode 100644 docs/Result.md create mode 100644 docs/RevertDiskResponse.md create mode 100644 docs/Role.md create mode 100644 docs/Rule.md create mode 100644 docs/RuleProtocol.md create mode 100644 docs/RuleRuleType.md create mode 100644 docs/SSHKeysApi.md create mode 100644 docs/SearchApi.md create mode 100644 docs/SearchResourcesResponse.md create mode 100644 docs/SecurityGroup.md create mode 100644 docs/SecurityGroup1.md create mode 100644 docs/SecurityGroupRule.md create mode 100644 docs/SecurityGroupRuleProtocol.md create mode 100644 docs/SecurityGroupRuleRuleType.md create mode 100644 docs/SetBillingAccountDefaultPaymentMethodResponse.md create mode 100644 docs/Snapshot.md create mode 100644 docs/SshKey.md create mode 100644 docs/SshKeySource.md create mode 100644 docs/StartNetworkResponse.md create mode 100644 docs/StartVMResponse.md create mode 100644 docs/Status.md create mode 100644 docs/StopNetworkResponse.md create mode 100644 docs/StopVMResponse.md create mode 100644 docs/StripeCustomer.md create mode 100644 docs/SyncResponse.md create mode 100644 docs/Task.md create mode 100644 docs/TaxId.md create mode 100644 docs/TerminateVMResponse.md create mode 100644 docs/TrackRequest.md create mode 100644 docs/Transaction.md create mode 100644 docs/Unit.md create mode 100644 docs/UpdateBillingAccountBody.md create mode 100644 docs/UpdateBillingAccountBodyBillingAccount.md create mode 100644 docs/UpdateDataCenterBody.md create mode 100644 docs/UpdateDataCenterBodyDataCenter.md create mode 100644 docs/UpdateHostResponse.md create mode 100644 docs/UpdateImageResponse.md create mode 100644 docs/UpdateNetResponse.md create mode 100644 docs/UpdatePrivateVMImageResponse.md create mode 100644 docs/UpdateProjectBody.md create mode 100644 docs/UpdateProjectBodyProject.md create mode 100644 docs/UpdateSecurityGroupResponse.md create mode 100644 docs/UpdateVMExpireTimeBody.md create mode 100644 docs/UpdateVMExpireTimeResponse.md create mode 100644 docs/UpdateVMMetadataBody.md create mode 100644 docs/UpdateVMMetadataResponse.md create mode 100644 docs/UpdateVMPasswordBody.md create mode 100644 docs/UpdateVMPasswordResponse.md create mode 100644 docs/UpdateVMResponse.md create mode 100644 docs/UserApi.md create mode 100644 docs/UserPermission.md create mode 100644 docs/V1DataCenter.md create mode 100644 docs/V1VRouterSize.md create mode 100644 docs/VM.md create mode 100644 docs/VMDataCenter.md create mode 100644 docs/VMDataCenterStorageClass.md create mode 100644 docs/VMDataCenterVRouterSize.md create mode 100644 docs/VMMachineTypeMachineTypePrice.md create mode 100644 docs/VMMonitoringItem.md create mode 100644 docs/VMNIC.md create mode 100644 docs/VMPrice.md create mode 100644 docs/VirtualMachineResult.md create mode 100644 docs/VirtualMachinesApi.md create mode 100644 docs/VmState.md create mode 100644 docs/cudo_compute/__init__.py create mode 100644 docs/cudo_compute/api/__init__.py create mode 100644 docs/cudo_compute/api/api_keys_api.py create mode 100644 docs/cudo_compute/api/billing_api.py create mode 100644 docs/cudo_compute/api/data_centers_api.py create mode 100644 docs/cudo_compute/api/default_api.py create mode 100644 docs/cudo_compute/api/disks_api.py create mode 100644 docs/cudo_compute/api/machine_types_api.py create mode 100644 docs/cudo_compute/api/networks_api.py create mode 100644 docs/cudo_compute/api/object_storage_api.py create mode 100644 docs/cudo_compute/api/permissions_api.py create mode 100644 docs/cudo_compute/api/projects_api.py create mode 100644 docs/cudo_compute/api/search_api.py create mode 100644 docs/cudo_compute/api/ssh_keys_api.py create mode 100644 docs/cudo_compute/api/user_api.py create mode 100644 docs/cudo_compute/api/virtual_machines_api.py create mode 100644 docs/cudo_compute/api_client.py create mode 100644 docs/cudo_compute/configuration.py create mode 100644 docs/cudo_compute/models/__init__.py create mode 100644 docs/cudo_compute/models/activate_body.py create mode 100644 docs/cudo_compute/models/add_billing_account_user_permission_body.py create mode 100644 docs/cudo_compute/models/add_data_center_user_permission_body.py create mode 100644 docs/cudo_compute/models/add_project_user_permission_body.py create mode 100644 docs/cudo_compute/models/api_key.py create mode 100644 docs/cudo_compute/models/attach_security_group_response.py create mode 100644 docs/cudo_compute/models/attach_storage_disk_response.py create mode 100644 docs/cudo_compute/models/billing_account.py create mode 100644 docs/cudo_compute/models/billing_account_payment_method.py create mode 100644 docs/cudo_compute/models/billing_account_payment_methods.py create mode 100644 docs/cudo_compute/models/billing_account_project.py create mode 100644 docs/cudo_compute/models/billing_account_result.py create mode 100644 docs/cudo_compute/models/billing_account_setup_intent.py create mode 100644 docs/cudo_compute/models/billing_account_spend_row.py create mode 100644 docs/cudo_compute/models/billing_account_state.py create mode 100644 docs/cudo_compute/models/billing_address.py create mode 100644 docs/cudo_compute/models/charge.py create mode 100644 docs/cudo_compute/models/cluster.py create mode 100644 docs/cudo_compute/models/commitment_term.py create mode 100644 docs/cudo_compute/models/connect_vm_response.py create mode 100644 docs/cudo_compute/models/count_hosts_response.py create mode 100644 docs/cudo_compute/models/count_vms_response.py create mode 100644 docs/cudo_compute/models/cpu_topology.py create mode 100644 docs/cudo_compute/models/create_billing_account_credit_payment_response.py create mode 100644 docs/cudo_compute/models/create_billing_account_request.py create mode 100644 docs/cudo_compute/models/create_disk_snapshot_body.py create mode 100644 docs/cudo_compute/models/create_disk_snapshot_response.py create mode 100644 docs/cudo_compute/models/create_network_body.py create mode 100644 docs/cudo_compute/models/create_network_response.py create mode 100644 docs/cudo_compute/models/create_object_storage_user_body.py create mode 100644 docs/cudo_compute/models/create_private_vm_image_response.py create mode 100644 docs/cudo_compute/models/create_security_group_response.py create mode 100644 docs/cudo_compute/models/create_storage_disk_body.py create mode 100644 docs/cudo_compute/models/create_storage_disk_response.py create mode 100644 docs/cudo_compute/models/create_vm_body.py create mode 100644 docs/cudo_compute/models/create_vm_request_nic.py create mode 100644 docs/cudo_compute/models/create_vm_response.py create mode 100644 docs/cudo_compute/models/credit_balance_recharge.py create mode 100644 docs/cudo_compute/models/credit_balance_transaction.py create mode 100644 docs/cudo_compute/models/data_center_commitment.py create mode 100644 docs/cudo_compute/models/data_center_commitment_interval.py create mode 100644 docs/cudo_compute/models/data_center_machine_type.py create mode 100644 docs/cudo_compute/models/data_center_revenue_resource.py create mode 100644 docs/cudo_compute/models/data_center_time_revenue.py create mode 100644 docs/cudo_compute/models/decimal.py create mode 100644 docs/cudo_compute/models/delete_disk_snapshot_response.py create mode 100644 docs/cudo_compute/models/delete_network_response.py create mode 100644 docs/cudo_compute/models/delete_private_vm_image_response.py create mode 100644 docs/cudo_compute/models/delete_security_group_response.py create mode 100644 docs/cudo_compute/models/delete_storage_disk_response.py create mode 100644 docs/cudo_compute/models/detach_security_group_response.py create mode 100644 docs/cudo_compute/models/detach_storage_disk_response.py create mode 100644 docs/cudo_compute/models/disk.py create mode 100644 docs/cudo_compute/models/disk_result.py create mode 100644 docs/cudo_compute/models/disk_state.py create mode 100644 docs/cudo_compute/models/disk_storage_class.py create mode 100644 docs/cudo_compute/models/disk_storage_price_hr.py create mode 100644 docs/cudo_compute/models/disk_type.py create mode 100644 docs/cudo_compute/models/generate_api_key_request.py create mode 100644 docs/cudo_compute/models/get_billing_account_details_response.py create mode 100644 docs/cudo_compute/models/get_billing_account_spend_details_response.py create mode 100644 docs/cudo_compute/models/get_data_center_commitment_schedule_response.py create mode 100644 docs/cudo_compute/models/get_data_center_commitment_time_series_request_interval.py create mode 100644 docs/cudo_compute/models/get_data_center_commitment_time_series_response.py create mode 100644 docs/cudo_compute/models/get_data_center_live_utilization_response.py create mode 100644 docs/cudo_compute/models/get_data_center_revenue_by_resource_response.py create mode 100644 docs/cudo_compute/models/get_data_center_revenue_time_series_request_interval.py create mode 100644 docs/cudo_compute/models/get_data_center_revenue_time_series_response.py create mode 100644 docs/cudo_compute/models/get_disk_response.py create mode 100644 docs/cudo_compute/models/get_machine_type_live_utilization_response.py create mode 100644 docs/cudo_compute/models/get_machine_type_response.py create mode 100644 docs/cudo_compute/models/get_network_response.py create mode 100644 docs/cudo_compute/models/get_object_storage_session_key_response.py create mode 100644 docs/cudo_compute/models/get_private_vm_image_response.py create mode 100644 docs/cudo_compute/models/get_response.py create mode 100644 docs/cudo_compute/models/get_security_group_response.py create mode 100644 docs/cudo_compute/models/get_vm_response.py create mode 100644 docs/cudo_compute/models/gpu_model.py create mode 100644 docs/cudo_compute/models/host.py create mode 100644 docs/cudo_compute/models/identity_verification_session.py create mode 100644 docs/cudo_compute/models/image.py create mode 100644 docs/cudo_compute/models/image_result.py create mode 100644 docs/cudo_compute/models/invoice.py create mode 100644 docs/cudo_compute/models/last_payment_error.py create mode 100644 docs/cudo_compute/models/list_api_keys_response.py create mode 100644 docs/cudo_compute/models/list_billing_account_credit_balance_transactions_response.py create mode 100644 docs/cudo_compute/models/list_billing_account_invoices_response.py create mode 100644 docs/cudo_compute/models/list_billing_account_projects_response.py create mode 100644 docs/cudo_compute/models/list_billing_account_transactions_response.py create mode 100644 docs/cudo_compute/models/list_billing_accounts_response.py create mode 100644 docs/cudo_compute/models/list_clusters_response.py create mode 100644 docs/cudo_compute/models/list_data_center_machine_type_prices_response.py create mode 100644 docs/cudo_compute/models/list_data_center_machine_type_prices_response_machine_type_price.py create mode 100644 docs/cudo_compute/models/list_data_centers_response.py create mode 100644 docs/cudo_compute/models/list_disk_snapshots_response.py create mode 100644 docs/cudo_compute/models/list_disks_response.py create mode 100644 docs/cudo_compute/models/list_hosts_response.py create mode 100644 docs/cudo_compute/models/list_machine_types_response.py create mode 100644 docs/cudo_compute/models/list_networks_response.py create mode 100644 docs/cudo_compute/models/list_object_storage_buckets_response.py create mode 100644 docs/cudo_compute/models/list_object_storage_users_response.py create mode 100644 docs/cudo_compute/models/list_outstanding_invoices_response.py create mode 100644 docs/cudo_compute/models/list_private_vm_images_response.py create mode 100644 docs/cudo_compute/models/list_project_ssh_keys_response.py create mode 100644 docs/cudo_compute/models/list_projects_response.py create mode 100644 docs/cudo_compute/models/list_public_vm_images_response.py create mode 100644 docs/cudo_compute/models/list_regions_response.py create mode 100644 docs/cudo_compute/models/list_security_groups_response.py create mode 100644 docs/cudo_compute/models/list_ssh_keys_response.py create mode 100644 docs/cudo_compute/models/list_user_permissions_response.py create mode 100644 docs/cudo_compute/models/list_vm_data_centers_response.py create mode 100644 docs/cudo_compute/models/list_vm_disks_response.py create mode 100644 docs/cudo_compute/models/list_vm_gpu_models_response.py create mode 100644 docs/cudo_compute/models/list_vm_machine_types2_response.py create mode 100644 docs/cudo_compute/models/list_vm_machine_types2_response_vm_machine_type.py create mode 100644 docs/cudo_compute/models/list_vm_machine_types_response.py create mode 100644 docs/cudo_compute/models/list_vm_machine_types_response_vm_machine_type.py create mode 100644 docs/cudo_compute/models/list_vms_response.py create mode 100644 docs/cudo_compute/models/monitor_vm_response.py create mode 100644 docs/cudo_compute/models/network.py create mode 100644 docs/cudo_compute/models/network_price_hr.py create mode 100644 docs/cudo_compute/models/network_result.py create mode 100644 docs/cudo_compute/models/network_state.py create mode 100644 docs/cudo_compute/models/object_storage_bucket.py create mode 100644 docs/cudo_compute/models/object_storage_key.py create mode 100644 docs/cudo_compute/models/object_storage_user.py create mode 100644 docs/cudo_compute/models/package.py create mode 100644 docs/cudo_compute/models/payment_intent.py create mode 100644 docs/cudo_compute/models/payment_method_card.py create mode 100644 docs/cudo_compute/models/payment_method_paypal.py create mode 100644 docs/cudo_compute/models/payment_terms.py create mode 100644 docs/cudo_compute/models/point.py create mode 100644 docs/cudo_compute/models/private_image.py create mode 100644 docs/cudo_compute/models/profile.py create mode 100644 docs/cudo_compute/models/project.py create mode 100644 docs/cudo_compute/models/project_result.py create mode 100644 docs/cudo_compute/models/protobuf_any.py create mode 100644 docs/cudo_compute/models/reboot_vm_response.py create mode 100644 docs/cudo_compute/models/region.py create mode 100644 docs/cudo_compute/models/region_data_center.py create mode 100644 docs/cudo_compute/models/remove_billing_account_payment_method_response.py create mode 100644 docs/cudo_compute/models/remove_billing_account_user_permission_body.py create mode 100644 docs/cudo_compute/models/remove_data_center_user_permission_body.py create mode 100644 docs/cudo_compute/models/remove_project_user_permission_body.py create mode 100644 docs/cudo_compute/models/resize_vm_disk_response.py create mode 100644 docs/cudo_compute/models/resize_vm_response.py create mode 100644 docs/cudo_compute/models/result.py create mode 100644 docs/cudo_compute/models/revert_disk_response.py create mode 100644 docs/cudo_compute/models/role.py create mode 100644 docs/cudo_compute/models/rule.py create mode 100644 docs/cudo_compute/models/rule_protocol.py create mode 100644 docs/cudo_compute/models/rule_rule_type.py create mode 100644 docs/cudo_compute/models/search_resources_response.py create mode 100644 docs/cudo_compute/models/security_group.py create mode 100644 docs/cudo_compute/models/security_group1.py create mode 100644 docs/cudo_compute/models/security_group_rule.py create mode 100644 docs/cudo_compute/models/security_group_rule_protocol.py create mode 100644 docs/cudo_compute/models/security_group_rule_rule_type.py create mode 100644 docs/cudo_compute/models/set_billing_account_default_payment_method_response.py create mode 100644 docs/cudo_compute/models/snapshot.py create mode 100644 docs/cudo_compute/models/ssh_key.py create mode 100644 docs/cudo_compute/models/ssh_key_source.py create mode 100644 docs/cudo_compute/models/start_network_response.py create mode 100644 docs/cudo_compute/models/start_vm_response.py create mode 100644 docs/cudo_compute/models/status.py create mode 100644 docs/cudo_compute/models/stop_network_response.py create mode 100644 docs/cudo_compute/models/stop_vm_response.py create mode 100644 docs/cudo_compute/models/stripe_customer.py create mode 100644 docs/cudo_compute/models/sync_response.py create mode 100644 docs/cudo_compute/models/task.py create mode 100644 docs/cudo_compute/models/tax_id.py create mode 100644 docs/cudo_compute/models/terminate_vm_response.py create mode 100644 docs/cudo_compute/models/track_request.py create mode 100644 docs/cudo_compute/models/transaction.py create mode 100644 docs/cudo_compute/models/unit.py create mode 100644 docs/cudo_compute/models/update_billing_account_body.py create mode 100644 docs/cudo_compute/models/update_billing_account_body_billing_account.py create mode 100644 docs/cudo_compute/models/update_data_center_body.py create mode 100644 docs/cudo_compute/models/update_data_center_body_data_center.py create mode 100644 docs/cudo_compute/models/update_host_response.py create mode 100644 docs/cudo_compute/models/update_image_response.py create mode 100644 docs/cudo_compute/models/update_net_response.py create mode 100644 docs/cudo_compute/models/update_private_vm_image_response.py create mode 100644 docs/cudo_compute/models/update_project_body.py create mode 100644 docs/cudo_compute/models/update_project_body_project.py create mode 100644 docs/cudo_compute/models/update_security_group_response.py create mode 100644 docs/cudo_compute/models/update_vm_expire_time_body.py create mode 100644 docs/cudo_compute/models/update_vm_expire_time_response.py create mode 100644 docs/cudo_compute/models/update_vm_metadata_body.py create mode 100644 docs/cudo_compute/models/update_vm_metadata_response.py create mode 100644 docs/cudo_compute/models/update_vm_password_body.py create mode 100644 docs/cudo_compute/models/update_vm_password_response.py create mode 100644 docs/cudo_compute/models/update_vm_response.py create mode 100644 docs/cudo_compute/models/user_permission.py create mode 100644 docs/cudo_compute/models/v1_data_center.py create mode 100644 docs/cudo_compute/models/v1_v_router_size.py create mode 100644 docs/cudo_compute/models/virtual_machine_result.py create mode 100644 docs/cudo_compute/models/vm.py create mode 100644 docs/cudo_compute/models/vm_data_center.py create mode 100644 docs/cudo_compute/models/vm_data_center_storage_class.py create mode 100644 docs/cudo_compute/models/vm_data_center_v_router_size.py create mode 100644 docs/cudo_compute/models/vm_machine_type_machine_type_price.py create mode 100644 docs/cudo_compute/models/vm_monitoring_item.py create mode 100644 docs/cudo_compute/models/vm_price.py create mode 100644 docs/cudo_compute/models/vm_state.py create mode 100644 docs/cudo_compute/models/vmnic.py create mode 100644 docs/cudo_compute/rest.py rename swagger/{public.swagger.json => compute.swagger.json} (93%) diff --git a/docs/APIKeysApi.md b/docs/APIKeysApi.md new file mode 100644 index 0000000..d449911 --- /dev/null +++ b/docs/APIKeysApi.md @@ -0,0 +1,157 @@ +# src.cudo_compute.APIKeysApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_api_key**](APIKeysApi.md#delete_api_key) | **DELETE** /v1/api-keys/{name} | Delete +[**generate_api_key**](APIKeysApi.md#generate_api_key) | **POST** /v1/api-keys | Generate +[**list_api_keys**](APIKeysApi.md#list_api_keys) | **GET** /v1/api-keys | List + + +# **delete_api_key** +> object delete_api_key(name) + +Delete + +Deletes an API key, revoking all access for requests that use the key. + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.APIKeysApi() +name = 'name_example' # str | + +try: + # Delete + api_response = api_instance.delete_api_key(name) + pprint(api_response) +except ApiException as e: + print("Exception when calling APIKeysApi->delete_api_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **generate_api_key** +> ApiKey generate_api_key(generate_api_key_body) + +Generate + +Creates a new API key for the requesting user. The API key is returned in the response, and this is the only time it can be viewed. + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.APIKeysApi() +generate_api_key_body = src.cudo_compute.GenerateApiKeyRequest() # GenerateApiKeyRequest | + +try: + # Generate + api_response = api_instance.generate_api_key(generate_api_key_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling APIKeysApi->generate_api_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **generate_api_key_body** | [**GenerateApiKeyRequest**](GenerateApiKeyRequest.md)| | + +### Return type + +[**ApiKey**](ApiKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_api_keys** +> ListApiKeysResponse list_api_keys(page_number=page_number, page_size=page_size) + +List + +List the details of all API keys created by the requesting user. This does not include the API key itself which is only visible once when the API key is created. + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.APIKeysApi() +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) + +try: + # List + api_response = api_instance.list_api_keys(page_number=page_number, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling APIKeysApi->list_api_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListApiKeysResponse**](ListApiKeysResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/ActivateBody.md b/docs/ActivateBody.md new file mode 100644 index 0000000..f1d6c75 --- /dev/null +++ b/docs/ActivateBody.md @@ -0,0 +1,9 @@ +# ActivateBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/AddBillingAccountUserPermissionBody.md b/docs/AddBillingAccountUserPermissionBody.md new file mode 100644 index 0000000..22ca6bb --- /dev/null +++ b/docs/AddBillingAccountUserPermissionBody.md @@ -0,0 +1,13 @@ +# AddBillingAccountUserPermissionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**user_email** | **str** | | +**role** | [**Role**](Role.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/docs/AddDataCenterUserPermissionBody.md b/docs/AddDataCenterUserPermissionBody.md new file mode 100644 index 0000000..54b663f --- /dev/null +++ b/docs/AddDataCenterUserPermissionBody.md @@ -0,0 +1,13 @@ +# AddDataCenterUserPermissionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**billing_account_id** | **str** | | [optional] +**user_email** | **str** | | +**role** | [**Role**](Role.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/docs/AddProjectUserPermissionBody.md b/docs/AddProjectUserPermissionBody.md new file mode 100644 index 0000000..a2c0f18 --- /dev/null +++ b/docs/AddProjectUserPermissionBody.md @@ -0,0 +1,13 @@ +# AddProjectUserPermissionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | [optional] +**billing_account_id** | **str** | | [optional] +**user_email** | **str** | | +**role** | [**Role**](Role.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/docs/ApiKey.md b/docs/ApiKey.md new file mode 100644 index 0000000..085280a --- /dev/null +++ b/docs/ApiKey.md @@ -0,0 +1,12 @@ +# ApiKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**create_time** | **datetime** | | [optional] +**key** | **str** | | [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/docs/AttachSecurityGroupResponse.md b/docs/AttachSecurityGroupResponse.md new file mode 100644 index 0000000..7341ce6 --- /dev/null +++ b/docs/AttachSecurityGroupResponse.md @@ -0,0 +1,9 @@ +# AttachSecurityGroupResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/AttachStorageDiskResponse.md b/docs/AttachStorageDiskResponse.md new file mode 100644 index 0000000..c4952a5 --- /dev/null +++ b/docs/AttachStorageDiskResponse.md @@ -0,0 +1,9 @@ +# AttachStorageDiskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/BillingAccount.md b/docs/BillingAccount.md new file mode 100644 index 0000000..f1fba5b --- /dev/null +++ b/docs/BillingAccount.md @@ -0,0 +1,27 @@ +# BillingAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**create_time** | **datetime** | | [optional] +**display_name** | **str** | | [optional] +**stripe_ref** | **str** | | [optional] +**create_by** | **str** | | [optional] +**monthly_spend** | **str** | | [optional] +**hourly_spend_rate** | [**Decimal**](Decimal.md) | | [optional] +**tax_id** | [**TaxId**](TaxId.md) | | [optional] +**invoice_time** | **datetime** | | [optional] +**billing_threshold** | [**Decimal**](Decimal.md) | | [optional] +**monthly_spend_limit** | [**Decimal**](Decimal.md) | | [optional] +**hourly_spend_limit** | [**Decimal**](Decimal.md) | | [optional] +**next_invoice_total** | [**Decimal**](Decimal.md) | | [optional] +**credit_balance** | [**Decimal**](Decimal.md) | | [optional] +**credit_balance_recharge** | [**CreditBalanceRecharge**](CreditBalanceRecharge.md) | | [optional] +**billing_address** | [**BillingAddress**](BillingAddress.md) | | [optional] +**state** | [**BillingAccountState**](BillingAccountState.md) | | [optional] +**payment_terms** | [**PaymentTerms**](PaymentTerms.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/docs/BillingAccountPaymentMethod.md b/docs/BillingAccountPaymentMethod.md new file mode 100644 index 0000000..d41351b --- /dev/null +++ b/docs/BillingAccountPaymentMethod.md @@ -0,0 +1,14 @@ +# BillingAccountPaymentMethod + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] +**card** | [**PaymentMethodCard**](PaymentMethodCard.md) | | [optional] +**paypal** | [**PaymentMethodPaypal**](PaymentMethodPaypal.md) | | [optional] +**is_default** | **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/docs/BillingAccountPaymentMethods.md b/docs/BillingAccountPaymentMethods.md new file mode 100644 index 0000000..e6b5285 --- /dev/null +++ b/docs/BillingAccountPaymentMethods.md @@ -0,0 +1,10 @@ +# BillingAccountPaymentMethods + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payment_methods** | [**list[BillingAccountPaymentMethod]**](BillingAccountPaymentMethod.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/docs/BillingAccountProject.md b/docs/BillingAccountProject.md new file mode 100644 index 0000000..d27c59c --- /dev/null +++ b/docs/BillingAccountProject.md @@ -0,0 +1,11 @@ +# BillingAccountProject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**resource_count** | **int** | | + +[[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/docs/BillingAccountResult.md b/docs/BillingAccountResult.md new file mode 100644 index 0000000..9424459 --- /dev/null +++ b/docs/BillingAccountResult.md @@ -0,0 +1,12 @@ +# BillingAccountResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**display_name** | **str** | | [optional] +**create_time** | **datetime** | | [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/docs/BillingAccountSetupIntent.md b/docs/BillingAccountSetupIntent.md new file mode 100644 index 0000000..bc72e9b --- /dev/null +++ b/docs/BillingAccountSetupIntent.md @@ -0,0 +1,11 @@ +# BillingAccountSetupIntent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**client_secret** | **str** | | + +[[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/docs/BillingAccountSpendRow.md b/docs/BillingAccountSpendRow.md new file mode 100644 index 0000000..cf62687 --- /dev/null +++ b/docs/BillingAccountSpendRow.md @@ -0,0 +1,15 @@ +# BillingAccountSpendRow + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | +**description** | **str** | | +**quantity** | **float** | | +**unit** | [**Unit**](Unit.md) | | +**unit_amount** | [**Decimal**](Decimal.md) | | +**amount** | [**Decimal**](Decimal.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/docs/BillingAccountState.md b/docs/BillingAccountState.md new file mode 100644 index 0000000..f03df85 --- /dev/null +++ b/docs/BillingAccountState.md @@ -0,0 +1,9 @@ +# BillingAccountState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/BillingAddress.md b/docs/BillingAddress.md new file mode 100644 index 0000000..e9ad7a4 --- /dev/null +++ b/docs/BillingAddress.md @@ -0,0 +1,17 @@ +# BillingAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**phone** | **str** | | [optional] +**city** | **str** | | [optional] +**line1** | **str** | | [optional] +**line2** | **str** | | [optional] +**state** | **str** | | [optional] +**postal_code** | **str** | | [optional] +**country** | **str** | | [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/docs/BillingApi.md b/docs/BillingApi.md new file mode 100644 index 0000000..a06dfd6 --- /dev/null +++ b/docs/BillingApi.md @@ -0,0 +1,788 @@ +# src.cudo_compute.BillingApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_billing_account**](BillingApi.md#create_billing_account) | **POST** /v1/billing-accounts | Create a billing account +[**create_billing_account_credit_payment**](BillingApi.md#create_billing_account_credit_payment) | **POST** /v1/billing-accounts/{id}/credit | Add credit to billing account +[**delete_billing_account**](BillingApi.md#delete_billing_account) | **DELETE** /v1/billing-accounts/{id} | Delete billing account +[**get_billing_account**](BillingApi.md#get_billing_account) | **GET** /v1/billing-accounts/{id} | Get a billing account +[**get_billing_account_details**](BillingApi.md#get_billing_account_details) | **GET** /v1/billing-accounts/{id}/details | Get billing account details +[**get_billing_account_payment_methods**](BillingApi.md#get_billing_account_payment_methods) | **GET** /v1/billing-accounts/{id}/payment-methods | Get payment methods +[**get_billing_account_setup_intent**](BillingApi.md#get_billing_account_setup_intent) | **GET** /v1/billing-accounts/{id}/setup-intent | Get setup intent +[**get_billing_account_spend_details**](BillingApi.md#get_billing_account_spend_details) | **GET** /v1/billing-accounts/{billingAccountId}/spend/details | Get spend details +[**list_billing_account_credit_balance_transactions**](BillingApi.md#list_billing_account_credit_balance_transactions) | **GET** /v1/billing-accounts/{id}/credit-balance-transactions | List credit balance transactions on a billing account +[**list_billing_account_invoices**](BillingApi.md#list_billing_account_invoices) | **GET** /v1/billing-accounts/invoices | List invoices +[**list_billing_account_transactions**](BillingApi.md#list_billing_account_transactions) | **GET** /v1/billing-accounts/{id}/transactions | List transactions on a billing account +[**list_billing_accounts**](BillingApi.md#list_billing_accounts) | **GET** /v1/billing-accounts | List billing accounts +[**list_outstanding_invoices**](BillingApi.md#list_outstanding_invoices) | **GET** /v1/billing-accounts/invoices/outstanding | Get outstanding invoices +[**remove_billing_account_payment_method**](BillingApi.md#remove_billing_account_payment_method) | **DELETE** /v1/billing-accounts/{id}/payment-methods/{paymentMethodId} | Remove payment method +[**set_billing_account_default_payment_method**](BillingApi.md#set_billing_account_default_payment_method) | **POST** /v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default | Set default payment method +[**update_billing_account**](BillingApi.md#update_billing_account) | **PATCH** /v1/billing-accounts/{billingAccount.id} | Update billing account + + +# **create_billing_account** +> BillingAccount create_billing_account(create_billing_account_body) + +Create a billing account + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +create_billing_account_body = src.cudo_compute.CreateBillingAccountRequest() # CreateBillingAccountRequest | + +try: + # Create a billing account + api_response = api_instance.create_billing_account(create_billing_account_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->create_billing_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_billing_account_body** | [**CreateBillingAccountRequest**](CreateBillingAccountRequest.md)| | + +### Return type + +[**BillingAccount**](BillingAccount.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_billing_account_credit_payment** +> CreateBillingAccountCreditPaymentResponse create_billing_account_credit_payment(id, payment_method, amount_value=amount_value, radar_session_id=radar_session_id) + +Add credit to billing account + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | +payment_method = 'payment_method_example' # str | +amount_value = 'amount_value_example' # str | The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. (optional) +radar_session_id = 'radar_session_id_example' # str | (optional) + +try: + # Add credit to billing account + api_response = api_instance.create_billing_account_credit_payment(id, payment_method, amount_value=amount_value, radar_session_id=radar_session_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->create_billing_account_credit_payment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **payment_method** | **str**| | + **amount_value** | **str**| The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. | [optional] + **radar_session_id** | **str**| | [optional] + +### Return type + +[**CreateBillingAccountCreditPaymentResponse**](CreateBillingAccountCreditPaymentResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_billing_account** +> object delete_billing_account(id) + +Delete billing account + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | + +try: + # Delete billing account + api_response = api_instance.delete_billing_account(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->delete_billing_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_billing_account** +> BillingAccount get_billing_account(id) + +Get a billing account + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | + +try: + # Get a billing account + api_response = api_instance.get_billing_account(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->get_billing_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**BillingAccount**](BillingAccount.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_billing_account_details** +> GetBillingAccountDetailsResponse get_billing_account_details(id) + +Get billing account details + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | + +try: + # Get billing account details + api_response = api_instance.get_billing_account_details(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->get_billing_account_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**GetBillingAccountDetailsResponse**](GetBillingAccountDetailsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_billing_account_payment_methods** +> BillingAccountPaymentMethods get_billing_account_payment_methods(id) + +Get payment methods + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | + +try: + # Get payment methods + api_response = api_instance.get_billing_account_payment_methods(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->get_billing_account_payment_methods: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**BillingAccountPaymentMethods**](BillingAccountPaymentMethods.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_billing_account_setup_intent** +> BillingAccountSetupIntent get_billing_account_setup_intent(id) + +Get setup intent + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | + +try: + # Get setup intent + api_response = api_instance.get_billing_account_setup_intent(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->get_billing_account_setup_intent: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**BillingAccountSetupIntent**](BillingAccountSetupIntent.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_billing_account_spend_details** +> GetBillingAccountSpendDetailsResponse get_billing_account_spend_details(billing_account_id, start_time, end_time) + +Get spend details + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +billing_account_id = 'billing_account_id_example' # str | +start_time = '2013-10-20T19:20:30+01:00' # datetime | +end_time = '2013-10-20T19:20:30+01:00' # datetime | + +try: + # Get spend details + api_response = api_instance.get_billing_account_spend_details(billing_account_id, start_time, end_time) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->get_billing_account_spend_details: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **billing_account_id** | **str**| | + **start_time** | **datetime**| | + **end_time** | **datetime**| | + +### Return type + +[**GetBillingAccountSpendDetailsResponse**](GetBillingAccountSpendDetailsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_billing_account_credit_balance_transactions** +> ListBillingAccountCreditBalanceTransactionsResponse list_billing_account_credit_balance_transactions(id, page_size=page_size, starting_after=starting_after) + +List credit balance transactions on a billing account + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | +page_size = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) + +try: + # List credit balance transactions on a billing account + api_response = api_instance.list_billing_account_credit_balance_transactions(id, page_size=page_size, starting_after=starting_after) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->list_billing_account_credit_balance_transactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **page_size** | **int**| | [optional] + **starting_after** | **str**| | [optional] + +### Return type + +[**ListBillingAccountCreditBalanceTransactionsResponse**](ListBillingAccountCreditBalanceTransactionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_billing_account_invoices** +> ListBillingAccountInvoicesResponse list_billing_account_invoices(id, page_size=page_size, starting_after=starting_after, status=status) + +List invoices + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | +page_size = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) +status = 'status_example' # str | (optional) + +try: + # List invoices + api_response = api_instance.list_billing_account_invoices(id, page_size=page_size, starting_after=starting_after, status=status) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->list_billing_account_invoices: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **page_size** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **status** | **str**| | [optional] + +### Return type + +[**ListBillingAccountInvoicesResponse**](ListBillingAccountInvoicesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_billing_account_transactions** +> ListBillingAccountTransactionsResponse list_billing_account_transactions(id, page_size=page_size, starting_after=starting_after) + +List transactions on a billing account + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | +page_size = 56 # int | (optional) +starting_after = 'starting_after_example' # str | (optional) + +try: + # List transactions on a billing account + api_response = api_instance.list_billing_account_transactions(id, page_size=page_size, starting_after=starting_after) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->list_billing_account_transactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **page_size** | **int**| | [optional] + **starting_after** | **str**| | [optional] + +### Return type + +[**ListBillingAccountTransactionsResponse**](ListBillingAccountTransactionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_billing_accounts** +> ListBillingAccountsResponse list_billing_accounts(page_token=page_token, page_size=page_size) + +List billing accounts + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +page_token = 'page_token_example' # str | (optional) +page_size = 56 # int | (optional) + +try: + # List billing accounts + api_response = api_instance.list_billing_accounts(page_token=page_token, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->list_billing_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_token** | **str**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListBillingAccountsResponse**](ListBillingAccountsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_outstanding_invoices** +> ListOutstandingInvoicesResponse list_outstanding_invoices() + +Get outstanding invoices + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() + +try: + # Get outstanding invoices + api_response = api_instance.list_outstanding_invoices() + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->list_outstanding_invoices: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListOutstandingInvoicesResponse**](ListOutstandingInvoicesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **remove_billing_account_payment_method** +> RemoveBillingAccountPaymentMethodResponse remove_billing_account_payment_method(id, payment_method_id) + +Remove payment method + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | +payment_method_id = 'payment_method_id_example' # str | + +try: + # Remove payment method + api_response = api_instance.remove_billing_account_payment_method(id, payment_method_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->remove_billing_account_payment_method: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **payment_method_id** | **str**| | + +### Return type + +[**RemoveBillingAccountPaymentMethodResponse**](RemoveBillingAccountPaymentMethodResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **set_billing_account_default_payment_method** +> SetBillingAccountDefaultPaymentMethodResponse set_billing_account_default_payment_method(id, payment_method_id) + +Set default payment method + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +id = 'id_example' # str | +payment_method_id = 'payment_method_id_example' # str | + +try: + # Set default payment method + api_response = api_instance.set_billing_account_default_payment_method(id, payment_method_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->set_billing_account_default_payment_method: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **payment_method_id** | **str**| | + +### Return type + +[**SetBillingAccountDefaultPaymentMethodResponse**](SetBillingAccountDefaultPaymentMethodResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_billing_account** +> BillingAccount update_billing_account(billing_account_id, update_billing_account_body) + +Update billing account + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.BillingApi() +billing_account_id = 'billing_account_id_example' # str | +update_billing_account_body = src.cudo_compute.UpdateBillingAccountBody() # UpdateBillingAccountBody | + +try: + # Update billing account + api_response = api_instance.update_billing_account(billing_account_id, update_billing_account_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->update_billing_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **billing_account_id** | **str**| | + **update_billing_account_body** | [**UpdateBillingAccountBody**](UpdateBillingAccountBody.md)| | + +### Return type + +[**BillingAccount**](BillingAccount.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/Charge.md b/docs/Charge.md new file mode 100644 index 0000000..86fe8c5 --- /dev/null +++ b/docs/Charge.md @@ -0,0 +1,15 @@ +# Charge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | [**Decimal**](Decimal.md) | | +**create_time** | **datetime** | | +**paid** | **bool** | | +**refunded** | **bool** | | +**status** | **str** | | +**failure_code** | **str** | | [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/docs/Cluster.md b/docs/Cluster.md new file mode 100644 index 0000000..f8edd54 --- /dev/null +++ b/docs/Cluster.md @@ -0,0 +1,35 @@ +# Cluster + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**machine_type** | **str** | | +**cpu_model** | **str** | | +**vcpu_per_cpu_thread** | **int** | | +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**gpu_model** | **str** | | +**gpu_model_id** | **str** | | +**gpu_model_pci_types** | **list[str]** | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**min_vcpu_per_memory_gib** | **float** | | +**max_vcpu_per_memory_gib** | **float** | | +**min_vcpu_per_gpu** | **float** | | +**max_vcpu_per_gpu** | **float** | | +**create_time** | **datetime** | | +**update_time** | **datetime** | | +**host_count** | **int** | | +**host_problem_count** | **int** | | +**vm_count** | **int** | | +**vcpu_free** | **int** | | +**vcpu_used** | **int** | | +**memory_gib_free** | **int** | | +**memory_gib_used** | **int** | | +**gpu_free** | **int** | | +**gpu_used** | **int** | | +**min_vcpu** | **float** | | +**min_memory_gib** | **float** | | + +[[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/docs/CommitmentTerm.md b/docs/CommitmentTerm.md new file mode 100644 index 0000000..78f5435 --- /dev/null +++ b/docs/CommitmentTerm.md @@ -0,0 +1,9 @@ +# CommitmentTerm + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/ConnectVMResponse.md b/docs/ConnectVMResponse.md new file mode 100644 index 0000000..84981b5 --- /dev/null +++ b/docs/ConnectVMResponse.md @@ -0,0 +1,11 @@ +# ConnectVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connect_url** | **str** | | +**token** | **str** | | + +[[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/docs/CountHostsResponse.md b/docs/CountHostsResponse.md new file mode 100644 index 0000000..87f9b72 --- /dev/null +++ b/docs/CountHostsResponse.md @@ -0,0 +1,10 @@ +# CountHostsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | + +[[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/docs/CountVMsResponse.md b/docs/CountVMsResponse.md new file mode 100644 index 0000000..7031332 --- /dev/null +++ b/docs/CountVMsResponse.md @@ -0,0 +1,10 @@ +# CountVMsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | + +[[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/docs/CpuTopology.md b/docs/CpuTopology.md new file mode 100644 index 0000000..c9483f9 --- /dev/null +++ b/docs/CpuTopology.md @@ -0,0 +1,12 @@ +# CpuTopology + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sockets** | **int** | | [optional] +**cores** | **int** | | [optional] +**threads** | **int** | | [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/docs/CreateBillingAccountCreditPaymentResponse.md b/docs/CreateBillingAccountCreditPaymentResponse.md new file mode 100644 index 0000000..4790b1b --- /dev/null +++ b/docs/CreateBillingAccountCreditPaymentResponse.md @@ -0,0 +1,10 @@ +# CreateBillingAccountCreditPaymentResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payment_intent** | [**PaymentIntent**](PaymentIntent.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/docs/CreateBillingAccountRequest.md b/docs/CreateBillingAccountRequest.md new file mode 100644 index 0000000..bdebd3f --- /dev/null +++ b/docs/CreateBillingAccountRequest.md @@ -0,0 +1,15 @@ +# CreateBillingAccountRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | | +**invoice_name** | **str** | | [optional] +**email** | **str** | | +**tax_id** | [**TaxId**](TaxId.md) | | [optional] +**referral** | **str** | | [optional] +**billing_address** | [**BillingAddress**](BillingAddress.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/docs/CreateDiskSnapshotBody.md b/docs/CreateDiskSnapshotBody.md new file mode 100644 index 0000000..2dc139e --- /dev/null +++ b/docs/CreateDiskSnapshotBody.md @@ -0,0 +1,11 @@ +# CreateDiskSnapshotBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot_id** | **str** | | +**vm_id** | **str** | | + +[[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/docs/CreateDiskSnapshotResponse.md b/docs/CreateDiskSnapshotResponse.md new file mode 100644 index 0000000..16a8eec --- /dev/null +++ b/docs/CreateDiskSnapshotResponse.md @@ -0,0 +1,9 @@ +# CreateDiskSnapshotResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/CreateNetworkBody.md b/docs/CreateNetworkBody.md new file mode 100644 index 0000000..c6c3ddd --- /dev/null +++ b/docs/CreateNetworkBody.md @@ -0,0 +1,13 @@ +# CreateNetworkBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | +**id** | **str** | | +**cidr_prefix** | **str** | | +**vrouter_size** | [**V1VRouterSize**](V1VRouterSize.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/docs/CreateNetworkResponse.md b/docs/CreateNetworkResponse.md new file mode 100644 index 0000000..56e49cb --- /dev/null +++ b/docs/CreateNetworkResponse.md @@ -0,0 +1,9 @@ +# CreateNetworkResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/CreateObjectStorageUserBody.md b/docs/CreateObjectStorageUserBody.md new file mode 100644 index 0000000..8b83438 --- /dev/null +++ b/docs/CreateObjectStorageUserBody.md @@ -0,0 +1,10 @@ +# CreateObjectStorageUserBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | + +[[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/docs/CreatePrivateVMImageResponse.md b/docs/CreatePrivateVMImageResponse.md new file mode 100644 index 0000000..4c939e4 --- /dev/null +++ b/docs/CreatePrivateVMImageResponse.md @@ -0,0 +1,10 @@ +# CreatePrivateVMImageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | [**PrivateImage**](PrivateImage.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/docs/CreateSecurityGroupResponse.md b/docs/CreateSecurityGroupResponse.md new file mode 100644 index 0000000..e6ce328 --- /dev/null +++ b/docs/CreateSecurityGroupResponse.md @@ -0,0 +1,10 @@ +# CreateSecurityGroupResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**security_group** | [**SecurityGroup**](SecurityGroup.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/docs/CreateStorageDiskBody.md b/docs/CreateStorageDiskBody.md new file mode 100644 index 0000000..c39f085 --- /dev/null +++ b/docs/CreateStorageDiskBody.md @@ -0,0 +1,11 @@ +# CreateStorageDiskBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | [optional] +**disk** | [**Disk**](Disk.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/docs/CreateStorageDiskResponse.md b/docs/CreateStorageDiskResponse.md new file mode 100644 index 0000000..0d22a3c --- /dev/null +++ b/docs/CreateStorageDiskResponse.md @@ -0,0 +1,9 @@ +# CreateStorageDiskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/CreateVMBody.md b/docs/CreateVMBody.md new file mode 100644 index 0000000..ddc98e6 --- /dev/null +++ b/docs/CreateVMBody.md @@ -0,0 +1,33 @@ +# CreateVMBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | +**machine_type** | **str** | | +**vm_id** | **str** | | +**start_script** | **str** | | [optional] +**ssh_key_source** | [**SshKeySource**](SshKeySource.md) | | [optional] +**custom_ssh_keys** | **list[str]** | | [optional] +**password** | **str** | | [optional] +**boot_disk** | [**Disk**](Disk.md) | | [optional] +**boot_disk_image_id** | **str** | | +**vcpus** | **int** | | +**memory_gib** | **int** | | +**gpus** | **int** | | +**cpu_model** | **str** | | [optional] +**gpu_model** | **str** | | [optional] +**gpu_model_id** | **str** | | [optional] +**nics** | [**list[CreateVMRequestNIC]**](CreateVMRequestNIC.md) | | [optional] +**security_group_ids** | **list[str]** | | [optional] +**storage_disk_ids** | **list[str]** | | [optional] +**metadata** | **dict(str, str)** | | [optional] +**topology** | [**CpuTopology**](CpuTopology.md) | | [optional] +**validate_only** | **bool** | | [optional] +**expire_time** | **datetime** | | [optional] +**ttl** | **str** | | [optional] +**commitment_term** | [**CommitmentTerm**](CommitmentTerm.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/docs/CreateVMRequestNIC.md b/docs/CreateVMRequestNIC.md new file mode 100644 index 0000000..45803b4 --- /dev/null +++ b/docs/CreateVMRequestNIC.md @@ -0,0 +1,12 @@ +# CreateVMRequestNIC + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**network_id** | **str** | | [optional] +**assign_public_ip** | **bool** | | [optional] +**security_group_ids** | **list[str]** | | [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/docs/CreateVMResponse.md b/docs/CreateVMResponse.md new file mode 100644 index 0000000..281327d --- /dev/null +++ b/docs/CreateVMResponse.md @@ -0,0 +1,11 @@ +# CreateVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**vm** | [**VM**](VM.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/docs/CreditBalanceRecharge.md b/docs/CreditBalanceRecharge.md new file mode 100644 index 0000000..6345c40 --- /dev/null +++ b/docs/CreditBalanceRecharge.md @@ -0,0 +1,13 @@ +# CreditBalanceRecharge + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**low** | [**Decimal**](Decimal.md) | | +**high** | [**Decimal**](Decimal.md) | | +**auto_recharge** | **bool** | | +**transaction** | [**Transaction**](Transaction.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/docs/CreditBalanceTransaction.md b/docs/CreditBalanceTransaction.md new file mode 100644 index 0000000..e129852 --- /dev/null +++ b/docs/CreditBalanceTransaction.md @@ -0,0 +1,13 @@ +# CreditBalanceTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**amount** | [**Decimal**](Decimal.md) | | +**description** | **str** | | +**create_time** | **datetime** | | + +[[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/docs/DataCenterCommitment.md b/docs/DataCenterCommitment.md new file mode 100644 index 0000000..ca745ad --- /dev/null +++ b/docs/DataCenterCommitment.md @@ -0,0 +1,17 @@ +# DataCenterCommitment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**create_time** | **datetime** | | [optional] +**commitment_end_time** | **datetime** | | [optional] +**vcpus** | **int** | | [optional] +**gpus** | **int** | | [optional] +**memory_gib** | **int** | | [optional] +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | [optional] +**gpu_price_hr** | [**Decimal**](Decimal.md) | | [optional] +**memory_gib_price_hr** | [**Decimal**](Decimal.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/docs/DataCenterCommitmentInterval.md b/docs/DataCenterCommitmentInterval.md new file mode 100644 index 0000000..c787b90 --- /dev/null +++ b/docs/DataCenterCommitmentInterval.md @@ -0,0 +1,16 @@ +# DataCenterCommitmentInterval + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **datetime** | | [optional] +**vcpus** | **float** | | [optional] +**vcpu_revenue_usd** | [**Decimal**](Decimal.md) | | [optional] +**gpus** | **float** | | [optional] +**gpu_revenue_usd** | [**Decimal**](Decimal.md) | | [optional] +**memory_gib** | **float** | | [optional] +**memory_revenue_usd** | [**Decimal**](Decimal.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/docs/DataCenterMachineType.md b/docs/DataCenterMachineType.md new file mode 100644 index 0000000..cc611e0 --- /dev/null +++ b/docs/DataCenterMachineType.md @@ -0,0 +1,14 @@ +# DataCenterMachineType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**machine_type** | **str** | | +**count_clusters** | **int** | | +**count_hosts** | **int** | | +**count_hosts_active** | **int** | | +**count_hosts_inactive** | **int** | | + +[[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/docs/DataCenterRevenueResource.md b/docs/DataCenterRevenueResource.md new file mode 100644 index 0000000..de3e548 --- /dev/null +++ b/docs/DataCenterRevenueResource.md @@ -0,0 +1,14 @@ +# DataCenterRevenueResource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_type** | **str** | | +**resource_id** | **str** | | +**quantity** | [**Decimal**](Decimal.md) | | +**unit** | **str** | | +**revenue_usd** | [**Decimal**](Decimal.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/docs/DataCenterTimeRevenue.md b/docs/DataCenterTimeRevenue.md new file mode 100644 index 0000000..e4ca8a5 --- /dev/null +++ b/docs/DataCenterTimeRevenue.md @@ -0,0 +1,11 @@ +# DataCenterTimeRevenue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **datetime** | | +**revenue_usd** | [**Decimal**](Decimal.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/docs/DataCentersApi.md b/docs/DataCentersApi.md new file mode 100644 index 0000000..e9cb20a --- /dev/null +++ b/docs/DataCentersApi.md @@ -0,0 +1,561 @@ +# src.cudo_compute.DataCentersApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**count_hosts**](DataCentersApi.md#count_hosts) | **GET** /v1/data-centers/{dataCenterId}/host-count | Get host count +[**create_data_center**](DataCentersApi.md#create_data_center) | **POST** /v1/data-centers | Create data center +[**delete_data_center**](DataCentersApi.md#delete_data_center) | **DELETE** /v1/data-centers/{id} | Delete data center +[**get_data_center**](DataCentersApi.md#get_data_center) | **GET** /v1/data-centers/{id} | Get data center +[**get_data_center_live_utilization**](DataCentersApi.md#get_data_center_live_utilization) | **GET** /v1/data-centers/{id}/live-utilization | Get live utilization +[**get_data_center_revenue_by_resource**](DataCentersApi.md#get_data_center_revenue_by_resource) | **GET** /v1/data-centers/{id}/revenue-by-resource | Get revenue by resource +[**get_data_center_revenue_time_series**](DataCentersApi.md#get_data_center_revenue_time_series) | **GET** /v1/data-centers/{id}/revenue | Get revenue time series +[**list_clusters**](DataCentersApi.md#list_clusters) | **GET** /v1/data-centers/{dataCenterId}/clusters | List clusters +[**list_data_centers**](DataCentersApi.md#list_data_centers) | **GET** /v1/data-centers | List data centers +[**list_hosts**](DataCentersApi.md#list_hosts) | **GET** /v1/data-centers/{dataCenterId}/hosts | List hosts +[**update_data_center**](DataCentersApi.md#update_data_center) | **PATCH** /v1/data-centers/{dataCenter.id} | Update data center + + +# **count_hosts** +> CountHostsResponse count_hosts(data_center_id) + +Get host count + +Returns the number of hosts in a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +data_center_id = 'data_center_id_example' # str | + +try: + # Get host count + api_response = api_instance.count_hosts(data_center_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->count_hosts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + +### Return type + +[**CountHostsResponse**](CountHostsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_data_center** +> V1DataCenter create_data_center(data_center) + +Create data center + +Creates a new data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +data_center = src.cudo_compute.V1DataCenter() # V1DataCenter | + +try: + # Create data center + api_response = api_instance.create_data_center(data_center) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->create_data_center: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center** | [**V1DataCenter**](V1DataCenter.md)| | + +### Return type + +[**V1DataCenter**](V1DataCenter.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_data_center** +> object delete_data_center(id) + +Delete data center + +Deletes a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +id = 'id_example' # str | + +try: + # Delete data center + api_response = api_instance.delete_data_center(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->delete_data_center: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_data_center** +> V1DataCenter get_data_center(id) + +Get data center + +Returns a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +id = 'id_example' # str | + +try: + # Get data center + api_response = api_instance.get_data_center(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->get_data_center: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**V1DataCenter**](V1DataCenter.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_data_center_live_utilization** +> GetDataCenterLiveUtilizationResponse get_data_center_live_utilization(id) + +Get live utilization + +Returns the live utilization of a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +id = 'id_example' # str | + +try: + # Get live utilization + api_response = api_instance.get_data_center_live_utilization(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->get_data_center_live_utilization: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**GetDataCenterLiveUtilizationResponse**](GetDataCenterLiveUtilizationResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_data_center_revenue_by_resource** +> GetDataCenterRevenueByResourceResponse get_data_center_revenue_by_resource(id, start_time, end_time) + +Get revenue by resource + +Returns the revenue of a data center by resource (CPU, Memory, Storage, etc.) + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +id = 'id_example' # str | +start_time = '2013-10-20T19:20:30+01:00' # datetime | +end_time = '2013-10-20T19:20:30+01:00' # datetime | + +try: + # Get revenue by resource + api_response = api_instance.get_data_center_revenue_by_resource(id, start_time, end_time) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->get_data_center_revenue_by_resource: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **start_time** | **datetime**| | + **end_time** | **datetime**| | + +### Return type + +[**GetDataCenterRevenueByResourceResponse**](GetDataCenterRevenueByResourceResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_data_center_revenue_time_series** +> GetDataCenterRevenueTimeSeriesResponse get_data_center_revenue_time_series(id, start_time, end_time, interval) + +Get revenue time series + +Returns the revenue of a data center over time + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +id = 'id_example' # str | +start_time = '2013-10-20T19:20:30+01:00' # datetime | +end_time = '2013-10-20T19:20:30+01:00' # datetime | +interval = 'INTERVAL_UNKNOWN' # str | (default to INTERVAL_UNKNOWN) + +try: + # Get revenue time series + api_response = api_instance.get_data_center_revenue_time_series(id, start_time, end_time, interval) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->get_data_center_revenue_time_series: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **start_time** | **datetime**| | + **end_time** | **datetime**| | + **interval** | **str**| | [default to INTERVAL_UNKNOWN] + +### Return type + +[**GetDataCenterRevenueTimeSeriesResponse**](GetDataCenterRevenueTimeSeriesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_clusters** +> ListClustersResponse list_clusters(data_center_id) + +List clusters + +Returns the clusters in a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +data_center_id = 'data_center_id_example' # str | + +try: + # List clusters + api_response = api_instance.list_clusters(data_center_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->list_clusters: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + +### Return type + +[**ListClustersResponse**](ListClustersResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_data_centers** +> ListDataCentersResponse list_data_centers(page_token=page_token, page_size=page_size) + +List data centers + +Returns the data centers in an organization + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +page_token = 'page_token_example' # str | (optional) +page_size = 56 # int | (optional) + +try: + # List data centers + api_response = api_instance.list_data_centers(page_token=page_token, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->list_data_centers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_token** | **str**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListDataCentersResponse**](ListDataCentersResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_hosts** +> ListHostsResponse list_hosts(data_center_id) + +List hosts + +Returns the hosts in a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +data_center_id = 'data_center_id_example' # str | + +try: + # List hosts + api_response = api_instance.list_hosts(data_center_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->list_hosts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + +### Return type + +[**ListHostsResponse**](ListHostsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_data_center** +> V1DataCenter update_data_center(data_center_id, update_data_center_body) + +Update data center + +Updates a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DataCentersApi() +data_center_id = 'data_center_id_example' # str | +update_data_center_body = src.cudo_compute.UpdateDataCenterBody() # UpdateDataCenterBody | + +try: + # Update data center + api_response = api_instance.update_data_center(data_center_id, update_data_center_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling DataCentersApi->update_data_center: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + **update_data_center_body** | [**UpdateDataCenterBody**](UpdateDataCenterBody.md)| | + +### Return type + +[**V1DataCenter**](V1DataCenter.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/Decimal.md b/docs/Decimal.md new file mode 100644 index 0000000..8eecdf0 --- /dev/null +++ b/docs/Decimal.md @@ -0,0 +1,10 @@ +# Decimal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. | [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/docs/DefaultApi.md b/docs/DefaultApi.md new file mode 100644 index 0000000..4c49600 --- /dev/null +++ b/docs/DefaultApi.md @@ -0,0 +1,436 @@ +# src.cudo_compute.DefaultApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_data_center_commitment_schedule**](DefaultApi.md#get_data_center_commitment_schedule) | **GET** /v1/data-centers/{dataCenterId}/commitment-schedule | +[**get_data_center_commitment_time_series**](DefaultApi.md#get_data_center_commitment_time_series) | **GET** /v1/data-centers/{dataCenterId}/commitment-time-series | +[**list_billing_account_projects**](DefaultApi.md#list_billing_account_projects) | **GET** /v1/billing-accounts/{id}/projects | +[**list_data_center_machine_type_prices**](DefaultApi.md#list_data_center_machine_type_prices) | **GET** /v1/data-centers/{dataCenterId}/machine-type-prices | +[**list_vm_machine_types**](DefaultApi.md#list_vm_machine_types) | **GET** /v1/vms/machine-types | +[**search_resources**](DefaultApi.md#search_resources) | **GET** /v1/resources/search | +[**track**](DefaultApi.md#track) | **POST** /v1/auth/track | +[**update_vm_expire_time**](DefaultApi.md#update_vm_expire_time) | **POST** /v1/projects/{projectId}/vm/{id}/expire-time | +[**update_vm_password**](DefaultApi.md#update_vm_password) | **POST** /v1/projects/{projectId}/vm/{id}/password | + + +# **get_data_center_commitment_schedule** +> GetDataCenterCommitmentScheduleResponse get_data_center_commitment_schedule(data_center_id, start_time, end_time) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +data_center_id = 'data_center_id_example' # str | +start_time = '2013-10-20T19:20:30+01:00' # datetime | +end_time = '2013-10-20T19:20:30+01:00' # datetime | + +try: + api_response = api_instance.get_data_center_commitment_schedule(data_center_id, start_time, end_time) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->get_data_center_commitment_schedule: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + **start_time** | **datetime**| | + **end_time** | **datetime**| | + +### Return type + +[**GetDataCenterCommitmentScheduleResponse**](GetDataCenterCommitmentScheduleResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_data_center_commitment_time_series** +> GetDataCenterCommitmentTimeSeriesResponse get_data_center_commitment_time_series(data_center_id, start_time, end_time, interval) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +data_center_id = 'data_center_id_example' # str | +start_time = '2013-10-20T19:20:30+01:00' # datetime | +end_time = '2013-10-20T19:20:30+01:00' # datetime | +interval = 'INTERVAL_UNKNOWN' # str | (default to INTERVAL_UNKNOWN) + +try: + api_response = api_instance.get_data_center_commitment_time_series(data_center_id, start_time, end_time, interval) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->get_data_center_commitment_time_series: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + **start_time** | **datetime**| | + **end_time** | **datetime**| | + **interval** | **str**| | [default to INTERVAL_UNKNOWN] + +### Return type + +[**GetDataCenterCommitmentTimeSeriesResponse**](GetDataCenterCommitmentTimeSeriesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_billing_account_projects** +> ListBillingAccountProjectsResponse list_billing_account_projects(id) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +id = 'id_example' # str | string page_token = 2; int32 page_size = 3; + +try: + api_response = api_instance.list_billing_account_projects(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->list_billing_account_projects: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| string page_token = 2; int32 page_size = 3; | + +### Return type + +[**ListBillingAccountProjectsResponse**](ListBillingAccountProjectsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_data_center_machine_type_prices** +> ListDataCenterMachineTypePricesResponse list_data_center_machine_type_prices(data_center_id) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +data_center_id = 'data_center_id_example' # str | + +try: + api_response = api_instance.list_data_center_machine_type_prices(data_center_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->list_data_center_machine_type_prices: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + +### Return type + +[**ListDataCenterMachineTypePricesResponse**](ListDataCenterMachineTypePricesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_vm_machine_types** +> ListVMMachineTypesResponse list_vm_machine_types() + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() + +try: + api_response = api_instance.list_vm_machine_types() + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->list_vm_machine_types: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListVMMachineTypesResponse**](ListVMMachineTypesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **search_resources** +> SearchResourcesResponse search_resources(query) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +query = 'query_example' # str | + +try: + api_response = api_instance.search_resources(query) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->search_resources: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **str**| | + +### Return type + +[**SearchResourcesResponse**](SearchResourcesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **track** +> object track(track_body) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +track_body = src.cudo_compute.TrackRequest() # TrackRequest | + +try: + api_response = api_instance.track(track_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->track: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **track_body** | [**TrackRequest**](TrackRequest.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_vm_expire_time** +> UpdateVMExpireTimeResponse update_vm_expire_time(project_id, id, update_vm_expire_time_body) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +update_vm_expire_time_body = src.cudo_compute.UpdateVMExpireTimeBody() # UpdateVMExpireTimeBody | + +try: + api_response = api_instance.update_vm_expire_time(project_id, id, update_vm_expire_time_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->update_vm_expire_time: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **update_vm_expire_time_body** | [**UpdateVMExpireTimeBody**](UpdateVMExpireTimeBody.md)| | + +### Return type + +[**UpdateVMExpireTimeResponse**](UpdateVMExpireTimeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_vm_password** +> UpdateVMPasswordResponse update_vm_password(project_id, id, update_vm_password_body) + + + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DefaultApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +update_vm_password_body = src.cudo_compute.UpdateVMPasswordBody() # UpdateVMPasswordBody | + +try: + api_response = api_instance.update_vm_password(project_id, id, update_vm_password_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling DefaultApi->update_vm_password: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **update_vm_password_body** | [**UpdateVMPasswordBody**](UpdateVMPasswordBody.md)| | + +### Return type + +[**UpdateVMPasswordResponse**](UpdateVMPasswordResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/DeleteDiskSnapshotResponse.md b/docs/DeleteDiskSnapshotResponse.md new file mode 100644 index 0000000..cc874ab --- /dev/null +++ b/docs/DeleteDiskSnapshotResponse.md @@ -0,0 +1,9 @@ +# DeleteDiskSnapshotResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DeleteNetworkResponse.md b/docs/DeleteNetworkResponse.md new file mode 100644 index 0000000..48888ac --- /dev/null +++ b/docs/DeleteNetworkResponse.md @@ -0,0 +1,9 @@ +# DeleteNetworkResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DeletePrivateVMImageResponse.md b/docs/DeletePrivateVMImageResponse.md new file mode 100644 index 0000000..cd7afa3 --- /dev/null +++ b/docs/DeletePrivateVMImageResponse.md @@ -0,0 +1,9 @@ +# DeletePrivateVMImageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DeleteSecurityGroupResponse.md b/docs/DeleteSecurityGroupResponse.md new file mode 100644 index 0000000..829a9ad --- /dev/null +++ b/docs/DeleteSecurityGroupResponse.md @@ -0,0 +1,9 @@ +# DeleteSecurityGroupResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DeleteStorageDiskResponse.md b/docs/DeleteStorageDiskResponse.md new file mode 100644 index 0000000..54d9f95 --- /dev/null +++ b/docs/DeleteStorageDiskResponse.md @@ -0,0 +1,9 @@ +# DeleteStorageDiskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DetachSecurityGroupResponse.md b/docs/DetachSecurityGroupResponse.md new file mode 100644 index 0000000..b0805db --- /dev/null +++ b/docs/DetachSecurityGroupResponse.md @@ -0,0 +1,9 @@ +# DetachSecurityGroupResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DetachStorageDiskResponse.md b/docs/DetachStorageDiskResponse.md new file mode 100644 index 0000000..69e492f --- /dev/null +++ b/docs/DetachStorageDiskResponse.md @@ -0,0 +1,9 @@ +# DetachStorageDiskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Disk.md b/docs/Disk.md new file mode 100644 index 0000000..0860f61 --- /dev/null +++ b/docs/Disk.md @@ -0,0 +1,20 @@ +# Disk + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**project_id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**vm_id** | **str** | | [optional] +**size_gib** | **int** | | +**storage_class** | [**DiskStorageClass**](DiskStorageClass.md) | | [optional] +**disk_type** | [**DiskType**](DiskType.md) | | [optional] +**public_image_id** | **str** | | [optional] +**private_image_id** | **str** | | [optional] +**create_time** | **datetime** | | [optional] +**disk_state** | [**DiskState**](DiskState.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/docs/DiskResult.md b/docs/DiskResult.md new file mode 100644 index 0000000..2d2f6d1 --- /dev/null +++ b/docs/DiskResult.md @@ -0,0 +1,18 @@ +# DiskResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**size_gib** | **int** | | [optional] +**public_image_id** | **str** | | [optional] +**private_image_id** | **str** | | [optional] +**type** | [**DiskType**](DiskType.md) | | [optional] +**state** | [**DiskState**](DiskState.md) | | [optional] +**create_time** | **datetime** | | [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/docs/DiskState.md b/docs/DiskState.md new file mode 100644 index 0000000..bf7d1a9 --- /dev/null +++ b/docs/DiskState.md @@ -0,0 +1,9 @@ +# DiskState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DiskStorageClass.md b/docs/DiskStorageClass.md new file mode 100644 index 0000000..1538761 --- /dev/null +++ b/docs/DiskStorageClass.md @@ -0,0 +1,9 @@ +# DiskStorageClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DiskStoragePriceHr.md b/docs/DiskStoragePriceHr.md new file mode 100644 index 0000000..e5bb74a --- /dev/null +++ b/docs/DiskStoragePriceHr.md @@ -0,0 +1,12 @@ +# DiskStoragePriceHr + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**storage_class** | [**VMDataCenterStorageClass**](VMDataCenterStorageClass.md) | | [optional] +**disk_gib_price_hr** | [**Decimal**](Decimal.md) | | [optional] +**snapshot_gib_price_hr** | [**Decimal**](Decimal.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/docs/DiskType.md b/docs/DiskType.md new file mode 100644 index 0000000..87888f9 --- /dev/null +++ b/docs/DiskType.md @@ -0,0 +1,9 @@ +# DiskType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/DisksApi.md b/docs/DisksApi.md new file mode 100644 index 0000000..a42eb5f --- /dev/null +++ b/docs/DisksApi.md @@ -0,0 +1,514 @@ +# src.cudo_compute.DisksApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**attach_storage_disk**](DisksApi.md#attach_storage_disk) | **PATCH** /v1/projects/{projectId}/disk/{id}/attach | Attach storage disk to VM +[**create_disk_snapshot**](DisksApi.md#create_disk_snapshot) | **POST** /v1/projects/{projectId}/disks/{id}/snapshots | Create Disk Snapshot +[**create_storage_disk**](DisksApi.md#create_storage_disk) | **POST** /v1/projects/{projectId}/disks | Create storage disk +[**delete_disk_snapshot**](DisksApi.md#delete_disk_snapshot) | **DELETE** /v1/projects/{projectId}/disks/{id}/snapshots | Delete Disk Snapshots +[**delete_storage_disk**](DisksApi.md#delete_storage_disk) | **DELETE** /v1/projects/{projectId}/disks/{id} | Delete storage disk +[**detach_storage_disk**](DisksApi.md#detach_storage_disk) | **PUT** /v1/projects/{projectId}/disk/{id}/detach | Detach storage disk from VM +[**get_disk**](DisksApi.md#get_disk) | **GET** /v1/projects/{projectId}/disks/{id} | List disks +[**list_disk_snapshots**](DisksApi.md#list_disk_snapshots) | **GET** /v1/projects/{projectId}/disks/{id}/snapshots | List Disk Snapshots +[**list_disks**](DisksApi.md#list_disks) | **GET** /v1/projects/{projectId}/disks | List disks +[**revert_disk**](DisksApi.md#revert_disk) | **POST** /v1/projects/{projectId}/disks/{id}/revert | Revert Disk to Snapshot + + +# **attach_storage_disk** +> AttachStorageDiskResponse attach_storage_disk(project_id, id, vm_id=vm_id) + +Attach storage disk to VM + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +vm_id = 'vm_id_example' # str | (optional) + +try: + # Attach storage disk to VM + api_response = api_instance.attach_storage_disk(project_id, id, vm_id=vm_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->attach_storage_disk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **vm_id** | **str**| | [optional] + +### Return type + +[**AttachStorageDiskResponse**](AttachStorageDiskResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_disk_snapshot** +> CreateDiskSnapshotResponse create_disk_snapshot(project_id, id, create_disk_snapshot_body) + +Create Disk Snapshot + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +create_disk_snapshot_body = src.cudo_compute.CreateDiskSnapshotBody() # CreateDiskSnapshotBody | + +try: + # Create Disk Snapshot + api_response = api_instance.create_disk_snapshot(project_id, id, create_disk_snapshot_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->create_disk_snapshot: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **create_disk_snapshot_body** | [**CreateDiskSnapshotBody**](CreateDiskSnapshotBody.md)| | + +### Return type + +[**CreateDiskSnapshotResponse**](CreateDiskSnapshotResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_storage_disk** +> CreateStorageDiskResponse create_storage_disk(project_id, create_storage_disk_body) + +Create storage disk + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +create_storage_disk_body = src.cudo_compute.CreateStorageDiskBody() # CreateStorageDiskBody | + +try: + # Create storage disk + api_response = api_instance.create_storage_disk(project_id, create_storage_disk_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->create_storage_disk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **create_storage_disk_body** | [**CreateStorageDiskBody**](CreateStorageDiskBody.md)| | + +### Return type + +[**CreateStorageDiskResponse**](CreateStorageDiskResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_disk_snapshot** +> DeleteDiskSnapshotResponse delete_disk_snapshot(project_id, id, snapshot_id, vm_id) + +Delete Disk Snapshots + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +snapshot_id = 'snapshot_id_example' # str | +vm_id = 'vm_id_example' # str | + +try: + # Delete Disk Snapshots + api_response = api_instance.delete_disk_snapshot(project_id, id, snapshot_id, vm_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->delete_disk_snapshot: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **snapshot_id** | **str**| | + **vm_id** | **str**| | + +### Return type + +[**DeleteDiskSnapshotResponse**](DeleteDiskSnapshotResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_storage_disk** +> DeleteStorageDiskResponse delete_storage_disk(project_id, id) + +Delete storage disk + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Delete storage disk + api_response = api_instance.delete_storage_disk(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->delete_storage_disk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**DeleteStorageDiskResponse**](DeleteStorageDiskResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **detach_storage_disk** +> DetachStorageDiskResponse detach_storage_disk(project_id, id) + +Detach storage disk from VM + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Detach storage disk from VM + api_response = api_instance.detach_storage_disk(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->detach_storage_disk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**DetachStorageDiskResponse**](DetachStorageDiskResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_disk** +> GetDiskResponse get_disk(project_id, id) + +List disks + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # List disks + api_response = api_instance.get_disk(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->get_disk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**GetDiskResponse**](GetDiskResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_disk_snapshots** +> ListDiskSnapshotsResponse list_disk_snapshots(project_id, id) + +List Disk Snapshots + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # List Disk Snapshots + api_response = api_instance.list_disk_snapshots(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->list_disk_snapshots: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**ListDiskSnapshotsResponse**](ListDiskSnapshotsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_disks** +> ListDisksResponse list_disks(project_id, page_number=page_number, page_size=page_size, data_center_id=data_center_id) + +List disks + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) +data_center_id = 'data_center_id_example' # str | (optional) + +try: + # List disks + api_response = api_instance.list_disks(project_id, page_number=page_number, page_size=page_size, data_center_id=data_center_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->list_disks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + **data_center_id** | **str**| | [optional] + +### Return type + +[**ListDisksResponse**](ListDisksResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **revert_disk** +> RevertDiskResponse revert_disk(project_id, id, snapshot_id, vm_id) + +Revert Disk to Snapshot + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.DisksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +snapshot_id = 'snapshot_id_example' # str | +vm_id = 'vm_id_example' # str | + +try: + # Revert Disk to Snapshot + api_response = api_instance.revert_disk(project_id, id, snapshot_id, vm_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling DisksApi->revert_disk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **snapshot_id** | **str**| | + **vm_id** | **str**| | + +### Return type + +[**RevertDiskResponse**](RevertDiskResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/GenerateApiKeyRequest.md b/docs/GenerateApiKeyRequest.md new file mode 100644 index 0000000..07a17b1 --- /dev/null +++ b/docs/GenerateApiKeyRequest.md @@ -0,0 +1,10 @@ +# GenerateApiKeyRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**apikey_id** | **str** | The identifier to use for the api key, which will become the final component of the api key's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. | + +[[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/docs/GetBillingAccountDetailsResponse.md b/docs/GetBillingAccountDetailsResponse.md new file mode 100644 index 0000000..8b111f2 --- /dev/null +++ b/docs/GetBillingAccountDetailsResponse.md @@ -0,0 +1,11 @@ +# GetBillingAccountDetailsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_account** | [**BillingAccount**](BillingAccount.md) | | +**stripe_customer** | [**StripeCustomer**](StripeCustomer.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/docs/GetBillingAccountSpendDetailsResponse.md b/docs/GetBillingAccountSpendDetailsResponse.md new file mode 100644 index 0000000..afaee11 --- /dev/null +++ b/docs/GetBillingAccountSpendDetailsResponse.md @@ -0,0 +1,10 @@ +# GetBillingAccountSpendDetailsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spend** | [**list[BillingAccountSpendRow]**](BillingAccountSpendRow.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/docs/GetDataCenterCommitmentScheduleResponse.md b/docs/GetDataCenterCommitmentScheduleResponse.md new file mode 100644 index 0000000..70241d8 --- /dev/null +++ b/docs/GetDataCenterCommitmentScheduleResponse.md @@ -0,0 +1,10 @@ +# GetDataCenterCommitmentScheduleResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commitments** | [**list[DataCenterCommitment]**](DataCenterCommitment.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/docs/GetDataCenterCommitmentTimeSeriesRequestInterval.md b/docs/GetDataCenterCommitmentTimeSeriesRequestInterval.md new file mode 100644 index 0000000..a05bb47 --- /dev/null +++ b/docs/GetDataCenterCommitmentTimeSeriesRequestInterval.md @@ -0,0 +1,9 @@ +# GetDataCenterCommitmentTimeSeriesRequestInterval + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/GetDataCenterCommitmentTimeSeriesResponse.md b/docs/GetDataCenterCommitmentTimeSeriesResponse.md new file mode 100644 index 0000000..bc0f4cb --- /dev/null +++ b/docs/GetDataCenterCommitmentTimeSeriesResponse.md @@ -0,0 +1,10 @@ +# GetDataCenterCommitmentTimeSeriesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**list[DataCenterCommitmentInterval]**](DataCenterCommitmentInterval.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/docs/GetDataCenterLiveUtilizationResponse.md b/docs/GetDataCenterLiveUtilizationResponse.md new file mode 100644 index 0000000..642395e --- /dev/null +++ b/docs/GetDataCenterLiveUtilizationResponse.md @@ -0,0 +1,30 @@ +# GetDataCenterLiveUtilizationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**utilization** | **float** | | +**vcpu_used** | **int** | | +**vcpu_free** | **int** | | +**vcpu_total** | **int** | | +**cpu_utilization** | **float** | | +**memory_gib_used** | **int** | | +**memory_gib_free** | **int** | | +**memory_gib_total** | **int** | | +**memory_utilization** | **float** | | +**gpu_used** | **int** | | +**gpu_free** | **int** | | +**gpu_total** | **int** | | +**gpu_utilization** | **float** | | +**ipv4_used** | **int** | | +**ipv4_free** | **int** | | +**ipv4_total** | **int** | | +**ipv4_utilization** | **float** | | +**storage_gib_used** | **int** | | +**storage_gib_free** | **int** | | +**storage_gib_total** | **int** | | +**storage_utilization** | **float** | | + +[[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/docs/GetDataCenterRevenueByResourceResponse.md b/docs/GetDataCenterRevenueByResourceResponse.md new file mode 100644 index 0000000..4f49050 --- /dev/null +++ b/docs/GetDataCenterRevenueByResourceResponse.md @@ -0,0 +1,10 @@ +# GetDataCenterRevenueByResourceResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**list[DataCenterRevenueResource]**](DataCenterRevenueResource.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/docs/GetDataCenterRevenueTimeSeriesRequestInterval.md b/docs/GetDataCenterRevenueTimeSeriesRequestInterval.md new file mode 100644 index 0000000..af97884 --- /dev/null +++ b/docs/GetDataCenterRevenueTimeSeriesRequestInterval.md @@ -0,0 +1,9 @@ +# GetDataCenterRevenueTimeSeriesRequestInterval + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/GetDataCenterRevenueTimeSeriesResponse.md b/docs/GetDataCenterRevenueTimeSeriesResponse.md new file mode 100644 index 0000000..4c8d7d0 --- /dev/null +++ b/docs/GetDataCenterRevenueTimeSeriesResponse.md @@ -0,0 +1,10 @@ +# GetDataCenterRevenueTimeSeriesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_revenue** | [**list[DataCenterTimeRevenue]**](DataCenterTimeRevenue.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/docs/GetDiskResponse.md b/docs/GetDiskResponse.md new file mode 100644 index 0000000..0560b4f --- /dev/null +++ b/docs/GetDiskResponse.md @@ -0,0 +1,11 @@ +# GetDiskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**disk** | [**Disk**](Disk.md) | | [optional] +**snapshots** | [**list[Snapshot]**](Snapshot.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/docs/GetMachineTypeLiveUtilizationResponse.md b/docs/GetMachineTypeLiveUtilizationResponse.md new file mode 100644 index 0000000..f808007 --- /dev/null +++ b/docs/GetMachineTypeLiveUtilizationResponse.md @@ -0,0 +1,22 @@ +# GetMachineTypeLiveUtilizationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**utilization** | **float** | | +**vcpu_used** | **int** | | +**vcpu_free** | **int** | | +**vcpu_total** | **int** | | +**cpu_utilization** | **float** | | +**memory_gib_used** | **int** | | +**memory_gib_free** | **int** | | +**memory_gib_total** | **int** | | +**memory_utilization** | **float** | | +**gpu_used** | **int** | | +**gpu_free** | **int** | | +**gpu_total** | **int** | | +**gpu_utilization** | **float** | | + +[[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/docs/GetMachineTypeResponse.md b/docs/GetMachineTypeResponse.md new file mode 100644 index 0000000..82b5030 --- /dev/null +++ b/docs/GetMachineTypeResponse.md @@ -0,0 +1,29 @@ +# GetMachineTypeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | +**machine_type** | **str** | | +**cpu_models** | **list[str]** | | +**gpu_models** | **list[str]** | | +**min_vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**max_vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**min_memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**max_memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**min_gpu_price_hr** | [**Decimal**](Decimal.md) | | +**max_gpu_price_hr** | [**Decimal**](Decimal.md) | | +**min_vcpu_per_memory_gib** | **float** | | +**max_vcpu_per_memory_gib** | **float** | | +**min_vcpu_per_gpu** | **float** | | +**max_vcpu_per_gpu** | **float** | | +**count_clusters** | **int** | | +**count_hosts** | **int** | | +**count_hosts_active** | **int** | | +**count_hosts_inactive** | **int** | | +**min_vcpu** | **float** | | +**min_memory_gib** | **float** | | + +[[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/docs/GetNetworkResponse.md b/docs/GetNetworkResponse.md new file mode 100644 index 0000000..195adf7 --- /dev/null +++ b/docs/GetNetworkResponse.md @@ -0,0 +1,10 @@ +# GetNetworkResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**network** | [**Network**](Network.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/docs/GetObjectStorageSessionKeyResponse.md b/docs/GetObjectStorageSessionKeyResponse.md new file mode 100644 index 0000000..65436dc --- /dev/null +++ b/docs/GetObjectStorageSessionKeyResponse.md @@ -0,0 +1,14 @@ +# GetObjectStorageSessionKeyResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**session_name** | **str** | | [optional] +**access_key** | **str** | | [optional] +**secret_key** | **str** | | [optional] +**session_token** | **str** | | [optional] +**endpoint** | **str** | | [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/docs/GetPrivateVMImageResponse.md b/docs/GetPrivateVMImageResponse.md new file mode 100644 index 0000000..1309c6d --- /dev/null +++ b/docs/GetPrivateVMImageResponse.md @@ -0,0 +1,10 @@ +# GetPrivateVMImageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | [**PrivateImage**](PrivateImage.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/docs/GetResponse.md b/docs/GetResponse.md new file mode 100644 index 0000000..03320a6 --- /dev/null +++ b/docs/GetResponse.md @@ -0,0 +1,10 @@ +# GetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task** | [**list[Task]**](Task.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/docs/GetSecurityGroupResponse.md b/docs/GetSecurityGroupResponse.md new file mode 100644 index 0000000..dbe6348 --- /dev/null +++ b/docs/GetSecurityGroupResponse.md @@ -0,0 +1,10 @@ +# GetSecurityGroupResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**security_group** | [**SecurityGroup**](SecurityGroup.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/docs/GetVMResponse.md b/docs/GetVMResponse.md new file mode 100644 index 0000000..e25e9ac --- /dev/null +++ b/docs/GetVMResponse.md @@ -0,0 +1,20 @@ +# GetVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vm** | [**VM**](VM.md) | | +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**total_vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**total_memory_price_hr** | [**Decimal**](Decimal.md) | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**total_gpu_price_hr** | [**Decimal**](Decimal.md) | | +**storage_gib_price_hr** | [**Decimal**](Decimal.md) | | +**total_storage_price_hr** | [**Decimal**](Decimal.md) | | +**ipv4_price_hr** | [**Decimal**](Decimal.md) | | +**total_price_hr** | [**Decimal**](Decimal.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/docs/GpuModel.md b/docs/GpuModel.md new file mode 100644 index 0000000..ea9dda5 --- /dev/null +++ b/docs/GpuModel.md @@ -0,0 +1,13 @@ +# GpuModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**vendor_name** | **str** | | +**model_name** | **str** | | +**memory_gib** | **int** | | + +[[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/docs/Host.md b/docs/Host.md new file mode 100644 index 0000000..6b4c2b0 --- /dev/null +++ b/docs/Host.md @@ -0,0 +1,25 @@ +# Host + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**machine_type** | **str** | | +**cpu_model** | **str** | | +**vcpu_per_cpu_thread** | **int** | | +**gpu_model** | **str** | | +**gpu_model_id** | **str** | | +**create_time** | **datetime** | | +**update_time** | **datetime** | | +**vm_count** | **int** | | +**vcpu_free** | **int** | | +**vcpu_used** | **int** | | +**memory_gib_free** | **int** | | +**memory_gib_used** | **int** | | +**gpu_free** | **int** | | +**gpu_used** | **int** | | +**online** | **bool** | | +**name** | **str** | | + +[[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/docs/IdentityVerificationSession.md b/docs/IdentityVerificationSession.md new file mode 100644 index 0000000..0a0f7e8 --- /dev/null +++ b/docs/IdentityVerificationSession.md @@ -0,0 +1,11 @@ +# IdentityVerificationSession + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**client_secret** | **str** | | [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/docs/Image.md b/docs/Image.md new file mode 100644 index 0000000..2bbe436 --- /dev/null +++ b/docs/Image.md @@ -0,0 +1,16 @@ +# Image + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**description** | **str** | | +**display_name** | **str** | | +**platform** | **str** | | +**size_gib** | **int** | | +**installed_packages** | [**list[Package]**](Package.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/docs/ImageResult.md b/docs/ImageResult.md new file mode 100644 index 0000000..b6ebe9f --- /dev/null +++ b/docs/ImageResult.md @@ -0,0 +1,14 @@ +# ImageResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**size_gib** | **int** | | [optional] +**create_time** | **datetime** | | [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/docs/Invoice.md b/docs/Invoice.md new file mode 100644 index 0000000..1ab295c --- /dev/null +++ b/docs/Invoice.md @@ -0,0 +1,30 @@ +# Invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**amount_due** | **str** | | [optional] +**amount_paid** | **str** | | [optional] +**amount_remaining** | **str** | | [optional] +**created** | **str** | | [optional] +**description** | **str** | | [optional] +**currency** | **str** | | [optional] +**hosted_invoice_url** | **str** | | [optional] +**status** | **str** | | [optional] +**due_date** | **str** | | [optional] +**paid_date** | **str** | | [optional] +**billing_reason** | **str** | | [optional] +**auto_advance** | **bool** | | [optional] +**period_start** | **str** | | [optional] +**period_end** | **str** | | [optional] +**number** | **str** | | [optional] +**subtotal_excluding_tax** | **str** | | [optional] +**subtotal** | **str** | | [optional] +**total_excluding_tax** | **str** | | [optional] +**tax** | **str** | | [optional] +**total** | **str** | | [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/docs/LastPaymentError.md b/docs/LastPaymentError.md new file mode 100644 index 0000000..81f7c31 --- /dev/null +++ b/docs/LastPaymentError.md @@ -0,0 +1,11 @@ +# LastPaymentError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **str** | | +**decline_code** | **str** | | + +[[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/docs/ListApiKeysResponse.md b/docs/ListApiKeysResponse.md new file mode 100644 index 0000000..ae94161 --- /dev/null +++ b/docs/ListApiKeysResponse.md @@ -0,0 +1,13 @@ +# ListApiKeysResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_keys** | [**list[ApiKey]**](ApiKey.md) | | +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListBillingAccountCreditBalanceTransactionsResponse.md b/docs/ListBillingAccountCreditBalanceTransactionsResponse.md new file mode 100644 index 0000000..1e846f8 --- /dev/null +++ b/docs/ListBillingAccountCreditBalanceTransactionsResponse.md @@ -0,0 +1,11 @@ +# ListBillingAccountCreditBalanceTransactionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**credit_balance_transactions** | [**list[CreditBalanceTransaction]**](CreditBalanceTransaction.md) | | +**has_more** | **bool** | | + +[[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/docs/ListBillingAccountInvoicesResponse.md b/docs/ListBillingAccountInvoicesResponse.md new file mode 100644 index 0000000..9cc136a --- /dev/null +++ b/docs/ListBillingAccountInvoicesResponse.md @@ -0,0 +1,11 @@ +# ListBillingAccountInvoicesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoices** | [**list[Invoice]**](Invoice.md) | | +**has_more** | **bool** | | + +[[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/docs/ListBillingAccountProjectsResponse.md b/docs/ListBillingAccountProjectsResponse.md new file mode 100644 index 0000000..b4148b7 --- /dev/null +++ b/docs/ListBillingAccountProjectsResponse.md @@ -0,0 +1,10 @@ +# ListBillingAccountProjectsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projects** | [**list[BillingAccountProject]**](BillingAccountProject.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/docs/ListBillingAccountTransactionsResponse.md b/docs/ListBillingAccountTransactionsResponse.md new file mode 100644 index 0000000..71173d1 --- /dev/null +++ b/docs/ListBillingAccountTransactionsResponse.md @@ -0,0 +1,11 @@ +# ListBillingAccountTransactionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transactions** | [**list[Transaction]**](Transaction.md) | | +**has_more** | **bool** | | + +[[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/docs/ListBillingAccountsResponse.md b/docs/ListBillingAccountsResponse.md new file mode 100644 index 0000000..5f3a59f --- /dev/null +++ b/docs/ListBillingAccountsResponse.md @@ -0,0 +1,12 @@ +# ListBillingAccountsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_accounts** | [**list[BillingAccount]**](BillingAccount.md) | | +**page_token** | **str** | | +**page_size** | **int** | | + +[[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/docs/ListClustersResponse.md b/docs/ListClustersResponse.md new file mode 100644 index 0000000..c03b5ff --- /dev/null +++ b/docs/ListClustersResponse.md @@ -0,0 +1,10 @@ +# ListClustersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**clusters** | [**list[Cluster]**](Cluster.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/docs/ListDataCenterMachineTypePricesResponse.md b/docs/ListDataCenterMachineTypePricesResponse.md new file mode 100644 index 0000000..d13a2bf --- /dev/null +++ b/docs/ListDataCenterMachineTypePricesResponse.md @@ -0,0 +1,10 @@ +# ListDataCenterMachineTypePricesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prices** | [**list[ListDataCenterMachineTypePricesResponseMachineTypePrice]**](ListDataCenterMachineTypePricesResponseMachineTypePrice.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/docs/ListDataCenterMachineTypePricesResponseMachineTypePrice.md b/docs/ListDataCenterMachineTypePricesResponseMachineTypePrice.md new file mode 100644 index 0000000..69eb0da --- /dev/null +++ b/docs/ListDataCenterMachineTypePricesResponseMachineTypePrice.md @@ -0,0 +1,15 @@ +# ListDataCenterMachineTypePricesResponseMachineTypePrice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uid** | **str** | | +**machine_type** | **str** | | +**commitment_term** | **str** | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_price_hr** | [**Decimal**](Decimal.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/docs/ListDataCentersResponse.md b/docs/ListDataCentersResponse.md new file mode 100644 index 0000000..212a2c6 --- /dev/null +++ b/docs/ListDataCentersResponse.md @@ -0,0 +1,12 @@ +# ListDataCentersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_centers** | [**list[V1DataCenter]**](V1DataCenter.md) | | +**page_token** | **str** | | +**page_size** | **int** | | + +[[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/docs/ListDiskSnapshotsResponse.md b/docs/ListDiskSnapshotsResponse.md new file mode 100644 index 0000000..8310898 --- /dev/null +++ b/docs/ListDiskSnapshotsResponse.md @@ -0,0 +1,10 @@ +# ListDiskSnapshotsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshots** | [**list[Snapshot]**](Snapshot.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/docs/ListDisksResponse.md b/docs/ListDisksResponse.md new file mode 100644 index 0000000..c113ce9 --- /dev/null +++ b/docs/ListDisksResponse.md @@ -0,0 +1,13 @@ +# ListDisksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**disks** | [**list[Disk]**](Disk.md) | | [optional] +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListHostsResponse.md b/docs/ListHostsResponse.md new file mode 100644 index 0000000..a932f62 --- /dev/null +++ b/docs/ListHostsResponse.md @@ -0,0 +1,10 @@ +# ListHostsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hosts** | [**list[Host]**](Host.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/docs/ListMachineTypesResponse.md b/docs/ListMachineTypesResponse.md new file mode 100644 index 0000000..86b3bdf --- /dev/null +++ b/docs/ListMachineTypesResponse.md @@ -0,0 +1,10 @@ +# ListMachineTypesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**machine_types** | [**list[DataCenterMachineType]**](DataCenterMachineType.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/docs/ListNetworksResponse.md b/docs/ListNetworksResponse.md new file mode 100644 index 0000000..cfcf25c --- /dev/null +++ b/docs/ListNetworksResponse.md @@ -0,0 +1,13 @@ +# ListNetworksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**networks** | [**list[Network]**](Network.md) | | +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListObjectStorageBucketsResponse.md b/docs/ListObjectStorageBucketsResponse.md new file mode 100644 index 0000000..18dc6ba --- /dev/null +++ b/docs/ListObjectStorageBucketsResponse.md @@ -0,0 +1,13 @@ +# ListObjectStorageBucketsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**buckets** | [**list[ObjectStorageBucket]**](ObjectStorageBucket.md) | | +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListObjectStorageUsersResponse.md b/docs/ListObjectStorageUsersResponse.md new file mode 100644 index 0000000..f663c86 --- /dev/null +++ b/docs/ListObjectStorageUsersResponse.md @@ -0,0 +1,13 @@ +# ListObjectStorageUsersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**list[ObjectStorageUser]**](ObjectStorageUser.md) | | +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListOutstandingInvoicesResponse.md b/docs/ListOutstandingInvoicesResponse.md new file mode 100644 index 0000000..57bf2fc --- /dev/null +++ b/docs/ListOutstandingInvoicesResponse.md @@ -0,0 +1,10 @@ +# ListOutstandingInvoicesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invoices** | [**list[Invoice]**](Invoice.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/docs/ListPrivateVMImagesResponse.md b/docs/ListPrivateVMImagesResponse.md new file mode 100644 index 0000000..a9e15ee --- /dev/null +++ b/docs/ListPrivateVMImagesResponse.md @@ -0,0 +1,13 @@ +# ListPrivateVMImagesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**images** | [**list[PrivateImage]**](PrivateImage.md) | | [optional] +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListProjectSshKeysResponse.md b/docs/ListProjectSshKeysResponse.md new file mode 100644 index 0000000..077687c --- /dev/null +++ b/docs/ListProjectSshKeysResponse.md @@ -0,0 +1,10 @@ +# ListProjectSshKeysResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ssh_keys** | [**list[SshKey]**](SshKey.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/docs/ListProjectsResponse.md b/docs/ListProjectsResponse.md new file mode 100644 index 0000000..2650d85 --- /dev/null +++ b/docs/ListProjectsResponse.md @@ -0,0 +1,12 @@ +# ListProjectsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projects** | [**list[Project]**](Project.md) | | +**page_token** | **str** | | +**page_size** | **int** | | + +[[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/docs/ListPublicVMImagesResponse.md b/docs/ListPublicVMImagesResponse.md new file mode 100644 index 0000000..3a3ea5b --- /dev/null +++ b/docs/ListPublicVMImagesResponse.md @@ -0,0 +1,10 @@ +# ListPublicVMImagesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**images** | [**list[Image]**](Image.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/docs/ListRegionsResponse.md b/docs/ListRegionsResponse.md new file mode 100644 index 0000000..e1813ef --- /dev/null +++ b/docs/ListRegionsResponse.md @@ -0,0 +1,10 @@ +# ListRegionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**regions** | [**list[Region]**](Region.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/docs/ListSecurityGroupsResponse.md b/docs/ListSecurityGroupsResponse.md new file mode 100644 index 0000000..4316cb2 --- /dev/null +++ b/docs/ListSecurityGroupsResponse.md @@ -0,0 +1,13 @@ +# ListSecurityGroupsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**security_groups** | [**list[SecurityGroup]**](SecurityGroup.md) | | +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListSshKeysResponse.md b/docs/ListSshKeysResponse.md new file mode 100644 index 0000000..6ab9000 --- /dev/null +++ b/docs/ListSshKeysResponse.md @@ -0,0 +1,13 @@ +# ListSshKeysResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ssh_keys** | [**list[SshKey]**](SshKey.md) | | +**total_count** | **int** | | +**page_number** | **int** | | +**page_size** | **int** | | + +[[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/docs/ListUserPermissionsResponse.md b/docs/ListUserPermissionsResponse.md new file mode 100644 index 0000000..33cc090 --- /dev/null +++ b/docs/ListUserPermissionsResponse.md @@ -0,0 +1,12 @@ +# ListUserPermissionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_permissions** | [**list[UserPermission]**](UserPermission.md) | | +**data_center_permissions** | [**list[UserPermission]**](UserPermission.md) | | +**billing_account_permissions** | [**list[UserPermission]**](UserPermission.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/docs/ListVMDataCentersResponse.md b/docs/ListVMDataCentersResponse.md new file mode 100644 index 0000000..6664a48 --- /dev/null +++ b/docs/ListVMDataCentersResponse.md @@ -0,0 +1,10 @@ +# ListVMDataCentersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_centers** | [**list[VMDataCenter]**](VMDataCenter.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/docs/ListVMDisksResponse.md b/docs/ListVMDisksResponse.md new file mode 100644 index 0000000..9391b02 --- /dev/null +++ b/docs/ListVMDisksResponse.md @@ -0,0 +1,10 @@ +# ListVMDisksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**disks** | [**list[Disk]**](Disk.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/docs/ListVMGpuModelsResponse.md b/docs/ListVMGpuModelsResponse.md new file mode 100644 index 0000000..0384718 --- /dev/null +++ b/docs/ListVMGpuModelsResponse.md @@ -0,0 +1,10 @@ +# ListVMGpuModelsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gpu_models** | [**list[GpuModel]**](GpuModel.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/docs/ListVMMachineTypes2Response.md b/docs/ListVMMachineTypes2Response.md new file mode 100644 index 0000000..d8386a3 --- /dev/null +++ b/docs/ListVMMachineTypes2Response.md @@ -0,0 +1,10 @@ +# ListVMMachineTypes2Response + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**machine_types** | [**list[ListVMMachineTypes2ResponseVMMachineType]**](ListVMMachineTypes2ResponseVMMachineType.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/docs/ListVMMachineTypes2ResponseVMMachineType.md b/docs/ListVMMachineTypes2ResponseVMMachineType.md new file mode 100644 index 0000000..97045a5 --- /dev/null +++ b/docs/ListVMMachineTypes2ResponseVMMachineType.md @@ -0,0 +1,34 @@ +# ListVMMachineTypes2ResponseVMMachineType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | +**machine_type** | **str** | | +**cpu_model** | **str** | | +**gpu_model** | **str** | | +**gpu_model_id** | **str** | | +**min_vcpu_per_memory_gib** | **float** | | +**max_vcpu_per_memory_gib** | **float** | | +**min_vcpu_per_gpu** | **float** | | +**max_vcpu_per_gpu** | **float** | | +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**min_storage_gib_price_hr** | [**Decimal**](Decimal.md) | | +**ipv4_price_hr** | [**Decimal**](Decimal.md) | | +**renewable_energy** | **bool** | | +**max_vcpu_free** | **int** | | +**total_vcpu_free** | **int** | | +**max_memory_gib_free** | **int** | | +**total_memory_gib_free** | **int** | | +**max_gpu_free** | **int** | | +**total_gpu_free** | **int** | | +**max_storage_gib_free** | **int** | | +**total_storage_gib_free** | **int** | | +**min_vcpu** | **float** | | +**min_memory_gib** | **float** | | + +[[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/docs/ListVMMachineTypesResponse.md b/docs/ListVMMachineTypesResponse.md new file mode 100644 index 0000000..aecf56d --- /dev/null +++ b/docs/ListVMMachineTypesResponse.md @@ -0,0 +1,10 @@ +# ListVMMachineTypesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**machine_types** | [**list[ListVMMachineTypesResponseVMMachineType]**](ListVMMachineTypesResponseVMMachineType.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/docs/ListVMMachineTypesResponseVMMachineType.md b/docs/ListVMMachineTypesResponseVMMachineType.md new file mode 100644 index 0000000..84840f0 --- /dev/null +++ b/docs/ListVMMachineTypesResponseVMMachineType.md @@ -0,0 +1,35 @@ +# ListVMMachineTypesResponseVMMachineType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | +**machine_type** | **str** | | +**cpu_model** | **str** | | +**gpu_model** | **str** | | +**gpu_model_id** | **str** | | +**min_vcpu_per_memory_gib** | **float** | | +**max_vcpu_per_memory_gib** | **float** | | +**min_vcpu_per_gpu** | **float** | | +**max_vcpu_per_gpu** | **float** | | +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**min_storage_gib_price_hr** | [**Decimal**](Decimal.md) | | +**ipv4_price_hr** | [**Decimal**](Decimal.md) | | +**renewable_energy** | **bool** | | +**max_vcpu_free** | **int** | | +**total_vcpu_free** | **int** | | +**max_memory_gib_free** | **int** | | +**total_memory_gib_free** | **int** | | +**max_gpu_free** | **int** | | +**total_gpu_free** | **int** | | +**max_storage_gib_free** | **int** | | +**total_storage_gib_free** | **int** | | +**min_vcpu** | **float** | | +**min_memory_gib** | **float** | | +**prices** | [**list[VMMachineTypeMachineTypePrice]**](VMMachineTypeMachineTypePrice.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/docs/ListVMsResponse.md b/docs/ListVMsResponse.md new file mode 100644 index 0000000..c8d3e71 --- /dev/null +++ b/docs/ListVMsResponse.md @@ -0,0 +1,10 @@ +# ListVMsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vms** | [**list[VM]**](VM.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/docs/MachineTypesApi.md b/docs/MachineTypesApi.md new file mode 100644 index 0000000..1fdc980 --- /dev/null +++ b/docs/MachineTypesApi.md @@ -0,0 +1,153 @@ +# src.cudo_compute.MachineTypesApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_machine_type**](MachineTypesApi.md#get_machine_type) | **GET** /v1/data-centers/{dataCenterId}/machine-types/{machineType} | Get a machine type in a data center +[**get_machine_type_live_utilization**](MachineTypesApi.md#get_machine_type_live_utilization) | **GET** /v1/data-centers/{dataCenterId}/machine-types/{machineType}/live-utilization | Get the utilization for a machine type in a data center +[**list_machine_types**](MachineTypesApi.md#list_machine_types) | **GET** /v1/data-centers/{dataCenterId}/machine-types | List machine types for a data center + + +# **get_machine_type** +> GetMachineTypeResponse get_machine_type(data_center_id, machine_type) + +Get a machine type in a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.MachineTypesApi() +data_center_id = 'data_center_id_example' # str | +machine_type = 'machine_type_example' # str | + +try: + # Get a machine type in a data center + api_response = api_instance.get_machine_type(data_center_id, machine_type) + pprint(api_response) +except ApiException as e: + print("Exception when calling MachineTypesApi->get_machine_type: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + **machine_type** | **str**| | + +### Return type + +[**GetMachineTypeResponse**](GetMachineTypeResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_machine_type_live_utilization** +> GetMachineTypeLiveUtilizationResponse get_machine_type_live_utilization(data_center_id, machine_type) + +Get the utilization for a machine type in a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.MachineTypesApi() +data_center_id = 'data_center_id_example' # str | +machine_type = 'machine_type_example' # str | + +try: + # Get the utilization for a machine type in a data center + api_response = api_instance.get_machine_type_live_utilization(data_center_id, machine_type) + pprint(api_response) +except ApiException as e: + print("Exception when calling MachineTypesApi->get_machine_type_live_utilization: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + **machine_type** | **str**| | + +### Return type + +[**GetMachineTypeLiveUtilizationResponse**](GetMachineTypeLiveUtilizationResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_machine_types** +> ListMachineTypesResponse list_machine_types(data_center_id) + +List machine types for a data center + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.MachineTypesApi() +data_center_id = 'data_center_id_example' # str | + +try: + # List machine types for a data center + api_response = api_instance.list_machine_types(data_center_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MachineTypesApi->list_machine_types: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + +### Return type + +[**ListMachineTypesResponse**](ListMachineTypesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/MonitorVMResponse.md b/docs/MonitorVMResponse.md new file mode 100644 index 0000000..389f505 --- /dev/null +++ b/docs/MonitorVMResponse.md @@ -0,0 +1,10 @@ +# MonitorVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**list[VMMonitoringItem]**](VMMonitoringItem.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/docs/Network.md b/docs/Network.md new file mode 100644 index 0000000..670ff7f --- /dev/null +++ b/docs/Network.md @@ -0,0 +1,20 @@ +# Network + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**data_center_id** | **str** | | +**ip_range** | **str** | | +**gateway** | **str** | | +**size** | [**V1VRouterSize**](V1VRouterSize.md) | | +**price_hr** | [**Decimal**](Decimal.md) | | +**external_ip_address** | **str** | | +**internal_ip_address** | **str** | | +**short_state** | **str** | | +**state** | [**NetworkState**](NetworkState.md) | | +**create_time** | **datetime** | | + +[[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/docs/NetworkPriceHr.md b/docs/NetworkPriceHr.md new file mode 100644 index 0000000..f651114 --- /dev/null +++ b/docs/NetworkPriceHr.md @@ -0,0 +1,11 @@ +# NetworkPriceHr + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | [**VMDataCenterVRouterSize**](VMDataCenterVRouterSize.md) | | [optional] +**price_hr** | [**Decimal**](Decimal.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/docs/NetworkResult.md b/docs/NetworkResult.md new file mode 100644 index 0000000..1b62327 --- /dev/null +++ b/docs/NetworkResult.md @@ -0,0 +1,18 @@ +# NetworkResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**ip_range** | **str** | | [optional] +**gateway** | **str** | | [optional] +**internal_ip_address** | **str** | | [optional] +**external_ip_address** | **str** | | [optional] +**state** | [**NetworkState**](NetworkState.md) | | [optional] +**create_time** | **datetime** | | [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/docs/NetworkState.md b/docs/NetworkState.md new file mode 100644 index 0000000..682981e --- /dev/null +++ b/docs/NetworkState.md @@ -0,0 +1,9 @@ +# NetworkState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/NetworksApi.md b/docs/NetworksApi.md new file mode 100644 index 0000000..df646eb --- /dev/null +++ b/docs/NetworksApi.md @@ -0,0 +1,555 @@ +# src.cudo_compute.NetworksApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_network**](NetworksApi.md#create_network) | **POST** /v1/projects/{projectId}/networks | Create network +[**create_security_group**](NetworksApi.md#create_security_group) | **POST** /v1/projects/{securityGroup.projectId}/networks/security-groups | Create security group +[**delete_network**](NetworksApi.md#delete_network) | **DELETE** /v1/projects/{projectId}/networks/{id} | Delete network +[**delete_security_group**](NetworksApi.md#delete_security_group) | **DELETE** /v1/projects/{projectId}/networks/security-groups/{id} | Delete security group +[**get_network**](NetworksApi.md#get_network) | **GET** /v1/projects/{projectId}/networks/{id} | Get network +[**get_security_group**](NetworksApi.md#get_security_group) | **GET** /v1/projects/{projectId}/networks/security-groups/{id} | Get a security group +[**list_networks**](NetworksApi.md#list_networks) | **GET** /v1/projects/{projectId}/networks | List networks +[**list_security_groups**](NetworksApi.md#list_security_groups) | **GET** /v1/projects/{projectId}/networks/security-groups | List security groups +[**start_network**](NetworksApi.md#start_network) | **POST** /v1/projects/{projectId}/networks/{id}/start | Start network +[**stop_network**](NetworksApi.md#stop_network) | **POST** /v1/projects/{projectId}/networks/{id}/stop | Stop network +[**update_security_group**](NetworksApi.md#update_security_group) | **PATCH** /v1/projects/{securityGroup.projectId}/networks/security-groups/{securityGroup.id} | Update security group + + +# **create_network** +> CreateNetworkResponse create_network(project_id, create_network_body) + +Create network + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +create_network_body = src.cudo_compute.CreateNetworkBody() # CreateNetworkBody | + +try: + # Create network + api_response = api_instance.create_network(project_id, create_network_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->create_network: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **create_network_body** | [**CreateNetworkBody**](CreateNetworkBody.md)| | + +### Return type + +[**CreateNetworkResponse**](CreateNetworkResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_security_group** +> CreateSecurityGroupResponse create_security_group(security_group_project_id, security_group) + +Create security group + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +security_group_project_id = 'security_group_project_id_example' # str | +security_group = src.cudo_compute.SecurityGroup() # SecurityGroup | + +try: + # Create security group + api_response = api_instance.create_security_group(security_group_project_id, security_group) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->create_security_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **security_group_project_id** | **str**| | + **security_group** | [**SecurityGroup**](SecurityGroup.md)| | + +### Return type + +[**CreateSecurityGroupResponse**](CreateSecurityGroupResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_network** +> DeleteNetworkResponse delete_network(project_id, id) + +Delete network + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Delete network + api_response = api_instance.delete_network(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->delete_network: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**DeleteNetworkResponse**](DeleteNetworkResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_security_group** +> DeleteSecurityGroupResponse delete_security_group(project_id, id) + +Delete security group + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Delete security group + api_response = api_instance.delete_security_group(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->delete_security_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**DeleteSecurityGroupResponse**](DeleteSecurityGroupResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_network** +> GetNetworkResponse get_network(project_id, id) + +Get network + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Get network + api_response = api_instance.get_network(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->get_network: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**GetNetworkResponse**](GetNetworkResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_security_group** +> GetSecurityGroupResponse get_security_group(project_id, id) + +Get a security group + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Get a security group + api_response = api_instance.get_security_group(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->get_security_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**GetSecurityGroupResponse**](GetSecurityGroupResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_networks** +> ListNetworksResponse list_networks(project_id, page_number=page_number, page_size=page_size) + +List networks + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) + +try: + # List networks + api_response = api_instance.list_networks(project_id, page_number=page_number, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->list_networks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListNetworksResponse**](ListNetworksResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_security_groups** +> ListSecurityGroupsResponse list_security_groups(project_id, data_center_id=data_center_id, page_number=page_number, page_size=page_size) + +List security groups + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | (optional) +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) + +try: + # List security groups + api_response = api_instance.list_security_groups(project_id, data_center_id=data_center_id, page_number=page_number, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->list_security_groups: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | [optional] + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListSecurityGroupsResponse**](ListSecurityGroupsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **start_network** +> StartNetworkResponse start_network(project_id, id) + +Start network + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Start network + api_response = api_instance.start_network(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->start_network: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**StartNetworkResponse**](StartNetworkResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **stop_network** +> StopNetworkResponse stop_network(project_id, id) + +Stop network + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Stop network + api_response = api_instance.stop_network(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->stop_network: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**StopNetworkResponse**](StopNetworkResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_security_group** +> UpdateSecurityGroupResponse update_security_group(security_group_project_id, security_group_id, security_group) + +Update security group + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.NetworksApi() +security_group_project_id = 'security_group_project_id_example' # str | +security_group_id = 'security_group_id_example' # str | +security_group = src.cudo_compute.SecurityGroup1() # SecurityGroup1 | + +try: + # Update security group + api_response = api_instance.update_security_group(security_group_project_id, security_group_id, security_group) + pprint(api_response) +except ApiException as e: + print("Exception when calling NetworksApi->update_security_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **security_group_project_id** | **str**| | + **security_group_id** | **str**| | + **security_group** | [**SecurityGroup1**](SecurityGroup1.md)| | + +### Return type + +[**UpdateSecurityGroupResponse**](UpdateSecurityGroupResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/ObjectStorageApi.md b/docs/ObjectStorageApi.md new file mode 100644 index 0000000..4f73531 --- /dev/null +++ b/docs/ObjectStorageApi.md @@ -0,0 +1,518 @@ +# src.cudo_compute.ObjectStorageApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**activate**](ObjectStorageApi.md#activate) | **POST** /v1/projects/{projectId}/object-storage/activate/{dataCenterId} | Allow the use of S3 compatible storage in a project +[**create_object_storage_user**](ObjectStorageApi.md#create_object_storage_user) | **POST** /v1/projects/{projectId}/object-storage/users/{dataCenterId} | Create user that stores keys for storage buckets +[**delete_object_storage_key**](ObjectStorageApi.md#delete_object_storage_key) | **DELETE** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}/keys/{accessKey} | Delete object storage user key +[**delete_object_storage_user**](ObjectStorageApi.md#delete_object_storage_user) | **DELETE** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id} | Delete object storage user +[**generate_object_storage_key**](ObjectStorageApi.md#generate_object_storage_key) | **POST** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id} | Generate access key for storage buckets +[**get_object_storage_bucket**](ObjectStorageApi.md#get_object_storage_bucket) | **GET** /v1/projects/{projectId}/object-storage/buckets/{dataCenterId}/{id} | Get details for a bucket +[**get_object_storage_session_key**](ObjectStorageApi.md#get_object_storage_session_key) | **GET** /v1/projects/{projectId}/object-storage/session-key/{dataCenterId} | Generate temporary key for storage bucket access +[**get_object_storage_user**](ObjectStorageApi.md#get_object_storage_user) | **GET** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{userId} | Get details about an object storage user +[**list_object_storage_buckets**](ObjectStorageApi.md#list_object_storage_buckets) | **GET** /v1/projects/{projectId}/object-storage/buckets | List buckets +[**list_object_storage_users**](ObjectStorageApi.md#list_object_storage_users) | **GET** /v1/projects/{projectId}/object-storage/users | List storage users + + +# **activate** +> object activate(project_id, data_center_id, activate_body) + +Allow the use of S3 compatible storage in a project + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | +activate_body = src.cudo_compute.ActivateBody() # ActivateBody | + +try: + # Allow the use of S3 compatible storage in a project + api_response = api_instance.activate(project_id, data_center_id, activate_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->activate: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + **activate_body** | [**ActivateBody**](ActivateBody.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_object_storage_user** +> ObjectStorageUser create_object_storage_user(project_id, data_center_id, create_object_storage_user_body) + +Create user that stores keys for storage buckets + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | +create_object_storage_user_body = src.cudo_compute.CreateObjectStorageUserBody() # CreateObjectStorageUserBody | + +try: + # Create user that stores keys for storage buckets + api_response = api_instance.create_object_storage_user(project_id, data_center_id, create_object_storage_user_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->create_object_storage_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + **create_object_storage_user_body** | [**CreateObjectStorageUserBody**](CreateObjectStorageUserBody.md)| | + +### Return type + +[**ObjectStorageUser**](ObjectStorageUser.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_object_storage_key** +> object delete_object_storage_key(project_id, data_center_id, id, access_key) + +Delete object storage user key + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | +id = 'id_example' # str | +access_key = 'access_key_example' # str | + +try: + # Delete object storage user key + api_response = api_instance.delete_object_storage_key(project_id, data_center_id, id, access_key) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->delete_object_storage_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + **id** | **str**| | + **access_key** | **str**| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_object_storage_user** +> object delete_object_storage_user(project_id, data_center_id, id) + +Delete object storage user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | +id = 'id_example' # str | + +try: + # Delete object storage user + api_response = api_instance.delete_object_storage_user(project_id, data_center_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->delete_object_storage_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **generate_object_storage_key** +> ObjectStorageKey generate_object_storage_key(project_id, data_center_id, id) + +Generate access key for storage buckets + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | +id = 'id_example' # str | + +try: + # Generate access key for storage buckets + api_response = api_instance.generate_object_storage_key(project_id, data_center_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->generate_object_storage_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + **id** | **str**| | + +### Return type + +[**ObjectStorageKey**](ObjectStorageKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_object_storage_bucket** +> ObjectStorageBucket get_object_storage_bucket(project_id, data_center_id, id) + +Get details for a bucket + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | +id = 'id_example' # str | + +try: + # Get details for a bucket + api_response = api_instance.get_object_storage_bucket(project_id, data_center_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->get_object_storage_bucket: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + **id** | **str**| | + +### Return type + +[**ObjectStorageBucket**](ObjectStorageBucket.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_object_storage_session_key** +> GetObjectStorageSessionKeyResponse get_object_storage_session_key(project_id, data_center_id) + +Generate temporary key for storage bucket access + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | + +try: + # Generate temporary key for storage bucket access + api_response = api_instance.get_object_storage_session_key(project_id, data_center_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->get_object_storage_session_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + +### Return type + +[**GetObjectStorageSessionKeyResponse**](GetObjectStorageSessionKeyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_object_storage_user** +> ObjectStorageUser get_object_storage_user(project_id, data_center_id, user_id) + +Get details about an object storage user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +data_center_id = 'data_center_id_example' # str | +user_id = 'user_id_example' # str | + +try: + # Get details about an object storage user + api_response = api_instance.get_object_storage_user(project_id, data_center_id, user_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->get_object_storage_user: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **data_center_id** | **str**| | + **user_id** | **str**| | + +### Return type + +[**ObjectStorageUser**](ObjectStorageUser.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_object_storage_buckets** +> ListObjectStorageBucketsResponse list_object_storage_buckets(project_id, page_number=page_number, page_size=page_size) + +List buckets + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) + +try: + # List buckets + api_response = api_instance.list_object_storage_buckets(project_id, page_number=page_number, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->list_object_storage_buckets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListObjectStorageBucketsResponse**](ListObjectStorageBucketsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_object_storage_users** +> ListObjectStorageUsersResponse list_object_storage_users(project_id, page_number=page_number, page_size=page_size) + +List storage users + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ObjectStorageApi() +project_id = 'project_id_example' # str | +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) + +try: + # List storage users + api_response = api_instance.list_object_storage_users(project_id, page_number=page_number, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling ObjectStorageApi->list_object_storage_users: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListObjectStorageUsersResponse**](ListObjectStorageUsersResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/ObjectStorageBucket.md b/docs/ObjectStorageBucket.md new file mode 100644 index 0000000..d9fb452 --- /dev/null +++ b/docs/ObjectStorageBucket.md @@ -0,0 +1,17 @@ +# ObjectStorageBucket + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | +**data_center_id** | **str** | | +**id** | **str** | | +**endpoint** | **str** | | [optional] +**object_count** | **str** | | [optional] +**size_bytes** | **str** | | [optional] +**billable_bytes** | **str** | | [optional] +**storage_gib_price_hr** | [**Decimal**](Decimal.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/docs/ObjectStorageKey.md b/docs/ObjectStorageKey.md new file mode 100644 index 0000000..8f15516 --- /dev/null +++ b/docs/ObjectStorageKey.md @@ -0,0 +1,11 @@ +# ObjectStorageKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_key** | **str** | | [optional] +**secret_key** | **str** | | [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/docs/ObjectStorageUser.md b/docs/ObjectStorageUser.md new file mode 100644 index 0000000..75b24e7 --- /dev/null +++ b/docs/ObjectStorageUser.md @@ -0,0 +1,15 @@ +# ObjectStorageUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | +**data_center_id** | **str** | | +**id** | **str** | | +**keys** | [**list[ObjectStorageKey]**](ObjectStorageKey.md) | | +**create_by** | **str** | | [optional] +**create_time** | **datetime** | | [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/docs/Package.md b/docs/Package.md new file mode 100644 index 0000000..9a5d053 --- /dev/null +++ b/docs/Package.md @@ -0,0 +1,12 @@ +# Package + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | +**version** | **str** | | + +[[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/docs/PaymentIntent.md b/docs/PaymentIntent.md new file mode 100644 index 0000000..9af831c --- /dev/null +++ b/docs/PaymentIntent.md @@ -0,0 +1,10 @@ +# PaymentIntent + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_secret** | **str** | | + +[[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/docs/PaymentMethodCard.md b/docs/PaymentMethodCard.md new file mode 100644 index 0000000..ad21ca7 --- /dev/null +++ b/docs/PaymentMethodCard.md @@ -0,0 +1,15 @@ +# PaymentMethodCard + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**brand** | **str** | | [optional] +**country** | **str** | | [optional] +**exp_month** | **str** | | [optional] +**exp_year** | **str** | | [optional] +**fingerprint** | **str** | | [optional] +**last4** | **str** | | [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/docs/PaymentMethodPaypal.md b/docs/PaymentMethodPaypal.md new file mode 100644 index 0000000..f3b9c37 --- /dev/null +++ b/docs/PaymentMethodPaypal.md @@ -0,0 +1,11 @@ +# PaymentMethodPaypal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payer_email** | **str** | | [optional] +**payer_id** | **str** | | [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/docs/PaymentTerms.md b/docs/PaymentTerms.md new file mode 100644 index 0000000..bd2dd25 --- /dev/null +++ b/docs/PaymentTerms.md @@ -0,0 +1,9 @@ +# PaymentTerms + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/PermissionsApi.md b/docs/PermissionsApi.md new file mode 100644 index 0000000..d81d7b9 --- /dev/null +++ b/docs/PermissionsApi.md @@ -0,0 +1,353 @@ +# src.cudo_compute.PermissionsApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_billing_account_user_permission**](PermissionsApi.md#add_billing_account_user_permission) | **POST** /v1/billing-accounts/{billingAccountId}/add-user-permission | Add billing account user +[**add_data_center_user_permission**](PermissionsApi.md#add_data_center_user_permission) | **POST** /v1/data-centers/{dataCenterId}/add-user-permission | Add data center user +[**add_project_user_permission**](PermissionsApi.md#add_project_user_permission) | **POST** /v1/projects/{projectId}/add-user-permission | Add project user +[**list_user_permissions**](PermissionsApi.md#list_user_permissions) | **GET** /v1/auth/permissions | List +[**remove_billing_account_user_permission**](PermissionsApi.md#remove_billing_account_user_permission) | **POST** /v1/billing-accounts/{billingAccountId}/remove-user-permission | Remove billing account user +[**remove_data_center_user_permission**](PermissionsApi.md#remove_data_center_user_permission) | **POST** /v1/data-centers/{dataCenterId}/remove-user-permission | Remove data center user +[**remove_project_user_permission**](PermissionsApi.md#remove_project_user_permission) | **POST** /v1/projects/{projectId}/remove-user-permission | Remove project user + + +# **add_billing_account_user_permission** +> object add_billing_account_user_permission(billing_account_id, add_billing_account_user_permission_body) + +Add billing account user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.PermissionsApi() +billing_account_id = 'billing_account_id_example' # str | +add_billing_account_user_permission_body = src.cudo_compute.AddBillingAccountUserPermissionBody() # AddBillingAccountUserPermissionBody | + +try: + # Add billing account user + api_response = api_instance.add_billing_account_user_permission(billing_account_id, add_billing_account_user_permission_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionsApi->add_billing_account_user_permission: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **billing_account_id** | **str**| | + **add_billing_account_user_permission_body** | [**AddBillingAccountUserPermissionBody**](AddBillingAccountUserPermissionBody.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **add_data_center_user_permission** +> object add_data_center_user_permission(data_center_id, add_data_center_user_permission_body) + +Add data center user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.PermissionsApi() +data_center_id = 'data_center_id_example' # str | +add_data_center_user_permission_body = src.cudo_compute.AddDataCenterUserPermissionBody() # AddDataCenterUserPermissionBody | + +try: + # Add data center user + api_response = api_instance.add_data_center_user_permission(data_center_id, add_data_center_user_permission_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionsApi->add_data_center_user_permission: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + **add_data_center_user_permission_body** | [**AddDataCenterUserPermissionBody**](AddDataCenterUserPermissionBody.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **add_project_user_permission** +> object add_project_user_permission(project_id, add_project_user_permission_body) + +Add project user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.PermissionsApi() +project_id = 'project_id_example' # str | +add_project_user_permission_body = src.cudo_compute.AddProjectUserPermissionBody() # AddProjectUserPermissionBody | + +try: + # Add project user + api_response = api_instance.add_project_user_permission(project_id, add_project_user_permission_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionsApi->add_project_user_permission: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **add_project_user_permission_body** | [**AddProjectUserPermissionBody**](AddProjectUserPermissionBody.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_user_permissions** +> ListUserPermissionsResponse list_user_permissions(project_id=project_id, data_center_id=data_center_id, billing_account_id=billing_account_id) + +List + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.PermissionsApi() +project_id = 'project_id_example' # str | (optional) +data_center_id = 'data_center_id_example' # str | (optional) +billing_account_id = 'billing_account_id_example' # str | (optional) + +try: + # List + api_response = api_instance.list_user_permissions(project_id=project_id, data_center_id=data_center_id, billing_account_id=billing_account_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionsApi->list_user_permissions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | [optional] + **data_center_id** | **str**| | [optional] + **billing_account_id** | **str**| | [optional] + +### Return type + +[**ListUserPermissionsResponse**](ListUserPermissionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **remove_billing_account_user_permission** +> object remove_billing_account_user_permission(billing_account_id, remove_billing_account_user_permission_body) + +Remove billing account user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.PermissionsApi() +billing_account_id = 'billing_account_id_example' # str | +remove_billing_account_user_permission_body = src.cudo_compute.RemoveBillingAccountUserPermissionBody() # RemoveBillingAccountUserPermissionBody | + +try: + # Remove billing account user + api_response = api_instance.remove_billing_account_user_permission(billing_account_id, remove_billing_account_user_permission_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionsApi->remove_billing_account_user_permission: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **billing_account_id** | **str**| | + **remove_billing_account_user_permission_body** | [**RemoveBillingAccountUserPermissionBody**](RemoveBillingAccountUserPermissionBody.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **remove_data_center_user_permission** +> object remove_data_center_user_permission(data_center_id, remove_data_center_user_permission_body) + +Remove data center user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.PermissionsApi() +data_center_id = 'data_center_id_example' # str | +remove_data_center_user_permission_body = src.cudo_compute.RemoveDataCenterUserPermissionBody() # RemoveDataCenterUserPermissionBody | + +try: + # Remove data center user + api_response = api_instance.remove_data_center_user_permission(data_center_id, remove_data_center_user_permission_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionsApi->remove_data_center_user_permission: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data_center_id** | **str**| | + **remove_data_center_user_permission_body** | [**RemoveDataCenterUserPermissionBody**](RemoveDataCenterUserPermissionBody.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **remove_project_user_permission** +> object remove_project_user_permission(project_id, remove_project_user_permission_body) + +Remove project user + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.PermissionsApi() +project_id = 'project_id_example' # str | +remove_project_user_permission_body = src.cudo_compute.RemoveProjectUserPermissionBody() # RemoveProjectUserPermissionBody | + +try: + # Remove project user + api_response = api_instance.remove_project_user_permission(project_id, remove_project_user_permission_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling PermissionsApi->remove_project_user_permission: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **remove_project_user_permission_body** | [**RemoveProjectUserPermissionBody**](RemoveProjectUserPermissionBody.md)| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/Point.md b/docs/Point.md new file mode 100644 index 0000000..ba31394 --- /dev/null +++ b/docs/Point.md @@ -0,0 +1,11 @@ +# Point + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lat** | **float** | | [optional] +**lng** | **float** | | [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/docs/PrivateImage.md b/docs/PrivateImage.md new file mode 100644 index 0000000..e46ed71 --- /dev/null +++ b/docs/PrivateImage.md @@ -0,0 +1,14 @@ +# PrivateImage + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**description** | **str** | | [optional] +**size_gib** | **int** | | [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/docs/Profile.md b/docs/Profile.md new file mode 100644 index 0000000..338d080 --- /dev/null +++ b/docs/Profile.md @@ -0,0 +1,13 @@ +# Profile + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | | [optional] +**first_name** | **str** | | [optional] +**last_name** | **str** | | [optional] +**picture** | **str** | | [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/docs/Project.md b/docs/Project.md new file mode 100644 index 0000000..dbbd5e7 --- /dev/null +++ b/docs/Project.md @@ -0,0 +1,13 @@ +# Project + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**billing_account_id** | **str** | | +**resource_count** | **int** | | [optional] +**create_by** | **str** | | [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/docs/ProjectResult.md b/docs/ProjectResult.md new file mode 100644 index 0000000..5c997de --- /dev/null +++ b/docs/ProjectResult.md @@ -0,0 +1,12 @@ +# ProjectResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**resource_count** | **int** | | [optional] +**create_time** | **datetime** | | [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/docs/ProjectsApi.md b/docs/ProjectsApi.md new file mode 100644 index 0000000..7d5858c --- /dev/null +++ b/docs/ProjectsApi.md @@ -0,0 +1,294 @@ +# src.cudo_compute.ProjectsApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_project**](ProjectsApi.md#create_project) | **POST** /v1/projects | Create +[**delete_project**](ProjectsApi.md#delete_project) | **DELETE** /v1/projects/{id} | Delete +[**get_project**](ProjectsApi.md#get_project) | **GET** /v1/projects/{id} | Get +[**list_project_ssh_keys**](ProjectsApi.md#list_project_ssh_keys) | **GET** /v1/project/{projectId}/ssh-keys | List SSH keys +[**list_projects**](ProjectsApi.md#list_projects) | **GET** /v1/projects | List +[**update_project**](ProjectsApi.md#update_project) | **PATCH** /v1/projects/{project.id} | Update + + +# **create_project** +> Project create_project(project) + +Create + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ProjectsApi() +project = src.cudo_compute.Project() # Project | + +try: + # Create + api_response = api_instance.create_project(project) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectsApi->create_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project** | [**Project**](Project.md)| | + +### Return type + +[**Project**](Project.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_project** +> object delete_project(id) + +Delete + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ProjectsApi() +id = 'id_example' # str | + +try: + # Delete + api_response = api_instance.delete_project(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectsApi->delete_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_project** +> Project get_project(id) + +Get + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ProjectsApi() +id = 'id_example' # str | + +try: + # Get + api_response = api_instance.get_project(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectsApi->get_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**Project**](Project.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_project_ssh_keys** +> ListProjectSshKeysResponse list_project_ssh_keys(project_id) + +List SSH keys + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ProjectsApi() +project_id = 'project_id_example' # str | + +try: + # List SSH keys + api_response = api_instance.list_project_ssh_keys(project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectsApi->list_project_ssh_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + +### Return type + +[**ListProjectSshKeysResponse**](ListProjectSshKeysResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_projects** +> ListProjectsResponse list_projects(page_token=page_token, page_size=page_size) + +List + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ProjectsApi() +page_token = 'page_token_example' # str | (optional) +page_size = 56 # int | (optional) + +try: + # List + api_response = api_instance.list_projects(page_token=page_token, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectsApi->list_projects: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_token** | **str**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListProjectsResponse**](ListProjectsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_project** +> Project update_project(project_id, update_project_body) + +Update + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.ProjectsApi() +project_id = 'project_id_example' # str | +update_project_body = src.cudo_compute.UpdateProjectBody() # UpdateProjectBody | + +try: + # Update + api_response = api_instance.update_project(project_id, update_project_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling ProjectsApi->update_project: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **update_project_body** | [**UpdateProjectBody**](UpdateProjectBody.md)| | + +### Return type + +[**Project**](Project.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/ProtobufAny.md b/docs/ProtobufAny.md new file mode 100644 index 0000000..a421811 --- /dev/null +++ b/docs/ProtobufAny.md @@ -0,0 +1,10 @@ +# ProtobufAny + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. | [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/docs/README.md b/docs/README.md index b6c4cec..c0ef34f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -74,15 +74,18 @@ Class | Method | HTTP request | Description *APIKeysApi* | [**generate_api_key**](docs/APIKeysApi.md#generate_api_key) | **POST** /v1/api-keys | Generate *APIKeysApi* | [**list_api_keys**](docs/APIKeysApi.md#list_api_keys) | **GET** /v1/api-keys | List *BillingApi* | [**create_billing_account**](docs/BillingApi.md#create_billing_account) | **POST** /v1/billing-accounts | Create a billing account +*BillingApi* | [**create_billing_account_credit_payment**](docs/BillingApi.md#create_billing_account_credit_payment) | **POST** /v1/billing-accounts/{id}/credit | Add credit to billing account *BillingApi* | [**delete_billing_account**](docs/BillingApi.md#delete_billing_account) | **DELETE** /v1/billing-accounts/{id} | Delete billing account *BillingApi* | [**get_billing_account**](docs/BillingApi.md#get_billing_account) | **GET** /v1/billing-accounts/{id} | Get a billing account *BillingApi* | [**get_billing_account_details**](docs/BillingApi.md#get_billing_account_details) | **GET** /v1/billing-accounts/{id}/details | Get billing account details *BillingApi* | [**get_billing_account_payment_methods**](docs/BillingApi.md#get_billing_account_payment_methods) | **GET** /v1/billing-accounts/{id}/payment-methods | Get payment methods *BillingApi* | [**get_billing_account_setup_intent**](docs/BillingApi.md#get_billing_account_setup_intent) | **GET** /v1/billing-accounts/{id}/setup-intent | Get setup intent *BillingApi* | [**get_billing_account_spend_details**](docs/BillingApi.md#get_billing_account_spend_details) | **GET** /v1/billing-accounts/{billingAccountId}/spend/details | Get spend details -*BillingApi* | [**get_billing_account_stripe_invoices**](docs/BillingApi.md#get_billing_account_stripe_invoices) | **GET** /v1/billing-accounts/invoices | Get invoices +*BillingApi* | [**list_billing_account_credit_balance_transactions**](docs/BillingApi.md#list_billing_account_credit_balance_transactions) | **GET** /v1/billing-accounts/{id}/credit-balance-transactions | List credit balance transactions on a billing account +*BillingApi* | [**list_billing_account_invoices**](docs/BillingApi.md#list_billing_account_invoices) | **GET** /v1/billing-accounts/invoices | List invoices +*BillingApi* | [**list_billing_account_transactions**](docs/BillingApi.md#list_billing_account_transactions) | **GET** /v1/billing-accounts/{id}/transactions | List transactions on a billing account *BillingApi* | [**list_billing_accounts**](docs/BillingApi.md#list_billing_accounts) | **GET** /v1/billing-accounts | List billing accounts -*BillingApi* | [**list_outstanding_stripe_invoices**](docs/BillingApi.md#list_outstanding_stripe_invoices) | **GET** /v1/billing-accounts/invoices/outstanding | Get outstanding invoices +*BillingApi* | [**list_outstanding_invoices**](docs/BillingApi.md#list_outstanding_invoices) | **GET** /v1/billing-accounts/invoices/outstanding | Get outstanding invoices *BillingApi* | [**remove_billing_account_payment_method**](docs/BillingApi.md#remove_billing_account_payment_method) | **DELETE** /v1/billing-accounts/{id}/payment-methods/{paymentMethodId} | Remove payment method *BillingApi* | [**set_billing_account_default_payment_method**](docs/BillingApi.md#set_billing_account_default_payment_method) | **POST** /v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default | Set default payment method *BillingApi* | [**update_billing_account**](docs/BillingApi.md#update_billing_account) | **PATCH** /v1/billing-accounts/{billingAccount.id} | Update billing account @@ -107,9 +110,9 @@ Class | Method | HTTP request | Description *DisksApi* | [**list_disk_snapshots**](docs/DisksApi.md#list_disk_snapshots) | **GET** /v1/projects/{projectId}/disks/{id}/snapshots | List Disk Snapshots *DisksApi* | [**list_disks**](docs/DisksApi.md#list_disks) | **GET** /v1/projects/{projectId}/disks | List disks *DisksApi* | [**revert_disk**](docs/DisksApi.md#revert_disk) | **POST** /v1/projects/{projectId}/disks/{id}/revert | Revert Disk to Snapshot -*MachineTypesApi* | [**get_machine_type**](docs/MachineTypesApi.md#get_machine_type) | **GET** /v1/data-centers/{dataCenterId}/machine-types/{machineType} | Get -*MachineTypesApi* | [**get_machine_type_live_utilization**](docs/MachineTypesApi.md#get_machine_type_live_utilization) | **GET** /v1/data-centers/{dataCenterId}/machine-types/{machineType}/live-utilization | Get -*MachineTypesApi* | [**list_machine_types**](docs/MachineTypesApi.md#list_machine_types) | **GET** /v1/data-centers/{dataCenterId}/machine-types | Get +*MachineTypesApi* | [**get_machine_type**](docs/MachineTypesApi.md#get_machine_type) | **GET** /v1/data-centers/{dataCenterId}/machine-types/{machineType} | Get a machine type in a data center +*MachineTypesApi* | [**get_machine_type_live_utilization**](docs/MachineTypesApi.md#get_machine_type_live_utilization) | **GET** /v1/data-centers/{dataCenterId}/machine-types/{machineType}/live-utilization | Get the utilization for a machine type in a data center +*MachineTypesApi* | [**list_machine_types**](docs/MachineTypesApi.md#list_machine_types) | **GET** /v1/data-centers/{dataCenterId}/machine-types | List machine types for a data center *NetworksApi* | [**create_network**](docs/NetworksApi.md#create_network) | **POST** /v1/projects/{projectId}/networks | Create network *NetworksApi* | [**create_security_group**](docs/NetworksApi.md#create_security_group) | **POST** /v1/projects/{securityGroup.projectId}/networks/security-groups | Create security group *NetworksApi* | [**delete_network**](docs/NetworksApi.md#delete_network) | **DELETE** /v1/projects/{projectId}/networks/{id} | Delete network @@ -121,15 +124,15 @@ Class | Method | HTTP request | Description *NetworksApi* | [**start_network**](docs/NetworksApi.md#start_network) | **POST** /v1/projects/{projectId}/networks/{id}/start | Start network *NetworksApi* | [**stop_network**](docs/NetworksApi.md#stop_network) | **POST** /v1/projects/{projectId}/networks/{id}/stop | Stop network *NetworksApi* | [**update_security_group**](docs/NetworksApi.md#update_security_group) | **PATCH** /v1/projects/{securityGroup.projectId}/networks/security-groups/{securityGroup.id} | Update security group -*ObjectStorageApi* | [**activate**](docs/ObjectStorageApi.md#activate) | **POST** /v1/projects/{projectId}/object-storage/activate | Allow the use of S3 compatible storage in a project -*ObjectStorageApi* | [**create_object_storage_user**](docs/ObjectStorageApi.md#create_object_storage_user) | **POST** /v1/projects/{projectId}/object-storage/users | Create user that stores keys for storage buckets -*ObjectStorageApi* | [**delete_object_storage_key**](docs/ObjectStorageApi.md#delete_object_storage_key) | **POST** /v1/projects/{projectId}/object-storage/users/{id}/keys | Delete object storage user -*ObjectStorageApi* | [**delete_object_storage_user**](docs/ObjectStorageApi.md#delete_object_storage_user) | **DELETE** /v1/projects/{projectId}/object-storage/users/{id} | Delete object storage user -*ObjectStorageApi* | [**generate_object_storage_key**](docs/ObjectStorageApi.md#generate_object_storage_key) | **POST** /v1/projects/{projectId}/object-storage/users/{id} | Generate access key for storage buckets -*ObjectStorageApi* | [**get_object_storage_bucket**](docs/ObjectStorageApi.md#get_object_storage_bucket) | **GET** /v1/projects/{projectId}/object-storage/buckets/{id} | Get details for a bucket -*ObjectStorageApi* | [**get_object_storage_session_key**](docs/ObjectStorageApi.md#get_object_storage_session_key) | **GET** /v1/projects/{projectId}/object-storage/session-key | Generate temporary key for storage bucket access +*ObjectStorageApi* | [**activate**](docs/ObjectStorageApi.md#activate) | **POST** /v1/projects/{projectId}/object-storage/activate/{dataCenterId} | Allow the use of S3 compatible storage in a project +*ObjectStorageApi* | [**create_object_storage_user**](docs/ObjectStorageApi.md#create_object_storage_user) | **POST** /v1/projects/{projectId}/object-storage/users/{dataCenterId} | Create user that stores keys for storage buckets +*ObjectStorageApi* | [**delete_object_storage_key**](docs/ObjectStorageApi.md#delete_object_storage_key) | **DELETE** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}/keys/{accessKey} | Delete object storage user key +*ObjectStorageApi* | [**delete_object_storage_user**](docs/ObjectStorageApi.md#delete_object_storage_user) | **DELETE** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id} | Delete object storage user +*ObjectStorageApi* | [**generate_object_storage_key**](docs/ObjectStorageApi.md#generate_object_storage_key) | **POST** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id} | Generate access key for storage buckets +*ObjectStorageApi* | [**get_object_storage_bucket**](docs/ObjectStorageApi.md#get_object_storage_bucket) | **GET** /v1/projects/{projectId}/object-storage/buckets/{dataCenterId}/{id} | Get details for a bucket +*ObjectStorageApi* | [**get_object_storage_session_key**](docs/ObjectStorageApi.md#get_object_storage_session_key) | **GET** /v1/projects/{projectId}/object-storage/session-key/{dataCenterId} | Generate temporary key for storage bucket access +*ObjectStorageApi* | [**get_object_storage_user**](docs/ObjectStorageApi.md#get_object_storage_user) | **GET** /v1/projects/{projectId}/object-storage/users/{dataCenterId}/{userId} | Get details about an object storage user *ObjectStorageApi* | [**list_object_storage_buckets**](docs/ObjectStorageApi.md#list_object_storage_buckets) | **GET** /v1/projects/{projectId}/object-storage/buckets | List buckets -*ObjectStorageApi* | [**list_object_storage_keys**](docs/ObjectStorageApi.md#list_object_storage_keys) | **GET** /v1/projects/{projectId}/object-storage/users/{id}/keys | List storage user keys *ObjectStorageApi* | [**list_object_storage_users**](docs/ObjectStorageApi.md#list_object_storage_users) | **GET** /v1/projects/{projectId}/object-storage/users | List storage users *PermissionsApi* | [**add_billing_account_user_permission**](docs/PermissionsApi.md#add_billing_account_user_permission) | **POST** /v1/billing-accounts/{billingAccountId}/add-user-permission | Add billing account user *PermissionsApi* | [**add_data_center_user_permission**](docs/PermissionsApi.md#add_data_center_user_permission) | **POST** /v1/data-centers/{dataCenterId}/add-user-permission | Add data center user @@ -165,7 +168,8 @@ Class | Method | HTTP request | Description *VirtualMachinesApi* | [**list_public_vm_images**](docs/VirtualMachinesApi.md#list_public_vm_images) | **GET** /v1/vms/public-images | List public VM images *VirtualMachinesApi* | [**list_vm_data_centers**](docs/VirtualMachinesApi.md#list_vm_data_centers) | **GET** /v1/vms/data-centers | List data centers *VirtualMachinesApi* | [**list_vm_disks**](docs/VirtualMachinesApi.md#list_vm_disks) | **GET** /v1/projects/{projectId}/vms/{id}/disks | List disks attached to VM -*VirtualMachinesApi* | [**list_vm_machine_types**](docs/VirtualMachinesApi.md#list_vm_machine_types) | **GET** /v1/vms/machine-types | List machine types +*VirtualMachinesApi* | [**list_vm_gpu_models**](docs/VirtualMachinesApi.md#list_vm_gpu_models) | **GET** /v1/vms/gpu-models | List GPU models +*VirtualMachinesApi* | [**list_vm_machine_types2**](docs/VirtualMachinesApi.md#list_vm_machine_types2) | **GET** /v1/vms/machine-types-2 | List machine types v2 *VirtualMachinesApi* | [**list_vms**](docs/VirtualMachinesApi.md#list_vms) | **GET** /v1/projects/{projectId}/vms | List *VirtualMachinesApi* | [**monitor_vm**](docs/VirtualMachinesApi.md#monitor_vm) | **GET** /v1/projects/{projectId}/vms/{id}/monitor | Monitor *VirtualMachinesApi* | [**reboot_vm**](docs/VirtualMachinesApi.md#reboot_vm) | **POST** /v1/projects/{projectId}/vms/{id}/reboot | Reboot @@ -176,6 +180,15 @@ Class | Method | HTTP request | Description *VirtualMachinesApi* | [**terminate_vm**](docs/VirtualMachinesApi.md#terminate_vm) | **POST** /v1/projects/{projectId}/vms/{id}/terminate | Terminate *VirtualMachinesApi* | [**update_private_vm_image**](docs/VirtualMachinesApi.md#update_private_vm_image) | **POST** /v1/projects/{projectId}/images/{id} | Update private VM image *VirtualMachinesApi* | [**update_vm_metadata**](docs/VirtualMachinesApi.md#update_vm_metadata) | **POST** /v1/projects/{projectId}/vm/{id}/metadata | Update VM metadata +*DefaultApi* | [**get_data_center_commitment_schedule**](docs/DefaultApi.md#get_data_center_commitment_schedule) | **GET** /v1/data-centers/{dataCenterId}/commitment-schedule | +*DefaultApi* | [**get_data_center_commitment_time_series**](docs/DefaultApi.md#get_data_center_commitment_time_series) | **GET** /v1/data-centers/{dataCenterId}/commitment-time-series | +*DefaultApi* | [**list_billing_account_projects**](docs/DefaultApi.md#list_billing_account_projects) | **GET** /v1/billing-accounts/{id}/projects | +*DefaultApi* | [**list_data_center_machine_type_prices**](docs/DefaultApi.md#list_data_center_machine_type_prices) | **GET** /v1/data-centers/{dataCenterId}/machine-type-prices | +*DefaultApi* | [**list_vm_machine_types**](docs/DefaultApi.md#list_vm_machine_types) | **GET** /v1/vms/machine-types | +*DefaultApi* | [**search_resources**](docs/DefaultApi.md#search_resources) | **GET** /v1/resources/search | +*DefaultApi* | [**track**](docs/DefaultApi.md#track) | **POST** /v1/auth/track | +*DefaultApi* | [**update_vm_expire_time**](docs/DefaultApi.md#update_vm_expire_time) | **POST** /v1/projects/{projectId}/vm/{id}/expire-time | +*DefaultApi* | [**update_vm_password**](docs/DefaultApi.md#update_vm_password) | **POST** /v1/projects/{projectId}/vm/{id}/password | ## Documentation For Models @@ -184,20 +197,26 @@ Class | Method | HTTP request | Description - [AddBillingAccountUserPermissionBody](docs/AddBillingAccountUserPermissionBody.md) - [AddDataCenterUserPermissionBody](docs/AddDataCenterUserPermissionBody.md) - [AddProjectUserPermissionBody](docs/AddProjectUserPermissionBody.md) - - [Any](docs/Any.md) - [ApiKey](docs/ApiKey.md) - [AttachSecurityGroupResponse](docs/AttachSecurityGroupResponse.md) - [AttachStorageDiskResponse](docs/AttachStorageDiskResponse.md) - [BillingAccount](docs/BillingAccount.md) - [BillingAccountPaymentMethod](docs/BillingAccountPaymentMethod.md) - [BillingAccountPaymentMethods](docs/BillingAccountPaymentMethods.md) + - [BillingAccountProject](docs/BillingAccountProject.md) + - [BillingAccountResult](docs/BillingAccountResult.md) - [BillingAccountSetupIntent](docs/BillingAccountSetupIntent.md) - [BillingAccountSpendRow](docs/BillingAccountSpendRow.md) + - [BillingAccountState](docs/BillingAccountState.md) + - [BillingAddress](docs/BillingAddress.md) + - [Charge](docs/Charge.md) - [Cluster](docs/Cluster.md) + - [CommitmentTerm](docs/CommitmentTerm.md) - [ConnectVMResponse](docs/ConnectVMResponse.md) - [CountHostsResponse](docs/CountHostsResponse.md) - [CountVMsResponse](docs/CountVMsResponse.md) - - [CpuModelCategory](docs/CpuModelCategory.md) + - [CpuTopology](docs/CpuTopology.md) + - [CreateBillingAccountCreditPaymentResponse](docs/CreateBillingAccountCreditPaymentResponse.md) - [CreateBillingAccountRequest](docs/CreateBillingAccountRequest.md) - [CreateDiskSnapshotBody](docs/CreateDiskSnapshotBody.md) - [CreateDiskSnapshotResponse](docs/CreateDiskSnapshotResponse.md) @@ -211,21 +230,23 @@ Class | Method | HTTP request | Description - [CreateVMBody](docs/CreateVMBody.md) - [CreateVMRequestNIC](docs/CreateVMRequestNIC.md) - [CreateVMResponse](docs/CreateVMResponse.md) - - [DataCenter](docs/DataCenter.md) - - [DataCenterCategory](docs/DataCenterCategory.md) + - [CreditBalanceRecharge](docs/CreditBalanceRecharge.md) + - [CreditBalanceTransaction](docs/CreditBalanceTransaction.md) + - [DataCenterCommitment](docs/DataCenterCommitment.md) + - [DataCenterCommitmentInterval](docs/DataCenterCommitmentInterval.md) + - [DataCenterMachineType](docs/DataCenterMachineType.md) - [DataCenterRevenueResource](docs/DataCenterRevenueResource.md) - [DataCenterTimeRevenue](docs/DataCenterTimeRevenue.md) - [Decimal](docs/Decimal.md) - [DeleteDiskSnapshotResponse](docs/DeleteDiskSnapshotResponse.md) - [DeleteNetworkResponse](docs/DeleteNetworkResponse.md) - - [DeleteObjectStorageKeyResponse](docs/DeleteObjectStorageKeyResponse.md) - - [DeleteObjectStorageUserResponse](docs/DeleteObjectStorageUserResponse.md) - [DeletePrivateVMImageResponse](docs/DeletePrivateVMImageResponse.md) - [DeleteSecurityGroupResponse](docs/DeleteSecurityGroupResponse.md) - [DeleteStorageDiskResponse](docs/DeleteStorageDiskResponse.md) - [DetachSecurityGroupResponse](docs/DetachSecurityGroupResponse.md) - [DetachStorageDiskResponse](docs/DetachStorageDiskResponse.md) - [Disk](docs/Disk.md) + - [DiskResult](docs/DiskResult.md) - [DiskState](docs/DiskState.md) - [DiskStorageClass](docs/DiskStorageClass.md) - [DiskStoragePriceHr](docs/DiskStoragePriceHr.md) @@ -233,9 +254,12 @@ Class | Method | HTTP request | Description - [GenerateApiKeyRequest](docs/GenerateApiKeyRequest.md) - [GetBillingAccountDetailsResponse](docs/GetBillingAccountDetailsResponse.md) - [GetBillingAccountSpendDetailsResponse](docs/GetBillingAccountSpendDetailsResponse.md) - - [GetBillingAccountStripeInvoicesResponse](docs/GetBillingAccountStripeInvoicesResponse.md) + - [GetDataCenterCommitmentScheduleResponse](docs/GetDataCenterCommitmentScheduleResponse.md) + - [GetDataCenterCommitmentTimeSeriesRequestInterval](docs/GetDataCenterCommitmentTimeSeriesRequestInterval.md) + - [GetDataCenterCommitmentTimeSeriesResponse](docs/GetDataCenterCommitmentTimeSeriesResponse.md) - [GetDataCenterLiveUtilizationResponse](docs/GetDataCenterLiveUtilizationResponse.md) - [GetDataCenterRevenueByResourceResponse](docs/GetDataCenterRevenueByResourceResponse.md) + - [GetDataCenterRevenueTimeSeriesRequestInterval](docs/GetDataCenterRevenueTimeSeriesRequestInterval.md) - [GetDataCenterRevenueTimeSeriesResponse](docs/GetDataCenterRevenueTimeSeriesResponse.md) - [GetDiskResponse](docs/GetDiskResponse.md) - [GetMachineTypeLiveUtilizationResponse](docs/GetMachineTypeLiveUtilizationResponse.md) @@ -243,18 +267,25 @@ Class | Method | HTTP request | Description - [GetNetworkResponse](docs/GetNetworkResponse.md) - [GetObjectStorageSessionKeyResponse](docs/GetObjectStorageSessionKeyResponse.md) - [GetPrivateVMImageResponse](docs/GetPrivateVMImageResponse.md) + - [GetResponse](docs/GetResponse.md) - [GetSecurityGroupResponse](docs/GetSecurityGroupResponse.md) - [GetVMResponse](docs/GetVMResponse.md) - - [GpuModelCategory](docs/GpuModelCategory.md) + - [GpuModel](docs/GpuModel.md) - [Host](docs/Host.md) - - [HostConfigCategory](docs/HostConfigCategory.md) - [IdentityVerificationSession](docs/IdentityVerificationSession.md) - [Image](docs/Image.md) - - [Interval](docs/Interval.md) + - [ImageResult](docs/ImageResult.md) - [Invoice](docs/Invoice.md) + - [LastPaymentError](docs/LastPaymentError.md) - [ListApiKeysResponse](docs/ListApiKeysResponse.md) + - [ListBillingAccountCreditBalanceTransactionsResponse](docs/ListBillingAccountCreditBalanceTransactionsResponse.md) + - [ListBillingAccountInvoicesResponse](docs/ListBillingAccountInvoicesResponse.md) + - [ListBillingAccountProjectsResponse](docs/ListBillingAccountProjectsResponse.md) + - [ListBillingAccountTransactionsResponse](docs/ListBillingAccountTransactionsResponse.md) - [ListBillingAccountsResponse](docs/ListBillingAccountsResponse.md) - [ListClustersResponse](docs/ListClustersResponse.md) + - [ListDataCenterMachineTypePricesResponse](docs/ListDataCenterMachineTypePricesResponse.md) + - [ListDataCenterMachineTypePricesResponseMachineTypePrice](docs/ListDataCenterMachineTypePricesResponseMachineTypePrice.md) - [ListDataCentersResponse](docs/ListDataCentersResponse.md) - [ListDiskSnapshotsResponse](docs/ListDiskSnapshotsResponse.md) - [ListDisksResponse](docs/ListDisksResponse.md) @@ -262,11 +293,9 @@ Class | Method | HTTP request | Description - [ListMachineTypesResponse](docs/ListMachineTypesResponse.md) - [ListNetworksResponse](docs/ListNetworksResponse.md) - [ListObjectStorageBucketsResponse](docs/ListObjectStorageBucketsResponse.md) - - [ListObjectStorageKeysResponse](docs/ListObjectStorageKeysResponse.md) - [ListObjectStorageUsersResponse](docs/ListObjectStorageUsersResponse.md) - - [ListOutstandingStripeInvoicesResponse](docs/ListOutstandingStripeInvoicesResponse.md) + - [ListOutstandingInvoicesResponse](docs/ListOutstandingInvoicesResponse.md) - [ListPrivateVMImagesResponse](docs/ListPrivateVMImagesResponse.md) - - [ListPrivateVMImagesResponsePrivateImage](docs/ListPrivateVMImagesResponsePrivateImage.md) - [ListProjectSshKeysResponse](docs/ListProjectSshKeysResponse.md) - [ListProjectsResponse](docs/ListProjectsResponse.md) - [ListPublicVMImagesResponse](docs/ListPublicVMImagesResponse.md) @@ -276,38 +305,52 @@ Class | Method | HTTP request | Description - [ListUserPermissionsResponse](docs/ListUserPermissionsResponse.md) - [ListVMDataCentersResponse](docs/ListVMDataCentersResponse.md) - [ListVMDisksResponse](docs/ListVMDisksResponse.md) - - [ListVMMachineTypesRequest](docs/ListVMMachineTypesRequest.md) + - [ListVMGpuModelsResponse](docs/ListVMGpuModelsResponse.md) + - [ListVMMachineTypes2Response](docs/ListVMMachineTypes2Response.md) + - [ListVMMachineTypes2ResponseVMMachineType](docs/ListVMMachineTypes2ResponseVMMachineType.md) - [ListVMMachineTypesResponse](docs/ListVMMachineTypesResponse.md) + - [ListVMMachineTypesResponseVMMachineType](docs/ListVMMachineTypesResponseVMMachineType.md) - [ListVMsResponse](docs/ListVMsResponse.md) - - [MachineType](docs/MachineType.md) - [MonitorVMResponse](docs/MonitorVMResponse.md) - [Network](docs/Network.md) - [NetworkPriceHr](docs/NetworkPriceHr.md) + - [NetworkResult](docs/NetworkResult.md) - [NetworkState](docs/NetworkState.md) - [ObjectStorageBucket](docs/ObjectStorageBucket.md) - [ObjectStorageKey](docs/ObjectStorageKey.md) - [ObjectStorageUser](docs/ObjectStorageUser.md) + - [Package](docs/Package.md) + - [PaymentIntent](docs/PaymentIntent.md) - [PaymentMethodCard](docs/PaymentMethodCard.md) - [PaymentMethodPaypal](docs/PaymentMethodPaypal.md) + - [PaymentTerms](docs/PaymentTerms.md) - [Point](docs/Point.md) + - [PrivateImage](docs/PrivateImage.md) - [Profile](docs/Profile.md) - [Project](docs/Project.md) - - [Protocol](docs/Protocol.md) + - [ProjectResult](docs/ProjectResult.md) + - [ProtobufAny](docs/ProtobufAny.md) - [RebootVMResponse](docs/RebootVMResponse.md) - [Region](docs/Region.md) + - [RegionDataCenter](docs/RegionDataCenter.md) - [RemoveBillingAccountPaymentMethodResponse](docs/RemoveBillingAccountPaymentMethodResponse.md) - [RemoveBillingAccountUserPermissionBody](docs/RemoveBillingAccountUserPermissionBody.md) - [RemoveDataCenterUserPermissionBody](docs/RemoveDataCenterUserPermissionBody.md) - [RemoveProjectUserPermissionBody](docs/RemoveProjectUserPermissionBody.md) - [ResizeVMDiskResponse](docs/ResizeVMDiskResponse.md) - [ResizeVMResponse](docs/ResizeVMResponse.md) + - [Result](docs/Result.md) - [RevertDiskResponse](docs/RevertDiskResponse.md) - [Role](docs/Role.md) - [Rule](docs/Rule.md) - - [RuleType](docs/RuleType.md) + - [RuleProtocol](docs/RuleProtocol.md) + - [RuleRuleType](docs/RuleRuleType.md) + - [SearchResourcesResponse](docs/SearchResourcesResponse.md) - [SecurityGroup](docs/SecurityGroup.md) - [SecurityGroup1](docs/SecurityGroup1.md) - [SecurityGroupRule](docs/SecurityGroupRule.md) + - [SecurityGroupRuleProtocol](docs/SecurityGroupRuleProtocol.md) + - [SecurityGroupRuleRuleType](docs/SecurityGroupRuleRuleType.md) - [SetBillingAccountDefaultPaymentMethodResponse](docs/SetBillingAccountDefaultPaymentMethodResponse.md) - [Snapshot](docs/Snapshot.md) - [SshKey](docs/SshKey.md) @@ -318,23 +361,43 @@ Class | Method | HTTP request | Description - [StopNetworkResponse](docs/StopNetworkResponse.md) - [StopVMResponse](docs/StopVMResponse.md) - [StripeCustomer](docs/StripeCustomer.md) + - [SyncResponse](docs/SyncResponse.md) + - [Task](docs/Task.md) - [TaxId](docs/TaxId.md) - [TerminateVMResponse](docs/TerminateVMResponse.md) + - [TrackRequest](docs/TrackRequest.md) + - [Transaction](docs/Transaction.md) - [Unit](docs/Unit.md) - [UpdateBillingAccountBody](docs/UpdateBillingAccountBody.md) + - [UpdateBillingAccountBodyBillingAccount](docs/UpdateBillingAccountBodyBillingAccount.md) + - [UpdateDataCenterBody](docs/UpdateDataCenterBody.md) + - [UpdateDataCenterBodyDataCenter](docs/UpdateDataCenterBodyDataCenter.md) + - [UpdateHostResponse](docs/UpdateHostResponse.md) + - [UpdateImageResponse](docs/UpdateImageResponse.md) + - [UpdateNetResponse](docs/UpdateNetResponse.md) - [UpdatePrivateVMImageResponse](docs/UpdatePrivateVMImageResponse.md) + - [UpdateProjectBody](docs/UpdateProjectBody.md) + - [UpdateProjectBodyProject](docs/UpdateProjectBodyProject.md) - [UpdateSecurityGroupResponse](docs/UpdateSecurityGroupResponse.md) + - [UpdateVMExpireTimeBody](docs/UpdateVMExpireTimeBody.md) + - [UpdateVMExpireTimeResponse](docs/UpdateVMExpireTimeResponse.md) - [UpdateVMMetadataBody](docs/UpdateVMMetadataBody.md) - [UpdateVMMetadataResponse](docs/UpdateVMMetadataResponse.md) + - [UpdateVMPasswordBody](docs/UpdateVMPasswordBody.md) + - [UpdateVMPasswordResponse](docs/UpdateVMPasswordResponse.md) + - [UpdateVMResponse](docs/UpdateVMResponse.md) - [UserPermission](docs/UserPermission.md) - - [V1PrivateImage](docs/V1PrivateImage.md) - - [V1billingaccountsbillingAccountIdBillingAccount](docs/V1billingaccountsbillingAccountIdBillingAccount.md) + - [V1DataCenter](docs/V1DataCenter.md) + - [V1VRouterSize](docs/V1VRouterSize.md) - [VM](docs/VM.md) - [VMDataCenter](docs/VMDataCenter.md) - [VMDataCenterStorageClass](docs/VMDataCenterStorageClass.md) + - [VMDataCenterVRouterSize](docs/VMDataCenterVRouterSize.md) + - [VMMachineTypeMachineTypePrice](docs/VMMachineTypeMachineTypePrice.md) - [VMMonitoringItem](docs/VMMonitoringItem.md) - [VMNIC](docs/VMNIC.md) - - [VRouterSize](docs/VRouterSize.md) + - [VMPrice](docs/VMPrice.md) + - [VirtualMachineResult](docs/VirtualMachineResult.md) - [VmState](docs/VmState.md) diff --git a/docs/RebootVMResponse.md b/docs/RebootVMResponse.md new file mode 100644 index 0000000..428957f --- /dev/null +++ b/docs/RebootVMResponse.md @@ -0,0 +1,9 @@ +# RebootVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Region.md b/docs/Region.md new file mode 100644 index 0000000..212ddd5 --- /dev/null +++ b/docs/Region.md @@ -0,0 +1,12 @@ +# Region + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**data_centers** | [**list[RegionDataCenter]**](RegionDataCenter.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/docs/RegionDataCenter.md b/docs/RegionDataCenter.md new file mode 100644 index 0000000..61745dd --- /dev/null +++ b/docs/RegionDataCenter.md @@ -0,0 +1,10 @@ +# RegionDataCenter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [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/docs/RemoveBillingAccountPaymentMethodResponse.md b/docs/RemoveBillingAccountPaymentMethodResponse.md new file mode 100644 index 0000000..d8f4c6f --- /dev/null +++ b/docs/RemoveBillingAccountPaymentMethodResponse.md @@ -0,0 +1,11 @@ +# RemoveBillingAccountPaymentMethodResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**payment_method_id** | **str** | | + +[[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/docs/RemoveBillingAccountUserPermissionBody.md b/docs/RemoveBillingAccountUserPermissionBody.md new file mode 100644 index 0000000..0614f2f --- /dev/null +++ b/docs/RemoveBillingAccountUserPermissionBody.md @@ -0,0 +1,13 @@ +# RemoveBillingAccountUserPermissionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**user_id** | **str** | | +**role** | [**Role**](Role.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/docs/RemoveDataCenterUserPermissionBody.md b/docs/RemoveDataCenterUserPermissionBody.md new file mode 100644 index 0000000..6ae2f0d --- /dev/null +++ b/docs/RemoveDataCenterUserPermissionBody.md @@ -0,0 +1,13 @@ +# RemoveDataCenterUserPermissionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**billing_account_id** | **str** | | [optional] +**user_id** | **str** | | +**role** | [**Role**](Role.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/docs/RemoveProjectUserPermissionBody.md b/docs/RemoveProjectUserPermissionBody.md new file mode 100644 index 0000000..3fb819b --- /dev/null +++ b/docs/RemoveProjectUserPermissionBody.md @@ -0,0 +1,13 @@ +# RemoveProjectUserPermissionBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | [optional] +**billing_account_id** | **str** | | [optional] +**user_id** | **str** | | +**role** | [**Role**](Role.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/docs/ResizeVMDiskResponse.md b/docs/ResizeVMDiskResponse.md new file mode 100644 index 0000000..00f0510 --- /dev/null +++ b/docs/ResizeVMDiskResponse.md @@ -0,0 +1,9 @@ +# ResizeVMDiskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/ResizeVMResponse.md b/docs/ResizeVMResponse.md new file mode 100644 index 0000000..c357e70 --- /dev/null +++ b/docs/ResizeVMResponse.md @@ -0,0 +1,10 @@ +# ResizeVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vm** | [**VM**](VM.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/docs/Result.md b/docs/Result.md new file mode 100644 index 0000000..bf83698 --- /dev/null +++ b/docs/Result.md @@ -0,0 +1,18 @@ +# Result + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_type** | **str** | | [optional] +**resource_name** | **str** | | [optional] +**score** | **float** | | [optional] +**billing_account** | [**BillingAccountResult**](BillingAccountResult.md) | | [optional] +**project** | [**ProjectResult**](ProjectResult.md) | | [optional] +**virtual_machine** | [**VirtualMachineResult**](VirtualMachineResult.md) | | [optional] +**disk** | [**DiskResult**](DiskResult.md) | | [optional] +**image** | [**ImageResult**](ImageResult.md) | | [optional] +**network** | [**NetworkResult**](NetworkResult.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/docs/RevertDiskResponse.md b/docs/RevertDiskResponse.md new file mode 100644 index 0000000..db92534 --- /dev/null +++ b/docs/RevertDiskResponse.md @@ -0,0 +1,9 @@ +# RevertDiskResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Role.md b/docs/Role.md new file mode 100644 index 0000000..c88b208 --- /dev/null +++ b/docs/Role.md @@ -0,0 +1,9 @@ +# Role + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Rule.md b/docs/Rule.md new file mode 100644 index 0000000..736db15 --- /dev/null +++ b/docs/Rule.md @@ -0,0 +1,15 @@ +# Rule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**protocol** | [**RuleProtocol**](RuleProtocol.md) | | [optional] +**ports** | **str** | | [optional] +**rule_type** | [**RuleRuleType**](RuleRuleType.md) | | [optional] +**ip_range_cidr** | **str** | | [optional] +**icmp_type** | **str** | | [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/docs/RuleProtocol.md b/docs/RuleProtocol.md new file mode 100644 index 0000000..b80cd58 --- /dev/null +++ b/docs/RuleProtocol.md @@ -0,0 +1,9 @@ +# RuleProtocol + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/RuleRuleType.md b/docs/RuleRuleType.md new file mode 100644 index 0000000..cb91cc6 --- /dev/null +++ b/docs/RuleRuleType.md @@ -0,0 +1,9 @@ +# RuleRuleType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/SSHKeysApi.md b/docs/SSHKeysApi.md new file mode 100644 index 0000000..1ef65fc --- /dev/null +++ b/docs/SSHKeysApi.md @@ -0,0 +1,198 @@ +# src.cudo_compute.SSHKeysApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_ssh_key**](SSHKeysApi.md#create_ssh_key) | **POST** /v1/ssh-keys | Create +[**delete_ssh_key**](SSHKeysApi.md#delete_ssh_key) | **DELETE** /v1/ssh-keys/{id} | Delete +[**get_ssh_key**](SSHKeysApi.md#get_ssh_key) | **GET** /v1/ssh-keys/{id} | Get +[**list_ssh_keys**](SSHKeysApi.md#list_ssh_keys) | **GET** /v1/ssh-keys | List + + +# **create_ssh_key** +> SshKey create_ssh_key(ssh_key) + +Create + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.SSHKeysApi() +ssh_key = src.cudo_compute.SshKey() # SshKey | + +try: + # Create + api_response = api_instance.create_ssh_key(ssh_key) + pprint(api_response) +except ApiException as e: + print("Exception when calling SSHKeysApi->create_ssh_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ssh_key** | [**SshKey**](SshKey.md)| | + +### Return type + +[**SshKey**](SshKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_ssh_key** +> object delete_ssh_key(id) + +Delete + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.SSHKeysApi() +id = 'id_example' # str | + +try: + # Delete + api_response = api_instance.delete_ssh_key(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling SSHKeysApi->delete_ssh_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_ssh_key** +> SshKey get_ssh_key(id) + +Get + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.SSHKeysApi() +id = 'id_example' # str | + +try: + # Get + api_response = api_instance.get_ssh_key(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling SSHKeysApi->get_ssh_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +[**SshKey**](SshKey.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_ssh_keys** +> ListSshKeysResponse list_ssh_keys(page_number=page_number, page_size=page_size) + +List + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.SSHKeysApi() +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) + +try: + # List + api_response = api_instance.list_ssh_keys(page_number=page_number, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling SSHKeysApi->list_ssh_keys: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListSshKeysResponse**](ListSshKeysResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/SearchApi.md b/docs/SearchApi.md new file mode 100644 index 0000000..105a44c --- /dev/null +++ b/docs/SearchApi.md @@ -0,0 +1,51 @@ +# src.cudo_compute.SearchApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_regions**](SearchApi.md#list_regions) | **GET** /v1/regions | Regions + + +# **list_regions** +> ListRegionsResponse list_regions() + +Regions + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.SearchApi() + +try: + # Regions + api_response = api_instance.list_regions() + pprint(api_response) +except ApiException as e: + print("Exception when calling SearchApi->list_regions: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListRegionsResponse**](ListRegionsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/SearchResourcesResponse.md b/docs/SearchResourcesResponse.md new file mode 100644 index 0000000..869d860 --- /dev/null +++ b/docs/SearchResourcesResponse.md @@ -0,0 +1,10 @@ +# SearchResourcesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**list[Result]**](Result.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/docs/SecurityGroup.md b/docs/SecurityGroup.md new file mode 100644 index 0000000..cf26a1b --- /dev/null +++ b/docs/SecurityGroup.md @@ -0,0 +1,13 @@ +# SecurityGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | +**id** | **str** | | +**description** | **str** | | [optional] +**rules** | [**list[Rule]**](Rule.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/docs/SecurityGroup1.md b/docs/SecurityGroup1.md new file mode 100644 index 0000000..a5dc515 --- /dev/null +++ b/docs/SecurityGroup1.md @@ -0,0 +1,12 @@ +# SecurityGroup1 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center_id** | **str** | | +**description** | **str** | | [optional] +**rules** | [**list[Rule]**](Rule.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/docs/SecurityGroupRule.md b/docs/SecurityGroupRule.md new file mode 100644 index 0000000..61eb8a3 --- /dev/null +++ b/docs/SecurityGroupRule.md @@ -0,0 +1,15 @@ +# SecurityGroupRule + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**protocol** | [**SecurityGroupRuleProtocol**](SecurityGroupRuleProtocol.md) | | [optional] +**ports** | **str** | | [optional] +**rule_type** | [**SecurityGroupRuleRuleType**](SecurityGroupRuleRuleType.md) | | [optional] +**ip_range_cidr** | **str** | | [optional] +**icmp_type** | **str** | | [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/docs/SecurityGroupRuleProtocol.md b/docs/SecurityGroupRuleProtocol.md new file mode 100644 index 0000000..c44bca2 --- /dev/null +++ b/docs/SecurityGroupRuleProtocol.md @@ -0,0 +1,9 @@ +# SecurityGroupRuleProtocol + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/SecurityGroupRuleRuleType.md b/docs/SecurityGroupRuleRuleType.md new file mode 100644 index 0000000..d8a7a08 --- /dev/null +++ b/docs/SecurityGroupRuleRuleType.md @@ -0,0 +1,9 @@ +# SecurityGroupRuleRuleType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/SetBillingAccountDefaultPaymentMethodResponse.md b/docs/SetBillingAccountDefaultPaymentMethodResponse.md new file mode 100644 index 0000000..00aa020 --- /dev/null +++ b/docs/SetBillingAccountDefaultPaymentMethodResponse.md @@ -0,0 +1,11 @@ +# SetBillingAccountDefaultPaymentMethodResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**payment_method_id** | **str** | | + +[[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/docs/Snapshot.md b/docs/Snapshot.md new file mode 100644 index 0000000..b840293 --- /dev/null +++ b/docs/Snapshot.md @@ -0,0 +1,13 @@ +# Snapshot + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**active** | **bool** | | [optional] +**size_gib** | **int** | | [optional] +**create_time** | **datetime** | | [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/docs/SshKey.md b/docs/SshKey.md new file mode 100644 index 0000000..4894153 --- /dev/null +++ b/docs/SshKey.md @@ -0,0 +1,15 @@ +# SshKey + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**create_time** | **datetime** | | [optional] +**public_key** | **str** | | +**fingerprint** | **str** | | [optional] +**type** | **str** | | [optional] +**comment** | **str** | | [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/docs/SshKeySource.md b/docs/SshKeySource.md new file mode 100644 index 0000000..13640f2 --- /dev/null +++ b/docs/SshKeySource.md @@ -0,0 +1,9 @@ +# SshKeySource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/StartNetworkResponse.md b/docs/StartNetworkResponse.md new file mode 100644 index 0000000..31a23a3 --- /dev/null +++ b/docs/StartNetworkResponse.md @@ -0,0 +1,9 @@ +# StartNetworkResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/StartVMResponse.md b/docs/StartVMResponse.md new file mode 100644 index 0000000..331c929 --- /dev/null +++ b/docs/StartVMResponse.md @@ -0,0 +1,9 @@ +# StartVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Status.md b/docs/Status.md new file mode 100644 index 0000000..8ec6b78 --- /dev/null +++ b/docs/Status.md @@ -0,0 +1,12 @@ +# Status + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**message** | **str** | | [optional] +**details** | [**list[ProtobufAny]**](ProtobufAny.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/docs/StopNetworkResponse.md b/docs/StopNetworkResponse.md new file mode 100644 index 0000000..1880cd2 --- /dev/null +++ b/docs/StopNetworkResponse.md @@ -0,0 +1,9 @@ +# StopNetworkResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/StopVMResponse.md b/docs/StopVMResponse.md new file mode 100644 index 0000000..b52b70c --- /dev/null +++ b/docs/StopVMResponse.md @@ -0,0 +1,9 @@ +# StopVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/StripeCustomer.md b/docs/StripeCustomer.md new file mode 100644 index 0000000..271ee5c --- /dev/null +++ b/docs/StripeCustomer.md @@ -0,0 +1,13 @@ +# StripeCustomer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**email** | **str** | | [optional] +**balance** | [**Decimal**](Decimal.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/docs/SyncResponse.md b/docs/SyncResponse.md new file mode 100644 index 0000000..96e4411 --- /dev/null +++ b/docs/SyncResponse.md @@ -0,0 +1,9 @@ +# SyncResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/Task.md b/docs/Task.md new file mode 100644 index 0000000..990eefe --- /dev/null +++ b/docs/Task.md @@ -0,0 +1,12 @@ +# Task + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_name** | **str** | | [optional] +**percent_complete** | **int** | | [optional] +**project_id** | **str** | | [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/docs/TaxId.md b/docs/TaxId.md new file mode 100644 index 0000000..1855e9e --- /dev/null +++ b/docs/TaxId.md @@ -0,0 +1,12 @@ +# TaxId + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | [optional] +**value** | **str** | | [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/docs/TerminateVMResponse.md b/docs/TerminateVMResponse.md new file mode 100644 index 0000000..c667ef9 --- /dev/null +++ b/docs/TerminateVMResponse.md @@ -0,0 +1,9 @@ +# TerminateVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/TrackRequest.md b/docs/TrackRequest.md new file mode 100644 index 0000000..69a095b --- /dev/null +++ b/docs/TrackRequest.md @@ -0,0 +1,10 @@ +# TrackRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_id** | **str** | | [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/docs/Transaction.md b/docs/Transaction.md new file mode 100644 index 0000000..452a6e8 --- /dev/null +++ b/docs/Transaction.md @@ -0,0 +1,17 @@ +# Transaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**amount** | [**Decimal**](Decimal.md) | | +**description** | **str** | | +**create_time** | **datetime** | | +**status** | **str** | | +**succeeded** | **bool** | | +**latest_charge** | [**Charge**](Charge.md) | | +**last_payment_error** | [**LastPaymentError**](LastPaymentError.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/docs/Unit.md b/docs/Unit.md new file mode 100644 index 0000000..3de99a1 --- /dev/null +++ b/docs/Unit.md @@ -0,0 +1,9 @@ +# Unit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UpdateBillingAccountBody.md b/docs/UpdateBillingAccountBody.md new file mode 100644 index 0000000..5e28136 --- /dev/null +++ b/docs/UpdateBillingAccountBody.md @@ -0,0 +1,11 @@ +# UpdateBillingAccountBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_account** | [**UpdateBillingAccountBodyBillingAccount**](UpdateBillingAccountBodyBillingAccount.md) | | [optional] +**update_mask** | **str** | | + +[[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/docs/UpdateBillingAccountBodyBillingAccount.md b/docs/UpdateBillingAccountBodyBillingAccount.md new file mode 100644 index 0000000..e39bd8a --- /dev/null +++ b/docs/UpdateBillingAccountBodyBillingAccount.md @@ -0,0 +1,26 @@ +# UpdateBillingAccountBodyBillingAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**create_time** | **datetime** | | [optional] +**display_name** | **str** | | [optional] +**stripe_ref** | **str** | | [optional] +**create_by** | **str** | | [optional] +**monthly_spend** | **str** | | [optional] +**hourly_spend_rate** | [**Decimal**](Decimal.md) | | [optional] +**tax_id** | [**TaxId**](TaxId.md) | | [optional] +**invoice_time** | **datetime** | | [optional] +**billing_threshold** | [**Decimal**](Decimal.md) | | [optional] +**monthly_spend_limit** | [**Decimal**](Decimal.md) | | [optional] +**hourly_spend_limit** | [**Decimal**](Decimal.md) | | [optional] +**next_invoice_total** | [**Decimal**](Decimal.md) | | [optional] +**credit_balance** | [**Decimal**](Decimal.md) | | [optional] +**credit_balance_recharge** | [**CreditBalanceRecharge**](CreditBalanceRecharge.md) | | [optional] +**billing_address** | [**BillingAddress**](BillingAddress.md) | | [optional] +**state** | [**BillingAccountState**](BillingAccountState.md) | | [optional] +**payment_terms** | [**PaymentTerms**](PaymentTerms.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/docs/UpdateDataCenterBody.md b/docs/UpdateDataCenterBody.md new file mode 100644 index 0000000..f4c9eeb --- /dev/null +++ b/docs/UpdateDataCenterBody.md @@ -0,0 +1,11 @@ +# UpdateDataCenterBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_center** | [**UpdateDataCenterBodyDataCenter**](UpdateDataCenterBodyDataCenter.md) | | [optional] +**update_mask** | **str** | | [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/docs/UpdateDataCenterBodyDataCenter.md b/docs/UpdateDataCenterBodyDataCenter.md new file mode 100644 index 0000000..908b58d --- /dev/null +++ b/docs/UpdateDataCenterBodyDataCenter.md @@ -0,0 +1,16 @@ +# UpdateDataCenterBodyDataCenter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**region_id** | **str** | | [optional] +**supplier_name** | **str** | | [optional] +**renewable_energy** | **bool** | | [optional] +**lng_lat** | [**Point**](Point.md) | | [optional] +**create_by** | **str** | | [optional] +**one_frontend_id** | **str** | | [optional] +**s3_endpoint** | **str** | | [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/docs/UpdateHostResponse.md b/docs/UpdateHostResponse.md new file mode 100644 index 0000000..ea6dd20 --- /dev/null +++ b/docs/UpdateHostResponse.md @@ -0,0 +1,9 @@ +# UpdateHostResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UpdateImageResponse.md b/docs/UpdateImageResponse.md new file mode 100644 index 0000000..555bb51 --- /dev/null +++ b/docs/UpdateImageResponse.md @@ -0,0 +1,9 @@ +# UpdateImageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UpdateNetResponse.md b/docs/UpdateNetResponse.md new file mode 100644 index 0000000..6dc71a9 --- /dev/null +++ b/docs/UpdateNetResponse.md @@ -0,0 +1,9 @@ +# UpdateNetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UpdatePrivateVMImageResponse.md b/docs/UpdatePrivateVMImageResponse.md new file mode 100644 index 0000000..0994dae --- /dev/null +++ b/docs/UpdatePrivateVMImageResponse.md @@ -0,0 +1,9 @@ +# UpdatePrivateVMImageResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UpdateProjectBody.md b/docs/UpdateProjectBody.md new file mode 100644 index 0000000..05b7642 --- /dev/null +++ b/docs/UpdateProjectBody.md @@ -0,0 +1,11 @@ +# UpdateProjectBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project** | [**UpdateProjectBodyProject**](UpdateProjectBodyProject.md) | | [optional] +**update_mask** | **str** | | [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/docs/UpdateProjectBodyProject.md b/docs/UpdateProjectBodyProject.md new file mode 100644 index 0000000..9db843d --- /dev/null +++ b/docs/UpdateProjectBodyProject.md @@ -0,0 +1,12 @@ +# UpdateProjectBodyProject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_account_id** | **str** | | [optional] +**resource_count** | **int** | | [optional] +**create_by** | **str** | | [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/docs/UpdateSecurityGroupResponse.md b/docs/UpdateSecurityGroupResponse.md new file mode 100644 index 0000000..5bc2f54 --- /dev/null +++ b/docs/UpdateSecurityGroupResponse.md @@ -0,0 +1,10 @@ +# UpdateSecurityGroupResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**security_group** | [**SecurityGroup**](SecurityGroup.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/docs/UpdateVMExpireTimeBody.md b/docs/UpdateVMExpireTimeBody.md new file mode 100644 index 0000000..239ba07 --- /dev/null +++ b/docs/UpdateVMExpireTimeBody.md @@ -0,0 +1,11 @@ +# UpdateVMExpireTimeBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expire_time** | **datetime** | | [optional] +**ttl** | **str** | | [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/docs/UpdateVMExpireTimeResponse.md b/docs/UpdateVMExpireTimeResponse.md new file mode 100644 index 0000000..e8cf389 --- /dev/null +++ b/docs/UpdateVMExpireTimeResponse.md @@ -0,0 +1,10 @@ +# UpdateVMExpireTimeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**expire_time** | **datetime** | | [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/docs/UpdateVMMetadataBody.md b/docs/UpdateVMMetadataBody.md new file mode 100644 index 0000000..da810dd --- /dev/null +++ b/docs/UpdateVMMetadataBody.md @@ -0,0 +1,11 @@ +# UpdateVMMetadataBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **dict(str, str)** | | [optional] +**merge** | **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/docs/UpdateVMMetadataResponse.md b/docs/UpdateVMMetadataResponse.md new file mode 100644 index 0000000..c7bde2f --- /dev/null +++ b/docs/UpdateVMMetadataResponse.md @@ -0,0 +1,10 @@ +# UpdateVMMetadataResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **dict(str, str)** | | [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/docs/UpdateVMPasswordBody.md b/docs/UpdateVMPasswordBody.md new file mode 100644 index 0000000..5d13982 --- /dev/null +++ b/docs/UpdateVMPasswordBody.md @@ -0,0 +1,10 @@ +# UpdateVMPasswordBody + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | | + +[[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/docs/UpdateVMPasswordResponse.md b/docs/UpdateVMPasswordResponse.md new file mode 100644 index 0000000..9015ffb --- /dev/null +++ b/docs/UpdateVMPasswordResponse.md @@ -0,0 +1,9 @@ +# UpdateVMPasswordResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UpdateVMResponse.md b/docs/UpdateVMResponse.md new file mode 100644 index 0000000..216e78f --- /dev/null +++ b/docs/UpdateVMResponse.md @@ -0,0 +1,9 @@ +# UpdateVMResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..d19cd23 --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,141 @@ +# src.cudo_compute.UserApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_identity_verification_session**](UserApi.md#create_identity_verification_session) | **GET** /v1/auth/create-identity-verification-session | Get identity verification session +[**delete_user**](UserApi.md#delete_user) | **DELETE** /v1/auth | Delete +[**get**](UserApi.md#get) | **GET** /v1/auth | Get + + +# **create_identity_verification_session** +> IdentityVerificationSession create_identity_verification_session() + +Get identity verification session + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.UserApi() + +try: + # Get identity verification session + api_response = api_instance.create_identity_verification_session() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->create_identity_verification_session: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**IdentityVerificationSession**](IdentityVerificationSession.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_user** +> object delete_user() + +Delete + +Deletes your user, deleting all records of your user, and revoking access to every resource. + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.UserApi() + +try: + # Delete + api_response = api_instance.delete_user() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->delete_user: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**object** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get** +> Profile get() + +Get + +Responds with details of the user when suitable authentication material is sent with the request. + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.UserApi() + +try: + # Get + api_response = api_instance.get() + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->get: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**Profile**](Profile.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/UserPermission.md b/docs/UserPermission.md new file mode 100644 index 0000000..5653654 --- /dev/null +++ b/docs/UserPermission.md @@ -0,0 +1,14 @@ +# UserPermission + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **str** | | +**user_email** | **str** | | +**user_picture** | **str** | | +**role** | **str** | | +**permission_role** | [**Role**](Role.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/docs/V1DataCenter.md b/docs/V1DataCenter.md new file mode 100644 index 0000000..57b205b --- /dev/null +++ b/docs/V1DataCenter.md @@ -0,0 +1,17 @@ +# V1DataCenter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**region_id** | **str** | | [optional] +**supplier_name** | **str** | | [optional] +**renewable_energy** | **bool** | | [optional] +**lng_lat** | [**Point**](Point.md) | | [optional] +**create_by** | **str** | | [optional] +**one_frontend_id** | **str** | | +**s3_endpoint** | **str** | | + +[[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/docs/V1VRouterSize.md b/docs/V1VRouterSize.md new file mode 100644 index 0000000..abdd598 --- /dev/null +++ b/docs/V1VRouterSize.md @@ -0,0 +1,9 @@ +# V1VRouterSize + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/VM.md b/docs/VM.md new file mode 100644 index 0000000..b8e0567 --- /dev/null +++ b/docs/VM.md @@ -0,0 +1,44 @@ +# VM + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**datacenter_id** | **str** | | [optional] +**machine_type** | **str** | | [optional] +**region_id** | **str** | | [optional] +**region_name** | **str** | | [optional] +**id** | **str** | | [optional] +**external_ip_address** | **str** | | [optional] +**internal_ip_address** | **str** | | [optional] +**public_ip_address** | **str** | | [optional] +**memory** | **int** | | [optional] +**cpu_model** | **str** | | [optional] +**vcpus** | **int** | | [optional] +**gpu_model** | **str** | | [optional] +**gpu_model_id** | **str** | | [optional] +**gpu_quantity** | **int** | | [optional] +**boot_disk_size_gib** | **int** | | [optional] +**renewable_energy** | **bool** | | [optional] +**image_id** | **str** | | [optional] +**public_image_id** | **str** | | [optional] +**public_image_name** | **str** | | [optional] +**private_image_id** | **str** | | [optional] +**image_name** | **str** | | [optional] +**create_by** | **str** | | [optional] +**nics** | [**list[VMNIC]**](VMNIC.md) | | [optional] +**rules** | [**list[SecurityGroupRule]**](SecurityGroupRule.md) | | [optional] +**security_group_ids** | **list[str]** | | [optional] +**short_state** | **str** | | [optional] +**boot_disk** | [**Disk**](Disk.md) | | [optional] +**storage_disks** | [**list[Disk]**](Disk.md) | | [optional] +**metadata** | **dict(str, str)** | | [optional] +**state** | [**VmState**](VmState.md) | | [optional] +**create_time** | **datetime** | | [optional] +**expire_time** | **datetime** | | [optional] +**price** | [**VMPrice**](VMPrice.md) | | +**commitment_term** | [**CommitmentTerm**](CommitmentTerm.md) | | +**commitment_end_time** | **datetime** | | + +[[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/docs/VMDataCenter.md b/docs/VMDataCenter.md new file mode 100644 index 0000000..2128802 --- /dev/null +++ b/docs/VMDataCenter.md @@ -0,0 +1,17 @@ +# VMDataCenter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**region_id** | **str** | | +**supplier_name** | **str** | | +**renewable_energy** | **bool** | | +**disk_pool_pricing** | [**list[DiskStoragePriceHr]**](DiskStoragePriceHr.md) | | [optional] +**network_pricing** | [**list[NetworkPriceHr]**](NetworkPriceHr.md) | | [optional] +**ipv4_price_hr** | [**Decimal**](Decimal.md) | | [optional] +**ipv4_free** | **int** | | + +[[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/docs/VMDataCenterStorageClass.md b/docs/VMDataCenterStorageClass.md new file mode 100644 index 0000000..80060cf --- /dev/null +++ b/docs/VMDataCenterStorageClass.md @@ -0,0 +1,9 @@ +# VMDataCenterStorageClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/VMDataCenterVRouterSize.md b/docs/VMDataCenterVRouterSize.md new file mode 100644 index 0000000..395bb1c --- /dev/null +++ b/docs/VMDataCenterVRouterSize.md @@ -0,0 +1,9 @@ +# VMDataCenterVRouterSize + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/VMMachineTypeMachineTypePrice.md b/docs/VMMachineTypeMachineTypePrice.md new file mode 100644 index 0000000..0e465c6 --- /dev/null +++ b/docs/VMMachineTypeMachineTypePrice.md @@ -0,0 +1,13 @@ +# VMMachineTypeMachineTypePrice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**commitment_term** | [**CommitmentTerm**](CommitmentTerm.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/docs/VMMonitoringItem.md b/docs/VMMonitoringItem.md new file mode 100644 index 0000000..ecbc943 --- /dev/null +++ b/docs/VMMonitoringItem.md @@ -0,0 +1,18 @@ +# VMMonitoringItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu** | **float** | | [optional] +**disk_rd_bytes** | **str** | | [optional] +**disk_rd_iops** | **str** | | [optional] +**disk_wr_bytes** | **str** | | [optional] +**disk_wr_iops** | **str** | | [optional] +**memory** | **str** | | [optional] +**net_rx** | **str** | | [optional] +**net_tx** | **str** | | [optional] +**timestamp** | **str** | | [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/docs/VMNIC.md b/docs/VMNIC.md new file mode 100644 index 0000000..0442d3d --- /dev/null +++ b/docs/VMNIC.md @@ -0,0 +1,14 @@ +# VMNIC + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**network_id** | **str** | | [optional] +**external_ip_address** | **str** | | [optional] +**internal_ip_address** | **str** | | [optional] +**network_address** | **str** | | [optional] +**security_group_ids** | **list[str]** | | [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/docs/VMPrice.md b/docs/VMPrice.md new file mode 100644 index 0000000..f23b66a --- /dev/null +++ b/docs/VMPrice.md @@ -0,0 +1,19 @@ +# VMPrice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**total_vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**total_memory_price_hr** | [**Decimal**](Decimal.md) | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**total_gpu_price_hr** | [**Decimal**](Decimal.md) | | +**storage_gib_price_hr** | [**Decimal**](Decimal.md) | | +**total_storage_price_hr** | [**Decimal**](Decimal.md) | | +**ipv4_address_price_hr** | [**Decimal**](Decimal.md) | | +**total_price_hr** | [**Decimal**](Decimal.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/docs/VirtualMachineResult.md b/docs/VirtualMachineResult.md new file mode 100644 index 0000000..ba327c9 --- /dev/null +++ b/docs/VirtualMachineResult.md @@ -0,0 +1,21 @@ +# VirtualMachineResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **str** | | [optional] +**id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] +**gpu_model_id** | **str** | | [optional] +**gpus** | **int** | | [optional] +**vcpus** | **int** | | [optional] +**memory_gib** | **int** | | [optional] +**boot_disk_size_gib** | **int** | | [optional] +**boot_disk_public_image_id** | **str** | | [optional] +**boot_disk_private_image_id** | **str** | | [optional] +**state** | [**VmState**](VmState.md) | | [optional] +**create_time** | **datetime** | | [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/docs/VirtualMachinesApi.md b/docs/VirtualMachinesApi.md new file mode 100644 index 0000000..a233139 --- /dev/null +++ b/docs/VirtualMachinesApi.md @@ -0,0 +1,1237 @@ +# src.cudo_compute.VirtualMachinesApi + +All URIs are relative to *https://rest.compute.cudo.org* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**attach_security_group**](VirtualMachinesApi.md#attach_security_group) | **PATCH** /v1/projects/{projectId}/vm/{id}/security-group/attach | Attach security group to VM +[**connect_vm**](VirtualMachinesApi.md#connect_vm) | **GET** /v1/projects/{projectId}/vms/{id}/connect | Connect via VNC +[**count_vms**](VirtualMachinesApi.md#count_vms) | **GET** /v1/projects/{projectId}/count-vms | Count +[**create_private_vm_image**](VirtualMachinesApi.md#create_private_vm_image) | **POST** /v1/projects/{projectId}/images | Create private VM image +[**create_vm**](VirtualMachinesApi.md#create_vm) | **POST** /v1/projects/{projectId}/vm | Create virtual machine +[**delete_private_vm_image**](VirtualMachinesApi.md#delete_private_vm_image) | **DELETE** /v1/projects/{projectId}/images/{id} | Delete private VM image +[**detach_security_group**](VirtualMachinesApi.md#detach_security_group) | **PATCH** /v1/projects/{projectId}/vm/{id}/security-group/detach | Attach security group to VM +[**get_private_vm_image**](VirtualMachinesApi.md#get_private_vm_image) | **GET** /v1/projects/{projectId}/images/{id} | Get private VM image +[**get_vm**](VirtualMachinesApi.md#get_vm) | **GET** /v1/projects/{projectId}/vms/{id} | Get +[**list_private_vm_images**](VirtualMachinesApi.md#list_private_vm_images) | **GET** /v1/projects/{projectId}/images | List private VM images +[**list_public_vm_images**](VirtualMachinesApi.md#list_public_vm_images) | **GET** /v1/vms/public-images | List public VM images +[**list_vm_data_centers**](VirtualMachinesApi.md#list_vm_data_centers) | **GET** /v1/vms/data-centers | List data centers +[**list_vm_disks**](VirtualMachinesApi.md#list_vm_disks) | **GET** /v1/projects/{projectId}/vms/{id}/disks | List disks attached to VM +[**list_vm_gpu_models**](VirtualMachinesApi.md#list_vm_gpu_models) | **GET** /v1/vms/gpu-models | List GPU models +[**list_vm_machine_types2**](VirtualMachinesApi.md#list_vm_machine_types2) | **GET** /v1/vms/machine-types-2 | List machine types v2 +[**list_vms**](VirtualMachinesApi.md#list_vms) | **GET** /v1/projects/{projectId}/vms | List +[**monitor_vm**](VirtualMachinesApi.md#monitor_vm) | **GET** /v1/projects/{projectId}/vms/{id}/monitor | Monitor +[**reboot_vm**](VirtualMachinesApi.md#reboot_vm) | **POST** /v1/projects/{projectId}/vms/{id}/reboot | Reboot +[**resize_vm**](VirtualMachinesApi.md#resize_vm) | **POST** /v1/projects/{projectId}/vms/{id}/resize | Resize vCPU and memory of VM +[**resize_vm_disk**](VirtualMachinesApi.md#resize_vm_disk) | **PATCH** /v1/projects/{projectId}/vms/{id}/disks | Resize a VM's disk +[**start_vm**](VirtualMachinesApi.md#start_vm) | **POST** /v1/projects/{projectId}/vms/{id}/start | Start +[**stop_vm**](VirtualMachinesApi.md#stop_vm) | **POST** /v1/projects/{projectId}/vms/{id}/stop | Stop +[**terminate_vm**](VirtualMachinesApi.md#terminate_vm) | **POST** /v1/projects/{projectId}/vms/{id}/terminate | Terminate +[**update_private_vm_image**](VirtualMachinesApi.md#update_private_vm_image) | **POST** /v1/projects/{projectId}/images/{id} | Update private VM image +[**update_vm_metadata**](VirtualMachinesApi.md#update_vm_metadata) | **POST** /v1/projects/{projectId}/vm/{id}/metadata | Update VM metadata + + +# **attach_security_group** +> AttachSecurityGroupResponse attach_security_group(project_id, id, security_group_id=security_group_id) + +Attach security group to VM + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +security_group_id = 'security_group_id_example' # str | (optional) + +try: + # Attach security group to VM + api_response = api_instance.attach_security_group(project_id, id, security_group_id=security_group_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->attach_security_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **security_group_id** | **str**| | [optional] + +### Return type + +[**AttachSecurityGroupResponse**](AttachSecurityGroupResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **connect_vm** +> ConnectVMResponse connect_vm(project_id, id, connection_id=connection_id) + +Connect via VNC + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +connection_id = 'connection_id_example' # str | (optional) + +try: + # Connect via VNC + api_response = api_instance.connect_vm(project_id, id, connection_id=connection_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->connect_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **connection_id** | **str**| | [optional] + +### Return type + +[**ConnectVMResponse**](ConnectVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **count_vms** +> CountVMsResponse count_vms(project_id) + +Count + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | + +try: + # Count + api_response = api_instance.count_vms(project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->count_vms: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + +### Return type + +[**CountVMsResponse**](CountVMsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_private_vm_image** +> CreatePrivateVMImageResponse create_private_vm_image(project_id, vm_id, id, description=description) + +Create private VM image + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +vm_id = 'vm_id_example' # str | +id = 'id_example' # str | +description = 'description_example' # str | (optional) + +try: + # Create private VM image + api_response = api_instance.create_private_vm_image(project_id, vm_id, id, description=description) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->create_private_vm_image: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **vm_id** | **str**| | + **id** | **str**| | + **description** | **str**| | [optional] + +### Return type + +[**CreatePrivateVMImageResponse**](CreatePrivateVMImageResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **create_vm** +> CreateVMResponse create_vm(project_id, create_vm_body) + +Create virtual machine + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +create_vm_body = src.cudo_compute.CreateVMBody() # CreateVMBody | + +try: + # Create virtual machine + api_response = api_instance.create_vm(project_id, create_vm_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->create_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **create_vm_body** | [**CreateVMBody**](CreateVMBody.md)| | + +### Return type + +[**CreateVMResponse**](CreateVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **delete_private_vm_image** +> DeletePrivateVMImageResponse delete_private_vm_image(project_id, id) + +Delete private VM image + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Delete private VM image + api_response = api_instance.delete_private_vm_image(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->delete_private_vm_image: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**DeletePrivateVMImageResponse**](DeletePrivateVMImageResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **detach_security_group** +> DetachSecurityGroupResponse detach_security_group(project_id, id, security_group_id=security_group_id) + +Attach security group to VM + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +security_group_id = 'security_group_id_example' # str | (optional) + +try: + # Attach security group to VM + api_response = api_instance.detach_security_group(project_id, id, security_group_id=security_group_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->detach_security_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **security_group_id** | **str**| | [optional] + +### Return type + +[**DetachSecurityGroupResponse**](DetachSecurityGroupResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_private_vm_image** +> GetPrivateVMImageResponse get_private_vm_image(project_id, id) + +Get private VM image + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Get private VM image + api_response = api_instance.get_private_vm_image(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->get_private_vm_image: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**GetPrivateVMImageResponse**](GetPrivateVMImageResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **get_vm** +> GetVMResponse get_vm(project_id, id) + +Get + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Get + api_response = api_instance.get_vm(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->get_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**GetVMResponse**](GetVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_private_vm_images** +> ListPrivateVMImagesResponse list_private_vm_images(project_id, page_number=page_number, page_size=page_size) + +List private VM images + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +page_number = 56 # int | (optional) +page_size = 56 # int | (optional) + +try: + # List private VM images + api_response = api_instance.list_private_vm_images(project_id, page_number=page_number, page_size=page_size) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->list_private_vm_images: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **page_number** | **int**| | [optional] + **page_size** | **int**| | [optional] + +### Return type + +[**ListPrivateVMImagesResponse**](ListPrivateVMImagesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_public_vm_images** +> ListPublicVMImagesResponse list_public_vm_images() + +List public VM images + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() + +try: + # List public VM images + api_response = api_instance.list_public_vm_images() + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->list_public_vm_images: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListPublicVMImagesResponse**](ListPublicVMImagesResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_vm_data_centers** +> ListVMDataCentersResponse list_vm_data_centers(region_id=region_id, renewable_energy=renewable_energy) + +List data centers + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +region_id = ['region_id_example'] # list[str] | (optional) +renewable_energy = true # bool | (optional) + +try: + # List data centers + api_response = api_instance.list_vm_data_centers(region_id=region_id, renewable_energy=renewable_energy) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->list_vm_data_centers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **region_id** | [**list[str]**](str.md)| | [optional] + **renewable_energy** | **bool**| | [optional] + +### Return type + +[**ListVMDataCentersResponse**](ListVMDataCentersResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_vm_disks** +> ListVMDisksResponse list_vm_disks(project_id, id) + +List disks attached to VM + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # List disks attached to VM + api_response = api_instance.list_vm_disks(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->list_vm_disks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**ListVMDisksResponse**](ListVMDisksResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_vm_gpu_models** +> ListVMGpuModelsResponse list_vm_gpu_models() + +List GPU models + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() + +try: + # List GPU models + api_response = api_instance.list_vm_gpu_models() + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->list_vm_gpu_models: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListVMGpuModelsResponse**](ListVMGpuModelsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_vm_machine_types2** +> ListVMMachineTypes2Response list_vm_machine_types2() + +List machine types v2 + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() + +try: + # List machine types v2 + api_response = api_instance.list_vm_machine_types2() + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->list_vm_machine_types2: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListVMMachineTypes2Response**](ListVMMachineTypes2Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **list_vms** +> ListVMsResponse list_vms(project_id, network_id=network_id) + +List + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +network_id = 'network_id_example' # str | (optional) + +try: + # List + api_response = api_instance.list_vms(project_id, network_id=network_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->list_vms: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **network_id** | **str**| | [optional] + +### Return type + +[**ListVMsResponse**](ListVMsResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **monitor_vm** +> MonitorVMResponse monitor_vm(project_id, id) + +Monitor + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Monitor + api_response = api_instance.monitor_vm(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->monitor_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**MonitorVMResponse**](MonitorVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **reboot_vm** +> RebootVMResponse reboot_vm(project_id, id) + +Reboot + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Reboot + api_response = api_instance.reboot_vm(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->reboot_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**RebootVMResponse**](RebootVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **resize_vm** +> ResizeVMResponse resize_vm(project_id, id, vcpus=vcpus, memory_gib=memory_gib) + +Resize vCPU and memory of VM + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +vcpus = 789 # int | (optional) +memory_gib = 789 # int | (optional) + +try: + # Resize vCPU and memory of VM + api_response = api_instance.resize_vm(project_id, id, vcpus=vcpus, memory_gib=memory_gib) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->resize_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **vcpus** | **int**| | [optional] + **memory_gib** | **int**| | [optional] + +### Return type + +[**ResizeVMResponse**](ResizeVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **resize_vm_disk** +> ResizeVMDiskResponse resize_vm_disk(project_id, id, disk_id=disk_id, size_gib=size_gib) + +Resize a VM's disk + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +disk_id = 'disk_id_example' # str | (optional) +size_gib = 56 # int | (optional) + +try: + # Resize a VM's disk + api_response = api_instance.resize_vm_disk(project_id, id, disk_id=disk_id, size_gib=size_gib) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->resize_vm_disk: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **disk_id** | **str**| | [optional] + **size_gib** | **int**| | [optional] + +### Return type + +[**ResizeVMDiskResponse**](ResizeVMDiskResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **start_vm** +> StartVMResponse start_vm(project_id, id) + +Start + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Start + api_response = api_instance.start_vm(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->start_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**StartVMResponse**](StartVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **stop_vm** +> StopVMResponse stop_vm(project_id, id) + +Stop + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Stop + api_response = api_instance.stop_vm(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->stop_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**StopVMResponse**](StopVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **terminate_vm** +> TerminateVMResponse terminate_vm(project_id, id) + +Terminate + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | + +try: + # Terminate + api_response = api_instance.terminate_vm(project_id, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->terminate_vm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + +### Return type + +[**TerminateVMResponse**](TerminateVMResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_private_vm_image** +> UpdatePrivateVMImageResponse update_private_vm_image(project_id, id, description=description) + +Update private VM image + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +description = 'description_example' # str | (optional) + +try: + # Update private VM image + api_response = api_instance.update_private_vm_image(project_id, id, description=description) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->update_private_vm_image: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **description** | **str**| | [optional] + +### Return type + +[**UpdatePrivateVMImageResponse**](UpdatePrivateVMImageResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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) + +# **update_vm_metadata** +> UpdateVMMetadataResponse update_vm_metadata(project_id, id, update_vm_metadata_body) + +Update VM metadata + +### Example +```python +from __future__ import print_function +import time +import src.cudo_compute +from src.cudo_compute.rest import ApiException +from pprint import pprint + +# create an instance of the API class +api_instance = src.cudo_compute.VirtualMachinesApi() +project_id = 'project_id_example' # str | +id = 'id_example' # str | +update_vm_metadata_body = src.cudo_compute.UpdateVMMetadataBody() # UpdateVMMetadataBody | + +try: + # Update VM metadata + api_response = api_instance.update_vm_metadata(project_id, id, update_vm_metadata_body) + pprint(api_response) +except ApiException as e: + print("Exception when calling VirtualMachinesApi->update_vm_metadata: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| | + **id** | **str**| | + **update_vm_metadata_body** | [**UpdateVMMetadataBody**](UpdateVMMetadataBody.md)| | + +### Return type + +[**UpdateVMMetadataResponse**](UpdateVMMetadataResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/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/docs/VmState.md b/docs/VmState.md new file mode 100644 index 0000000..aa063a0 --- /dev/null +++ b/docs/VmState.md @@ -0,0 +1,9 @@ +# VmState + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/docs/cudo_compute/__init__.py b/docs/cudo_compute/__init__.py new file mode 100644 index 0000000..933a413 --- /dev/null +++ b/docs/cudo_compute/__init__.py @@ -0,0 +1,243 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from src.cudo_compute.api.api_keys_api import APIKeysApi +from src.cudo_compute.api.billing_api import BillingApi +from src.cudo_compute.api.data_centers_api import DataCentersApi +from src.cudo_compute.api.disks_api import DisksApi +from src.cudo_compute.api.machine_types_api import MachineTypesApi +from src.cudo_compute.api.networks_api import NetworksApi +from src.cudo_compute.api.object_storage_api import ObjectStorageApi +from src.cudo_compute.api.permissions_api import PermissionsApi +from src.cudo_compute.api.projects_api import ProjectsApi +from src.cudo_compute.api.ssh_keys_api import SSHKeysApi +from src.cudo_compute.api.search_api import SearchApi +from src.cudo_compute.api.user_api import UserApi +from src.cudo_compute.api.virtual_machines_api import VirtualMachinesApi +from src.cudo_compute.api.default_api import DefaultApi + +# import ApiClient +from src.cudo_compute.api_client import ApiClient +from src.cudo_compute.configuration import Configuration +# import models into sdk package +from src.cudo_compute.models.activate_body import ActivateBody +from src.cudo_compute.models.add_billing_account_user_permission_body import AddBillingAccountUserPermissionBody +from src.cudo_compute.models.add_data_center_user_permission_body import AddDataCenterUserPermissionBody +from src.cudo_compute.models.add_project_user_permission_body import AddProjectUserPermissionBody +from src.cudo_compute.models.api_key import ApiKey +from src.cudo_compute.models.attach_security_group_response import AttachSecurityGroupResponse +from src.cudo_compute.models.attach_storage_disk_response import AttachStorageDiskResponse +from src.cudo_compute.models.billing_account import BillingAccount +from src.cudo_compute.models.billing_account_payment_method import BillingAccountPaymentMethod +from src.cudo_compute.models.billing_account_payment_methods import BillingAccountPaymentMethods +from src.cudo_compute.models.billing_account_project import BillingAccountProject +from src.cudo_compute.models.billing_account_result import BillingAccountResult +from src.cudo_compute.models.billing_account_setup_intent import BillingAccountSetupIntent +from src.cudo_compute.models.billing_account_spend_row import BillingAccountSpendRow +from src.cudo_compute.models.billing_account_state import BillingAccountState +from src.cudo_compute.models.billing_address import BillingAddress +from src.cudo_compute.models.charge import Charge +from src.cudo_compute.models.cluster import Cluster +from src.cudo_compute.models.commitment_term import CommitmentTerm +from src.cudo_compute.models.connect_vm_response import ConnectVMResponse +from src.cudo_compute.models.count_hosts_response import CountHostsResponse +from src.cudo_compute.models.count_vms_response import CountVMsResponse +from src.cudo_compute.models.cpu_topology import CpuTopology +from src.cudo_compute.models.create_billing_account_credit_payment_response import CreateBillingAccountCreditPaymentResponse +from src.cudo_compute.models.create_billing_account_request import CreateBillingAccountRequest +from src.cudo_compute.models.create_disk_snapshot_body import CreateDiskSnapshotBody +from src.cudo_compute.models.create_disk_snapshot_response import CreateDiskSnapshotResponse +from src.cudo_compute.models.create_network_body import CreateNetworkBody +from src.cudo_compute.models.create_network_response import CreateNetworkResponse +from src.cudo_compute.models.create_object_storage_user_body import CreateObjectStorageUserBody +from src.cudo_compute.models.create_private_vm_image_response import CreatePrivateVMImageResponse +from src.cudo_compute.models.create_security_group_response import CreateSecurityGroupResponse +from src.cudo_compute.models.create_storage_disk_body import CreateStorageDiskBody +from src.cudo_compute.models.create_storage_disk_response import CreateStorageDiskResponse +from src.cudo_compute.models.create_vm_body import CreateVMBody +from src.cudo_compute.models.create_vm_request_nic import CreateVMRequestNIC +from src.cudo_compute.models.create_vm_response import CreateVMResponse +from src.cudo_compute.models.credit_balance_recharge import CreditBalanceRecharge +from src.cudo_compute.models.credit_balance_transaction import CreditBalanceTransaction +from src.cudo_compute.models.data_center_commitment import DataCenterCommitment +from src.cudo_compute.models.data_center_commitment_interval import DataCenterCommitmentInterval +from src.cudo_compute.models.data_center_machine_type import DataCenterMachineType +from src.cudo_compute.models.data_center_revenue_resource import DataCenterRevenueResource +from src.cudo_compute.models.data_center_time_revenue import DataCenterTimeRevenue +from src.cudo_compute.models.decimal import Decimal +from src.cudo_compute.models.delete_disk_snapshot_response import DeleteDiskSnapshotResponse +from src.cudo_compute.models.delete_network_response import DeleteNetworkResponse +from src.cudo_compute.models.delete_private_vm_image_response import DeletePrivateVMImageResponse +from src.cudo_compute.models.delete_security_group_response import DeleteSecurityGroupResponse +from src.cudo_compute.models.delete_storage_disk_response import DeleteStorageDiskResponse +from src.cudo_compute.models.detach_security_group_response import DetachSecurityGroupResponse +from src.cudo_compute.models.detach_storage_disk_response import DetachStorageDiskResponse +from src.cudo_compute.models.disk import Disk +from src.cudo_compute.models.disk_result import DiskResult +from src.cudo_compute.models.disk_state import DiskState +from src.cudo_compute.models.disk_storage_class import DiskStorageClass +from src.cudo_compute.models.disk_storage_price_hr import DiskStoragePriceHr +from src.cudo_compute.models.disk_type import DiskType +from src.cudo_compute.models.generate_api_key_request import GenerateApiKeyRequest +from src.cudo_compute.models.get_billing_account_details_response import GetBillingAccountDetailsResponse +from src.cudo_compute.models.get_billing_account_spend_details_response import GetBillingAccountSpendDetailsResponse +from src.cudo_compute.models.get_data_center_commitment_schedule_response import GetDataCenterCommitmentScheduleResponse +from src.cudo_compute.models.get_data_center_commitment_time_series_request_interval import GetDataCenterCommitmentTimeSeriesRequestInterval +from src.cudo_compute.models.get_data_center_commitment_time_series_response import GetDataCenterCommitmentTimeSeriesResponse +from src.cudo_compute.models.get_data_center_live_utilization_response import GetDataCenterLiveUtilizationResponse +from src.cudo_compute.models.get_data_center_revenue_by_resource_response import GetDataCenterRevenueByResourceResponse +from src.cudo_compute.models.get_data_center_revenue_time_series_request_interval import GetDataCenterRevenueTimeSeriesRequestInterval +from src.cudo_compute.models.get_data_center_revenue_time_series_response import GetDataCenterRevenueTimeSeriesResponse +from src.cudo_compute.models.get_disk_response import GetDiskResponse +from src.cudo_compute.models.get_machine_type_live_utilization_response import GetMachineTypeLiveUtilizationResponse +from src.cudo_compute.models.get_machine_type_response import GetMachineTypeResponse +from src.cudo_compute.models.get_network_response import GetNetworkResponse +from src.cudo_compute.models.get_object_storage_session_key_response import GetObjectStorageSessionKeyResponse +from src.cudo_compute.models.get_private_vm_image_response import GetPrivateVMImageResponse +from src.cudo_compute.models.get_response import GetResponse +from src.cudo_compute.models.get_security_group_response import GetSecurityGroupResponse +from src.cudo_compute.models.get_vm_response import GetVMResponse +from src.cudo_compute.models.gpu_model import GpuModel +from src.cudo_compute.models.host import Host +from src.cudo_compute.models.identity_verification_session import IdentityVerificationSession +from src.cudo_compute.models.image import Image +from src.cudo_compute.models.image_result import ImageResult +from src.cudo_compute.models.invoice import Invoice +from src.cudo_compute.models.last_payment_error import LastPaymentError +from src.cudo_compute.models.list_api_keys_response import ListApiKeysResponse +from src.cudo_compute.models.list_billing_account_credit_balance_transactions_response import ListBillingAccountCreditBalanceTransactionsResponse +from src.cudo_compute.models.list_billing_account_invoices_response import ListBillingAccountInvoicesResponse +from src.cudo_compute.models.list_billing_account_projects_response import ListBillingAccountProjectsResponse +from src.cudo_compute.models.list_billing_account_transactions_response import ListBillingAccountTransactionsResponse +from src.cudo_compute.models.list_billing_accounts_response import ListBillingAccountsResponse +from src.cudo_compute.models.list_clusters_response import ListClustersResponse +from src.cudo_compute.models.list_data_center_machine_type_prices_response import ListDataCenterMachineTypePricesResponse +from src.cudo_compute.models.list_data_center_machine_type_prices_response_machine_type_price import ListDataCenterMachineTypePricesResponseMachineTypePrice +from src.cudo_compute.models.list_data_centers_response import ListDataCentersResponse +from src.cudo_compute.models.list_disk_snapshots_response import ListDiskSnapshotsResponse +from src.cudo_compute.models.list_disks_response import ListDisksResponse +from src.cudo_compute.models.list_hosts_response import ListHostsResponse +from src.cudo_compute.models.list_machine_types_response import ListMachineTypesResponse +from src.cudo_compute.models.list_networks_response import ListNetworksResponse +from src.cudo_compute.models.list_object_storage_buckets_response import ListObjectStorageBucketsResponse +from src.cudo_compute.models.list_object_storage_users_response import ListObjectStorageUsersResponse +from src.cudo_compute.models.list_outstanding_invoices_response import ListOutstandingInvoicesResponse +from src.cudo_compute.models.list_private_vm_images_response import ListPrivateVMImagesResponse +from src.cudo_compute.models.list_project_ssh_keys_response import ListProjectSshKeysResponse +from src.cudo_compute.models.list_projects_response import ListProjectsResponse +from src.cudo_compute.models.list_public_vm_images_response import ListPublicVMImagesResponse +from src.cudo_compute.models.list_regions_response import ListRegionsResponse +from src.cudo_compute.models.list_security_groups_response import ListSecurityGroupsResponse +from src.cudo_compute.models.list_ssh_keys_response import ListSshKeysResponse +from src.cudo_compute.models.list_user_permissions_response import ListUserPermissionsResponse +from src.cudo_compute.models.list_vm_data_centers_response import ListVMDataCentersResponse +from src.cudo_compute.models.list_vm_disks_response import ListVMDisksResponse +from src.cudo_compute.models.list_vm_gpu_models_response import ListVMGpuModelsResponse +from src.cudo_compute.models.list_vm_machine_types2_response import ListVMMachineTypes2Response +from src.cudo_compute.models.list_vm_machine_types2_response_vm_machine_type import ListVMMachineTypes2ResponseVMMachineType +from src.cudo_compute.models.list_vm_machine_types_response import ListVMMachineTypesResponse +from src.cudo_compute.models.list_vm_machine_types_response_vm_machine_type import ListVMMachineTypesResponseVMMachineType +from src.cudo_compute.models.list_vms_response import ListVMsResponse +from src.cudo_compute.models.monitor_vm_response import MonitorVMResponse +from src.cudo_compute.models.network import Network +from src.cudo_compute.models.network_price_hr import NetworkPriceHr +from src.cudo_compute.models.network_result import NetworkResult +from src.cudo_compute.models.network_state import NetworkState +from src.cudo_compute.models.object_storage_bucket import ObjectStorageBucket +from src.cudo_compute.models.object_storage_key import ObjectStorageKey +from src.cudo_compute.models.object_storage_user import ObjectStorageUser +from src.cudo_compute.models.package import Package +from src.cudo_compute.models.payment_intent import PaymentIntent +from src.cudo_compute.models.payment_method_card import PaymentMethodCard +from src.cudo_compute.models.payment_method_paypal import PaymentMethodPaypal +from src.cudo_compute.models.payment_terms import PaymentTerms +from src.cudo_compute.models.point import Point +from src.cudo_compute.models.private_image import PrivateImage +from src.cudo_compute.models.profile import Profile +from src.cudo_compute.models.project import Project +from src.cudo_compute.models.project_result import ProjectResult +from src.cudo_compute.models.protobuf_any import ProtobufAny +from src.cudo_compute.models.reboot_vm_response import RebootVMResponse +from src.cudo_compute.models.region import Region +from src.cudo_compute.models.region_data_center import RegionDataCenter +from src.cudo_compute.models.remove_billing_account_payment_method_response import RemoveBillingAccountPaymentMethodResponse +from src.cudo_compute.models.remove_billing_account_user_permission_body import RemoveBillingAccountUserPermissionBody +from src.cudo_compute.models.remove_data_center_user_permission_body import RemoveDataCenterUserPermissionBody +from src.cudo_compute.models.remove_project_user_permission_body import RemoveProjectUserPermissionBody +from src.cudo_compute.models.resize_vm_disk_response import ResizeVMDiskResponse +from src.cudo_compute.models.resize_vm_response import ResizeVMResponse +from src.cudo_compute.models.result import Result +from src.cudo_compute.models.revert_disk_response import RevertDiskResponse +from src.cudo_compute.models.role import Role +from src.cudo_compute.models.rule import Rule +from src.cudo_compute.models.rule_protocol import RuleProtocol +from src.cudo_compute.models.rule_rule_type import RuleRuleType +from src.cudo_compute.models.search_resources_response import SearchResourcesResponse +from src.cudo_compute.models.security_group import SecurityGroup +from src.cudo_compute.models.security_group1 import SecurityGroup1 +from src.cudo_compute.models.security_group_rule import SecurityGroupRule +from src.cudo_compute.models.security_group_rule_protocol import SecurityGroupRuleProtocol +from src.cudo_compute.models.security_group_rule_rule_type import SecurityGroupRuleRuleType +from src.cudo_compute.models.set_billing_account_default_payment_method_response import SetBillingAccountDefaultPaymentMethodResponse +from src.cudo_compute.models.snapshot import Snapshot +from src.cudo_compute.models.ssh_key import SshKey +from src.cudo_compute.models.ssh_key_source import SshKeySource +from src.cudo_compute.models.start_network_response import StartNetworkResponse +from src.cudo_compute.models.start_vm_response import StartVMResponse +from src.cudo_compute.models.status import Status +from src.cudo_compute.models.stop_network_response import StopNetworkResponse +from src.cudo_compute.models.stop_vm_response import StopVMResponse +from src.cudo_compute.models.stripe_customer import StripeCustomer +from src.cudo_compute.models.sync_response import SyncResponse +from src.cudo_compute.models.task import Task +from src.cudo_compute.models.tax_id import TaxId +from src.cudo_compute.models.terminate_vm_response import TerminateVMResponse +from src.cudo_compute.models.track_request import TrackRequest +from src.cudo_compute.models.transaction import Transaction +from src.cudo_compute.models.unit import Unit +from src.cudo_compute.models.update_billing_account_body import UpdateBillingAccountBody +from src.cudo_compute.models.update_billing_account_body_billing_account import UpdateBillingAccountBodyBillingAccount +from src.cudo_compute.models.update_data_center_body import UpdateDataCenterBody +from src.cudo_compute.models.update_data_center_body_data_center import UpdateDataCenterBodyDataCenter +from src.cudo_compute.models.update_host_response import UpdateHostResponse +from src.cudo_compute.models.update_image_response import UpdateImageResponse +from src.cudo_compute.models.update_net_response import UpdateNetResponse +from src.cudo_compute.models.update_private_vm_image_response import UpdatePrivateVMImageResponse +from src.cudo_compute.models.update_project_body import UpdateProjectBody +from src.cudo_compute.models.update_project_body_project import UpdateProjectBodyProject +from src.cudo_compute.models.update_security_group_response import UpdateSecurityGroupResponse +from src.cudo_compute.models.update_vm_expire_time_body import UpdateVMExpireTimeBody +from src.cudo_compute.models.update_vm_expire_time_response import UpdateVMExpireTimeResponse +from src.cudo_compute.models.update_vm_metadata_body import UpdateVMMetadataBody +from src.cudo_compute.models.update_vm_metadata_response import UpdateVMMetadataResponse +from src.cudo_compute.models.update_vm_password_body import UpdateVMPasswordBody +from src.cudo_compute.models.update_vm_password_response import UpdateVMPasswordResponse +from src.cudo_compute.models.update_vm_response import UpdateVMResponse +from src.cudo_compute.models.user_permission import UserPermission +from src.cudo_compute.models.v1_data_center import V1DataCenter +from src.cudo_compute.models.v1_v_router_size import V1VRouterSize +from src.cudo_compute.models.vm import VM +from src.cudo_compute.models.vm_data_center import VMDataCenter +from src.cudo_compute.models.vm_data_center_storage_class import VMDataCenterStorageClass +from src.cudo_compute.models.vm_data_center_v_router_size import VMDataCenterVRouterSize +from src.cudo_compute.models.vm_machine_type_machine_type_price import VMMachineTypeMachineTypePrice +from src.cudo_compute.models.vm_monitoring_item import VMMonitoringItem +from src.cudo_compute.models.vmnic import VMNIC +from src.cudo_compute.models.vm_price import VMPrice +from src.cudo_compute.models.virtual_machine_result import VirtualMachineResult +from src.cudo_compute.models.vm_state import VmState diff --git a/docs/cudo_compute/api/__init__.py b/docs/cudo_compute/api/__init__.py new file mode 100644 index 0000000..fb930c0 --- /dev/null +++ b/docs/cudo_compute/api/__init__.py @@ -0,0 +1,19 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from src.cudo_compute.api.api_keys_api import APIKeysApi +from src.cudo_compute.api.billing_api import BillingApi +from src.cudo_compute.api.data_centers_api import DataCentersApi +from src.cudo_compute.api.disks_api import DisksApi +from src.cudo_compute.api.machine_types_api import MachineTypesApi +from src.cudo_compute.api.networks_api import NetworksApi +from src.cudo_compute.api.object_storage_api import ObjectStorageApi +from src.cudo_compute.api.permissions_api import PermissionsApi +from src.cudo_compute.api.projects_api import ProjectsApi +from src.cudo_compute.api.ssh_keys_api import SSHKeysApi +from src.cudo_compute.api.search_api import SearchApi +from src.cudo_compute.api.user_api import UserApi +from src.cudo_compute.api.virtual_machines_api import VirtualMachinesApi +from src.cudo_compute.api.default_api import DefaultApi diff --git a/docs/cudo_compute/api/api_keys_api.py b/docs/cudo_compute/api/api_keys_api.py new file mode 100644 index 0000000..c33fce9 --- /dev/null +++ b/docs/cudo_compute/api/api_keys_api.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class APIKeysApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_api_key(self, name, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + Deletes an API key, revoking all access for requests that use the key. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_api_key(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_api_key_with_http_info(name, **kwargs) # noqa: E501 + else: + (data) = self.delete_api_key_with_http_info(name, **kwargs) # noqa: E501 + return data + + def delete_api_key_with_http_info(self, name, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + Deletes an API key, revoking all access for requests that use the key. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_api_key_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str name: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_api_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in params or + params['name'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `name` when calling `delete_api_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/api-keys/{name}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_api_key(self, generate_api_key_body, **kwargs): # noqa: E501 + """Generate # noqa: E501 + + Creates a new API key for the requesting user. The API key is returned in the response, and this is the only time it can be viewed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_api_key(generate_api_key_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateApiKeyRequest generate_api_key_body: (required) + :return: ApiKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_api_key_with_http_info(generate_api_key_body, **kwargs) # noqa: E501 + else: + (data) = self.generate_api_key_with_http_info(generate_api_key_body, **kwargs) # noqa: E501 + return data + + def generate_api_key_with_http_info(self, generate_api_key_body, **kwargs): # noqa: E501 + """Generate # noqa: E501 + + Creates a new API key for the requesting user. The API key is returned in the response, and this is the only time it can be viewed. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_api_key_with_http_info(generate_api_key_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GenerateApiKeyRequest generate_api_key_body: (required) + :return: ApiKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['generate_api_key_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_api_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'generate_api_key_body' is set + if self.api_client.client_side_validation and ('generate_api_key_body' not in params or + params['generate_api_key_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `generate_api_key_body` when calling `generate_api_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'generate_api_key_body' in params: + body_params = params['generate_api_key_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/api-keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ApiKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_api_keys(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + List the details of all API keys created by the requesting user. This does not include the API key itself which is only visible once when the API key is created. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_api_keys(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_number: + :param int page_size: + :return: ListApiKeysResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_api_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_api_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def list_api_keys_with_http_info(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + List the details of all API keys created by the requesting user. This does not include the API key itself which is only visible once when the API key is created. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_api_keys_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_number: + :param int page_size: + :return: ListApiKeysResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_number', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_api_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/api-keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListApiKeysResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/billing_api.py b/docs/cudo_compute/api/billing_api.py new file mode 100644 index 0000000..43de409 --- /dev/null +++ b/docs/cudo_compute/api/billing_api.py @@ -0,0 +1,1662 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class BillingApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_billing_account(self, create_billing_account_body, **kwargs): # noqa: E501 + """Create a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_billing_account(create_billing_account_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateBillingAccountRequest create_billing_account_body: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_billing_account_with_http_info(create_billing_account_body, **kwargs) # noqa: E501 + else: + (data) = self.create_billing_account_with_http_info(create_billing_account_body, **kwargs) # noqa: E501 + return data + + def create_billing_account_with_http_info(self, create_billing_account_body, **kwargs): # noqa: E501 + """Create a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_billing_account_with_http_info(create_billing_account_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateBillingAccountRequest create_billing_account_body: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['create_billing_account_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_billing_account" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'create_billing_account_body' is set + if self.api_client.client_side_validation and ('create_billing_account_body' not in params or + params['create_billing_account_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_billing_account_body` when calling `create_billing_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_billing_account_body' in params: + body_params = params['create_billing_account_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BillingAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_billing_account_credit_payment(self, id, payment_method, **kwargs): # noqa: E501 + """Add credit to billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_billing_account_credit_payment(id, payment_method, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str payment_method: (required) + :param str amount_value: The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. + :param str radar_session_id: + :return: CreateBillingAccountCreditPaymentResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_billing_account_credit_payment_with_http_info(id, payment_method, **kwargs) # noqa: E501 + else: + (data) = self.create_billing_account_credit_payment_with_http_info(id, payment_method, **kwargs) # noqa: E501 + return data + + def create_billing_account_credit_payment_with_http_info(self, id, payment_method, **kwargs): # noqa: E501 + """Add credit to billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_billing_account_credit_payment_with_http_info(id, payment_method, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str payment_method: (required) + :param str amount_value: The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. + :param str radar_session_id: + :return: CreateBillingAccountCreditPaymentResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'payment_method', 'amount_value', 'radar_session_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_billing_account_credit_payment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `create_billing_account_credit_payment`") # noqa: E501 + # verify the required parameter 'payment_method' is set + if self.api_client.client_side_validation and ('payment_method' not in params or + params['payment_method'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `payment_method` when calling `create_billing_account_credit_payment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'amount_value' in params: + query_params.append(('amount.value', params['amount_value'])) # noqa: E501 + if 'payment_method' in params: + query_params.append(('paymentMethod', params['payment_method'])) # noqa: E501 + if 'radar_session_id' in params: + query_params.append(('radarSessionId', params['radar_session_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/credit', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreateBillingAccountCreditPaymentResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_billing_account(self, id, **kwargs): # noqa: E501 + """Delete billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_billing_account(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_billing_account_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_billing_account_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_billing_account_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_billing_account_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_billing_account" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_billing_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_billing_account(self, id, **kwargs): # noqa: E501 + """Get a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_billing_account_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_billing_account_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_billing_account_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_billing_account" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_billing_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BillingAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_billing_account_details(self, id, **kwargs): # noqa: E501 + """Get billing account details # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_details(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: GetBillingAccountDetailsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_billing_account_details_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_billing_account_details_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_billing_account_details_with_http_info(self, id, **kwargs): # noqa: E501 + """Get billing account details # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_details_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: GetBillingAccountDetailsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_billing_account_details" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_billing_account_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/details', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetBillingAccountDetailsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_billing_account_payment_methods(self, id, **kwargs): # noqa: E501 + """Get payment methods # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_payment_methods(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: BillingAccountPaymentMethods + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_billing_account_payment_methods_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_billing_account_payment_methods_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_billing_account_payment_methods_with_http_info(self, id, **kwargs): # noqa: E501 + """Get payment methods # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_payment_methods_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: BillingAccountPaymentMethods + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_billing_account_payment_methods" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_billing_account_payment_methods`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/payment-methods', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BillingAccountPaymentMethods', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_billing_account_setup_intent(self, id, **kwargs): # noqa: E501 + """Get setup intent # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_setup_intent(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: BillingAccountSetupIntent + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_billing_account_setup_intent_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_billing_account_setup_intent_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_billing_account_setup_intent_with_http_info(self, id, **kwargs): # noqa: E501 + """Get setup intent # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_setup_intent_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: BillingAccountSetupIntent + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_billing_account_setup_intent" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_billing_account_setup_intent`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/setup-intent', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BillingAccountSetupIntent', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_billing_account_spend_details(self, billing_account_id, start_time, end_time, **kwargs): # noqa: E501 + """Get spend details # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_spend_details(billing_account_id, start_time, end_time, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :return: GetBillingAccountSpendDetailsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_billing_account_spend_details_with_http_info(billing_account_id, start_time, end_time, **kwargs) # noqa: E501 + else: + (data) = self.get_billing_account_spend_details_with_http_info(billing_account_id, start_time, end_time, **kwargs) # noqa: E501 + return data + + def get_billing_account_spend_details_with_http_info(self, billing_account_id, start_time, end_time, **kwargs): # noqa: E501 + """Get spend details # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_billing_account_spend_details_with_http_info(billing_account_id, start_time, end_time, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :return: GetBillingAccountSpendDetailsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['billing_account_id', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_billing_account_spend_details" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'billing_account_id' is set + if self.api_client.client_side_validation and ('billing_account_id' not in params or + params['billing_account_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `billing_account_id` when calling `get_billing_account_spend_details`") # noqa: E501 + # verify the required parameter 'start_time' is set + if self.api_client.client_side_validation and ('start_time' not in params or + params['start_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start_time` when calling `get_billing_account_spend_details`") # noqa: E501 + # verify the required parameter 'end_time' is set + if self.api_client.client_side_validation and ('end_time' not in params or + params['end_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `end_time` when calling `get_billing_account_spend_details`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'billing_account_id' in params: + path_params['billingAccountId'] = params['billing_account_id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{billingAccountId}/spend/details', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetBillingAccountSpendDetailsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_billing_account_credit_balance_transactions(self, id, **kwargs): # noqa: E501 + """List credit balance transactions on a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_credit_balance_transactions(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param int page_size: + :param str starting_after: + :return: ListBillingAccountCreditBalanceTransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_billing_account_credit_balance_transactions_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.list_billing_account_credit_balance_transactions_with_http_info(id, **kwargs) # noqa: E501 + return data + + def list_billing_account_credit_balance_transactions_with_http_info(self, id, **kwargs): # noqa: E501 + """List credit balance transactions on a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_credit_balance_transactions_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param int page_size: + :param str starting_after: + :return: ListBillingAccountCreditBalanceTransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'page_size', 'starting_after'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_billing_account_credit_balance_transactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `list_billing_account_credit_balance_transactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'starting_after' in params: + query_params.append(('startingAfter', params['starting_after'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/credit-balance-transactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListBillingAccountCreditBalanceTransactionsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_billing_account_invoices(self, id, **kwargs): # noqa: E501 + """List invoices # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_invoices(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param int page_size: + :param str starting_after: + :param str status: + :return: ListBillingAccountInvoicesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_billing_account_invoices_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.list_billing_account_invoices_with_http_info(id, **kwargs) # noqa: E501 + return data + + def list_billing_account_invoices_with_http_info(self, id, **kwargs): # noqa: E501 + """List invoices # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_invoices_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param int page_size: + :param str starting_after: + :param str status: + :return: ListBillingAccountInvoicesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'page_size', 'starting_after', 'status'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_billing_account_invoices" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `list_billing_account_invoices`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'id' in params: + query_params.append(('id', params['id'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'starting_after' in params: + query_params.append(('startingAfter', params['starting_after'])) # noqa: E501 + if 'status' in params: + query_params.append(('status', params['status'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/invoices', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListBillingAccountInvoicesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_billing_account_transactions(self, id, **kwargs): # noqa: E501 + """List transactions on a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_transactions(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param int page_size: + :param str starting_after: + :return: ListBillingAccountTransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_billing_account_transactions_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.list_billing_account_transactions_with_http_info(id, **kwargs) # noqa: E501 + return data + + def list_billing_account_transactions_with_http_info(self, id, **kwargs): # noqa: E501 + """List transactions on a billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_transactions_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param int page_size: + :param str starting_after: + :return: ListBillingAccountTransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'page_size', 'starting_after'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_billing_account_transactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `list_billing_account_transactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'starting_after' in params: + query_params.append(('startingAfter', params['starting_after'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/transactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListBillingAccountTransactionsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_billing_accounts(self, **kwargs): # noqa: E501 + """List billing accounts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_accounts(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_token: + :param int page_size: + :return: ListBillingAccountsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_billing_accounts_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_billing_accounts_with_http_info(**kwargs) # noqa: E501 + return data + + def list_billing_accounts_with_http_info(self, **kwargs): # noqa: E501 + """List billing accounts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_accounts_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_token: + :param int page_size: + :return: ListBillingAccountsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_token', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_billing_accounts" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_token' in params: + query_params.append(('pageToken', params['page_token'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListBillingAccountsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_outstanding_invoices(self, **kwargs): # noqa: E501 + """Get outstanding invoices # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_outstanding_invoices(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListOutstandingInvoicesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_outstanding_invoices_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_outstanding_invoices_with_http_info(**kwargs) # noqa: E501 + return data + + def list_outstanding_invoices_with_http_info(self, **kwargs): # noqa: E501 + """Get outstanding invoices # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_outstanding_invoices_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListOutstandingInvoicesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_outstanding_invoices" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/invoices/outstanding', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListOutstandingInvoicesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def remove_billing_account_payment_method(self, id, payment_method_id, **kwargs): # noqa: E501 + """Remove payment method # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_billing_account_payment_method(id, payment_method_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str payment_method_id: (required) + :return: RemoveBillingAccountPaymentMethodResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.remove_billing_account_payment_method_with_http_info(id, payment_method_id, **kwargs) # noqa: E501 + else: + (data) = self.remove_billing_account_payment_method_with_http_info(id, payment_method_id, **kwargs) # noqa: E501 + return data + + def remove_billing_account_payment_method_with_http_info(self, id, payment_method_id, **kwargs): # noqa: E501 + """Remove payment method # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_billing_account_payment_method_with_http_info(id, payment_method_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str payment_method_id: (required) + :return: RemoveBillingAccountPaymentMethodResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'payment_method_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method remove_billing_account_payment_method" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `remove_billing_account_payment_method`") # noqa: E501 + # verify the required parameter 'payment_method_id' is set + if self.api_client.client_side_validation and ('payment_method_id' not in params or + params['payment_method_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `payment_method_id` when calling `remove_billing_account_payment_method`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'payment_method_id' in params: + path_params['paymentMethodId'] = params['payment_method_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RemoveBillingAccountPaymentMethodResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_billing_account_default_payment_method(self, id, payment_method_id, **kwargs): # noqa: E501 + """Set default payment method # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_billing_account_default_payment_method(id, payment_method_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str payment_method_id: (required) + :return: SetBillingAccountDefaultPaymentMethodResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.set_billing_account_default_payment_method_with_http_info(id, payment_method_id, **kwargs) # noqa: E501 + else: + (data) = self.set_billing_account_default_payment_method_with_http_info(id, payment_method_id, **kwargs) # noqa: E501 + return data + + def set_billing_account_default_payment_method_with_http_info(self, id, payment_method_id, **kwargs): # noqa: E501 + """Set default payment method # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_billing_account_default_payment_method_with_http_info(id, payment_method_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param str payment_method_id: (required) + :return: SetBillingAccountDefaultPaymentMethodResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'payment_method_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method set_billing_account_default_payment_method" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `set_billing_account_default_payment_method`") # noqa: E501 + # verify the required parameter 'payment_method_id' is set + if self.api_client.client_side_validation and ('payment_method_id' not in params or + params['payment_method_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `payment_method_id` when calling `set_billing_account_default_payment_method`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'payment_method_id' in params: + path_params['paymentMethodId'] = params['payment_method_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SetBillingAccountDefaultPaymentMethodResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_billing_account(self, billing_account_id, update_billing_account_body, **kwargs): # noqa: E501 + """Update billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_billing_account(billing_account_id, update_billing_account_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param UpdateBillingAccountBody update_billing_account_body: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_billing_account_with_http_info(billing_account_id, update_billing_account_body, **kwargs) # noqa: E501 + else: + (data) = self.update_billing_account_with_http_info(billing_account_id, update_billing_account_body, **kwargs) # noqa: E501 + return data + + def update_billing_account_with_http_info(self, billing_account_id, update_billing_account_body, **kwargs): # noqa: E501 + """Update billing account # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_billing_account_with_http_info(billing_account_id, update_billing_account_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param UpdateBillingAccountBody update_billing_account_body: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['billing_account_id', 'update_billing_account_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_billing_account" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'billing_account_id' is set + if self.api_client.client_side_validation and ('billing_account_id' not in params or + params['billing_account_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `billing_account_id` when calling `update_billing_account`") # noqa: E501 + # verify the required parameter 'update_billing_account_body' is set + if self.api_client.client_side_validation and ('update_billing_account_body' not in params or + params['update_billing_account_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `update_billing_account_body` when calling `update_billing_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'billing_account_id' in params: + path_params['billingAccount.id'] = params['billing_account_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_billing_account_body' in params: + body_params = params['update_billing_account_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{billingAccount.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BillingAccount', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/data_centers_api.py b/docs/cudo_compute/api/data_centers_api.py new file mode 100644 index 0000000..b899dbc --- /dev/null +++ b/docs/cudo_compute/api/data_centers_api.py @@ -0,0 +1,1171 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class DataCentersApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def count_hosts(self, data_center_id, **kwargs): # noqa: E501 + """Get host count # noqa: E501 + + Returns the number of hosts in a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_hosts(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: CountHostsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.count_hosts_with_http_info(data_center_id, **kwargs) # noqa: E501 + else: + (data) = self.count_hosts_with_http_info(data_center_id, **kwargs) # noqa: E501 + return data + + def count_hosts_with_http_info(self, data_center_id, **kwargs): # noqa: E501 + """Get host count # noqa: E501 + + Returns the number of hosts in a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_hosts_with_http_info(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: CountHostsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method count_hosts" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `count_hosts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/host-count', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CountHostsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_data_center(self, data_center, **kwargs): # noqa: E501 + """Create data center # noqa: E501 + + Creates a new data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_data_center(data_center, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V1DataCenter data_center: (required) + :return: V1DataCenter + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_data_center_with_http_info(data_center, **kwargs) # noqa: E501 + else: + (data) = self.create_data_center_with_http_info(data_center, **kwargs) # noqa: E501 + return data + + def create_data_center_with_http_info(self, data_center, **kwargs): # noqa: E501 + """Create data center # noqa: E501 + + Creates a new data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_data_center_with_http_info(data_center, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param V1DataCenter data_center: (required) + :return: V1DataCenter + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_data_center" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center' is set + if self.api_client.client_side_validation and ('data_center' not in params or + params['data_center'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center` when calling `create_data_center`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'data_center' in params: + body_params = params['data_center'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1DataCenter', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_data_center(self, id, **kwargs): # noqa: E501 + """Delete data center # noqa: E501 + + Deletes a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_data_center(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_data_center_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_data_center_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_data_center_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete data center # noqa: E501 + + Deletes a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_data_center_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_data_center" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_data_center`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_data_center(self, id, **kwargs): # noqa: E501 + """Get data center # noqa: E501 + + Returns a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: V1DataCenter + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_data_center_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_data_center_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_data_center_with_http_info(self, id, **kwargs): # noqa: E501 + """Get data center # noqa: E501 + + Returns a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: V1DataCenter + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_data_center" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_data_center`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1DataCenter', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_data_center_live_utilization(self, id, **kwargs): # noqa: E501 + """Get live utilization # noqa: E501 + + Returns the live utilization of a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_live_utilization(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: GetDataCenterLiveUtilizationResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_data_center_live_utilization_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_data_center_live_utilization_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_data_center_live_utilization_with_http_info(self, id, **kwargs): # noqa: E501 + """Get live utilization # noqa: E501 + + Returns the live utilization of a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_live_utilization_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: GetDataCenterLiveUtilizationResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_data_center_live_utilization" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_data_center_live_utilization`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{id}/live-utilization', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetDataCenterLiveUtilizationResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_data_center_revenue_by_resource(self, id, start_time, end_time, **kwargs): # noqa: E501 + """Get revenue by resource # noqa: E501 + + Returns the revenue of a data center by resource (CPU, Memory, Storage, etc.) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_revenue_by_resource(id, start_time, end_time, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :return: GetDataCenterRevenueByResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_data_center_revenue_by_resource_with_http_info(id, start_time, end_time, **kwargs) # noqa: E501 + else: + (data) = self.get_data_center_revenue_by_resource_with_http_info(id, start_time, end_time, **kwargs) # noqa: E501 + return data + + def get_data_center_revenue_by_resource_with_http_info(self, id, start_time, end_time, **kwargs): # noqa: E501 + """Get revenue by resource # noqa: E501 + + Returns the revenue of a data center by resource (CPU, Memory, Storage, etc.) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_revenue_by_resource_with_http_info(id, start_time, end_time, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :return: GetDataCenterRevenueByResourceResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_data_center_revenue_by_resource" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_data_center_revenue_by_resource`") # noqa: E501 + # verify the required parameter 'start_time' is set + if self.api_client.client_side_validation and ('start_time' not in params or + params['start_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start_time` when calling `get_data_center_revenue_by_resource`") # noqa: E501 + # verify the required parameter 'end_time' is set + if self.api_client.client_side_validation and ('end_time' not in params or + params['end_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `end_time` when calling `get_data_center_revenue_by_resource`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{id}/revenue-by-resource', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetDataCenterRevenueByResourceResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_data_center_revenue_time_series(self, id, start_time, end_time, interval, **kwargs): # noqa: E501 + """Get revenue time series # noqa: E501 + + Returns the revenue of a data center over time # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_revenue_time_series(id, start_time, end_time, interval, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :param str interval: (required) + :return: GetDataCenterRevenueTimeSeriesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_data_center_revenue_time_series_with_http_info(id, start_time, end_time, interval, **kwargs) # noqa: E501 + else: + (data) = self.get_data_center_revenue_time_series_with_http_info(id, start_time, end_time, interval, **kwargs) # noqa: E501 + return data + + def get_data_center_revenue_time_series_with_http_info(self, id, start_time, end_time, interval, **kwargs): # noqa: E501 + """Get revenue time series # noqa: E501 + + Returns the revenue of a data center over time # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_revenue_time_series_with_http_info(id, start_time, end_time, interval, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :param str interval: (required) + :return: GetDataCenterRevenueTimeSeriesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'start_time', 'end_time', 'interval'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_data_center_revenue_time_series" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_data_center_revenue_time_series`") # noqa: E501 + # verify the required parameter 'start_time' is set + if self.api_client.client_side_validation and ('start_time' not in params or + params['start_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start_time` when calling `get_data_center_revenue_time_series`") # noqa: E501 + # verify the required parameter 'end_time' is set + if self.api_client.client_side_validation and ('end_time' not in params or + params['end_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `end_time` when calling `get_data_center_revenue_time_series`") # noqa: E501 + # verify the required parameter 'interval' is set + if self.api_client.client_side_validation and ('interval' not in params or + params['interval'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `interval` when calling `get_data_center_revenue_time_series`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + if 'interval' in params: + query_params.append(('interval', params['interval'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{id}/revenue', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetDataCenterRevenueTimeSeriesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_clusters(self, data_center_id, **kwargs): # noqa: E501 + """List clusters # noqa: E501 + + Returns the clusters in a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_clusters(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListClustersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_clusters_with_http_info(data_center_id, **kwargs) # noqa: E501 + else: + (data) = self.list_clusters_with_http_info(data_center_id, **kwargs) # noqa: E501 + return data + + def list_clusters_with_http_info(self, data_center_id, **kwargs): # noqa: E501 + """List clusters # noqa: E501 + + Returns the clusters in a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_clusters_with_http_info(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListClustersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_clusters" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `list_clusters`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/clusters', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListClustersResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_data_centers(self, **kwargs): # noqa: E501 + """List data centers # noqa: E501 + + Returns the data centers in an organization # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_data_centers(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_token: + :param int page_size: + :return: ListDataCentersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_data_centers_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_data_centers_with_http_info(**kwargs) # noqa: E501 + return data + + def list_data_centers_with_http_info(self, **kwargs): # noqa: E501 + """List data centers # noqa: E501 + + Returns the data centers in an organization # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_data_centers_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_token: + :param int page_size: + :return: ListDataCentersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_token', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_data_centers" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_token' in params: + query_params.append(('pageToken', params['page_token'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListDataCentersResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_hosts(self, data_center_id, **kwargs): # noqa: E501 + """List hosts # noqa: E501 + + Returns the hosts in a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_hosts(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListHostsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_hosts_with_http_info(data_center_id, **kwargs) # noqa: E501 + else: + (data) = self.list_hosts_with_http_info(data_center_id, **kwargs) # noqa: E501 + return data + + def list_hosts_with_http_info(self, data_center_id, **kwargs): # noqa: E501 + """List hosts # noqa: E501 + + Returns the hosts in a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_hosts_with_http_info(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListHostsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_hosts" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `list_hosts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/hosts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListHostsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_data_center(self, data_center_id, update_data_center_body, **kwargs): # noqa: E501 + """Update data center # noqa: E501 + + Updates a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_data_center(data_center_id, update_data_center_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param UpdateDataCenterBody update_data_center_body: (required) + :return: V1DataCenter + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_data_center_with_http_info(data_center_id, update_data_center_body, **kwargs) # noqa: E501 + else: + (data) = self.update_data_center_with_http_info(data_center_id, update_data_center_body, **kwargs) # noqa: E501 + return data + + def update_data_center_with_http_info(self, data_center_id, update_data_center_body, **kwargs): # noqa: E501 + """Update data center # noqa: E501 + + Updates a data center # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_data_center_with_http_info(data_center_id, update_data_center_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param UpdateDataCenterBody update_data_center_body: (required) + :return: V1DataCenter + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', 'update_data_center_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_data_center" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `update_data_center`") # noqa: E501 + # verify the required parameter 'update_data_center_body' is set + if self.api_client.client_side_validation and ('update_data_center_body' not in params or + params['update_data_center_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `update_data_center_body` when calling `update_data_center`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenter.id'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_data_center_body' in params: + body_params = params['update_data_center_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenter.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='V1DataCenter', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/default_api.py b/docs/cudo_compute/api/default_api.py new file mode 100644 index 0000000..3fa9b7e --- /dev/null +++ b/docs/cudo_compute/api/default_api.py @@ -0,0 +1,971 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class DefaultApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_data_center_commitment_schedule(self, data_center_id, start_time, end_time, **kwargs): # noqa: E501 + """get_data_center_commitment_schedule # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_commitment_schedule(data_center_id, start_time, end_time, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :return: GetDataCenterCommitmentScheduleResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_data_center_commitment_schedule_with_http_info(data_center_id, start_time, end_time, **kwargs) # noqa: E501 + else: + (data) = self.get_data_center_commitment_schedule_with_http_info(data_center_id, start_time, end_time, **kwargs) # noqa: E501 + return data + + def get_data_center_commitment_schedule_with_http_info(self, data_center_id, start_time, end_time, **kwargs): # noqa: E501 + """get_data_center_commitment_schedule # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_commitment_schedule_with_http_info(data_center_id, start_time, end_time, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :return: GetDataCenterCommitmentScheduleResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', 'start_time', 'end_time'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_data_center_commitment_schedule" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `get_data_center_commitment_schedule`") # noqa: E501 + # verify the required parameter 'start_time' is set + if self.api_client.client_side_validation and ('start_time' not in params or + params['start_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start_time` when calling `get_data_center_commitment_schedule`") # noqa: E501 + # verify the required parameter 'end_time' is set + if self.api_client.client_side_validation and ('end_time' not in params or + params['end_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `end_time` when calling `get_data_center_commitment_schedule`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/commitment-schedule', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetDataCenterCommitmentScheduleResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_data_center_commitment_time_series(self, data_center_id, start_time, end_time, interval, **kwargs): # noqa: E501 + """get_data_center_commitment_time_series # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_commitment_time_series(data_center_id, start_time, end_time, interval, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :param str interval: (required) + :return: GetDataCenterCommitmentTimeSeriesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_data_center_commitment_time_series_with_http_info(data_center_id, start_time, end_time, interval, **kwargs) # noqa: E501 + else: + (data) = self.get_data_center_commitment_time_series_with_http_info(data_center_id, start_time, end_time, interval, **kwargs) # noqa: E501 + return data + + def get_data_center_commitment_time_series_with_http_info(self, data_center_id, start_time, end_time, interval, **kwargs): # noqa: E501 + """get_data_center_commitment_time_series # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_data_center_commitment_time_series_with_http_info(data_center_id, start_time, end_time, interval, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param datetime start_time: (required) + :param datetime end_time: (required) + :param str interval: (required) + :return: GetDataCenterCommitmentTimeSeriesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', 'start_time', 'end_time', 'interval'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_data_center_commitment_time_series" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `get_data_center_commitment_time_series`") # noqa: E501 + # verify the required parameter 'start_time' is set + if self.api_client.client_side_validation and ('start_time' not in params or + params['start_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `start_time` when calling `get_data_center_commitment_time_series`") # noqa: E501 + # verify the required parameter 'end_time' is set + if self.api_client.client_side_validation and ('end_time' not in params or + params['end_time'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `end_time` when calling `get_data_center_commitment_time_series`") # noqa: E501 + # verify the required parameter 'interval' is set + if self.api_client.client_side_validation and ('interval' not in params or + params['interval'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `interval` when calling `get_data_center_commitment_time_series`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + if 'start_time' in params: + query_params.append(('startTime', params['start_time'])) # noqa: E501 + if 'end_time' in params: + query_params.append(('endTime', params['end_time'])) # noqa: E501 + if 'interval' in params: + query_params.append(('interval', params['interval'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/commitment-time-series', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetDataCenterCommitmentTimeSeriesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_billing_account_projects(self, id, **kwargs): # noqa: E501 + """list_billing_account_projects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_projects(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: string page_token = 2; int32 page_size = 3; (required) + :return: ListBillingAccountProjectsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_billing_account_projects_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.list_billing_account_projects_with_http_info(id, **kwargs) # noqa: E501 + return data + + def list_billing_account_projects_with_http_info(self, id, **kwargs): # noqa: E501 + """list_billing_account_projects # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_billing_account_projects_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: string page_token = 2; int32 page_size = 3; (required) + :return: ListBillingAccountProjectsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_billing_account_projects" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `list_billing_account_projects`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{id}/projects', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListBillingAccountProjectsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_data_center_machine_type_prices(self, data_center_id, **kwargs): # noqa: E501 + """list_data_center_machine_type_prices # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_data_center_machine_type_prices(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListDataCenterMachineTypePricesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_data_center_machine_type_prices_with_http_info(data_center_id, **kwargs) # noqa: E501 + else: + (data) = self.list_data_center_machine_type_prices_with_http_info(data_center_id, **kwargs) # noqa: E501 + return data + + def list_data_center_machine_type_prices_with_http_info(self, data_center_id, **kwargs): # noqa: E501 + """list_data_center_machine_type_prices # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_data_center_machine_type_prices_with_http_info(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListDataCenterMachineTypePricesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_data_center_machine_type_prices" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `list_data_center_machine_type_prices`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/machine-type-prices', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListDataCenterMachineTypePricesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_vm_machine_types(self, **kwargs): # noqa: E501 + """list_vm_machine_types # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_machine_types(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListVMMachineTypesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_vm_machine_types_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_vm_machine_types_with_http_info(**kwargs) # noqa: E501 + return data + + def list_vm_machine_types_with_http_info(self, **kwargs): # noqa: E501 + """list_vm_machine_types # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_machine_types_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListVMMachineTypesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_vm_machine_types" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/vms/machine-types', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListVMMachineTypesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def search_resources(self, query, **kwargs): # noqa: E501 + """search_resources # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_resources(query, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str query: (required) + :return: SearchResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.search_resources_with_http_info(query, **kwargs) # noqa: E501 + else: + (data) = self.search_resources_with_http_info(query, **kwargs) # noqa: E501 + return data + + def search_resources_with_http_info(self, query, **kwargs): # noqa: E501 + """search_resources # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.search_resources_with_http_info(query, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str query: (required) + :return: SearchResourcesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['query'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method search_resources" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'query' is set + if self.api_client.client_side_validation and ('query' not in params or + params['query'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `query` when calling `search_resources`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'query' in params: + query_params.append(('query', params['query'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/resources/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SearchResourcesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def track(self, track_body, **kwargs): # noqa: E501 + """track # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.track(track_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TrackRequest track_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.track_with_http_info(track_body, **kwargs) # noqa: E501 + else: + (data) = self.track_with_http_info(track_body, **kwargs) # noqa: E501 + return data + + def track_with_http_info(self, track_body, **kwargs): # noqa: E501 + """track # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.track_with_http_info(track_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param TrackRequest track_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['track_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method track" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'track_body' is set + if self.api_client.client_side_validation and ('track_body' not in params or + params['track_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `track_body` when calling `track`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'track_body' in params: + body_params = params['track_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/auth/track', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_vm_expire_time(self, project_id, id, update_vm_expire_time_body, **kwargs): # noqa: E501 + """update_vm_expire_time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_vm_expire_time(project_id, id, update_vm_expire_time_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param UpdateVMExpireTimeBody update_vm_expire_time_body: (required) + :return: UpdateVMExpireTimeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_vm_expire_time_with_http_info(project_id, id, update_vm_expire_time_body, **kwargs) # noqa: E501 + else: + (data) = self.update_vm_expire_time_with_http_info(project_id, id, update_vm_expire_time_body, **kwargs) # noqa: E501 + return data + + def update_vm_expire_time_with_http_info(self, project_id, id, update_vm_expire_time_body, **kwargs): # noqa: E501 + """update_vm_expire_time # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_vm_expire_time_with_http_info(project_id, id, update_vm_expire_time_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param UpdateVMExpireTimeBody update_vm_expire_time_body: (required) + :return: UpdateVMExpireTimeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'update_vm_expire_time_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_vm_expire_time" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `update_vm_expire_time`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `update_vm_expire_time`") # noqa: E501 + # verify the required parameter 'update_vm_expire_time_body' is set + if self.api_client.client_side_validation and ('update_vm_expire_time_body' not in params or + params['update_vm_expire_time_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `update_vm_expire_time_body` when calling `update_vm_expire_time`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_vm_expire_time_body' in params: + body_params = params['update_vm_expire_time_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vm/{id}/expire-time', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UpdateVMExpireTimeResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_vm_password(self, project_id, id, update_vm_password_body, **kwargs): # noqa: E501 + """update_vm_password # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_vm_password(project_id, id, update_vm_password_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param UpdateVMPasswordBody update_vm_password_body: (required) + :return: UpdateVMPasswordResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_vm_password_with_http_info(project_id, id, update_vm_password_body, **kwargs) # noqa: E501 + else: + (data) = self.update_vm_password_with_http_info(project_id, id, update_vm_password_body, **kwargs) # noqa: E501 + return data + + def update_vm_password_with_http_info(self, project_id, id, update_vm_password_body, **kwargs): # noqa: E501 + """update_vm_password # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_vm_password_with_http_info(project_id, id, update_vm_password_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param UpdateVMPasswordBody update_vm_password_body: (required) + :return: UpdateVMPasswordResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'update_vm_password_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_vm_password" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `update_vm_password`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `update_vm_password`") # noqa: E501 + # verify the required parameter 'update_vm_password_body' is set + if self.api_client.client_side_validation and ('update_vm_password_body' not in params or + params['update_vm_password_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `update_vm_password_body` when calling `update_vm_password`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_vm_password_body' in params: + body_params = params['update_vm_password_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vm/{id}/password', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UpdateVMPasswordResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/disks_api.py b/docs/cudo_compute/api/disks_api.py new file mode 100644 index 0000000..5962c89 --- /dev/null +++ b/docs/cudo_compute/api/disks_api.py @@ -0,0 +1,1132 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class DisksApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def attach_storage_disk(self, project_id, id, **kwargs): # noqa: E501 + """Attach storage disk to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.attach_storage_disk(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str vm_id: + :return: AttachStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.attach_storage_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.attach_storage_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def attach_storage_disk_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Attach storage disk to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.attach_storage_disk_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str vm_id: + :return: AttachStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'vm_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method attach_storage_disk" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `attach_storage_disk`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `attach_storage_disk`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'vm_id' in params: + query_params.append(('vmId', params['vm_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disk/{id}/attach', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AttachStorageDiskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_disk_snapshot(self, project_id, id, create_disk_snapshot_body, **kwargs): # noqa: E501 + """Create Disk Snapshot # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_disk_snapshot(project_id, id, create_disk_snapshot_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param CreateDiskSnapshotBody create_disk_snapshot_body: (required) + :return: CreateDiskSnapshotResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_disk_snapshot_with_http_info(project_id, id, create_disk_snapshot_body, **kwargs) # noqa: E501 + else: + (data) = self.create_disk_snapshot_with_http_info(project_id, id, create_disk_snapshot_body, **kwargs) # noqa: E501 + return data + + def create_disk_snapshot_with_http_info(self, project_id, id, create_disk_snapshot_body, **kwargs): # noqa: E501 + """Create Disk Snapshot # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_disk_snapshot_with_http_info(project_id, id, create_disk_snapshot_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param CreateDiskSnapshotBody create_disk_snapshot_body: (required) + :return: CreateDiskSnapshotResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'create_disk_snapshot_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_disk_snapshot" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `create_disk_snapshot`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `create_disk_snapshot`") # noqa: E501 + # verify the required parameter 'create_disk_snapshot_body' is set + if self.api_client.client_side_validation and ('create_disk_snapshot_body' not in params or + params['create_disk_snapshot_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_disk_snapshot_body` when calling `create_disk_snapshot`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_disk_snapshot_body' in params: + body_params = params['create_disk_snapshot_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks/{id}/snapshots', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreateDiskSnapshotResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_storage_disk(self, project_id, create_storage_disk_body, **kwargs): # noqa: E501 + """Create storage disk # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_storage_disk(project_id, create_storage_disk_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param CreateStorageDiskBody create_storage_disk_body: (required) + :return: CreateStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_storage_disk_with_http_info(project_id, create_storage_disk_body, **kwargs) # noqa: E501 + else: + (data) = self.create_storage_disk_with_http_info(project_id, create_storage_disk_body, **kwargs) # noqa: E501 + return data + + def create_storage_disk_with_http_info(self, project_id, create_storage_disk_body, **kwargs): # noqa: E501 + """Create storage disk # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_storage_disk_with_http_info(project_id, create_storage_disk_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param CreateStorageDiskBody create_storage_disk_body: (required) + :return: CreateStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'create_storage_disk_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_storage_disk" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `create_storage_disk`") # noqa: E501 + # verify the required parameter 'create_storage_disk_body' is set + if self.api_client.client_side_validation and ('create_storage_disk_body' not in params or + params['create_storage_disk_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_storage_disk_body` when calling `create_storage_disk`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_storage_disk_body' in params: + body_params = params['create_storage_disk_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreateStorageDiskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_disk_snapshot(self, project_id, id, snapshot_id, vm_id, **kwargs): # noqa: E501 + """Delete Disk Snapshots # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_disk_snapshot(project_id, id, snapshot_id, vm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str snapshot_id: (required) + :param str vm_id: (required) + :return: DeleteDiskSnapshotResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_disk_snapshot_with_http_info(project_id, id, snapshot_id, vm_id, **kwargs) # noqa: E501 + else: + (data) = self.delete_disk_snapshot_with_http_info(project_id, id, snapshot_id, vm_id, **kwargs) # noqa: E501 + return data + + def delete_disk_snapshot_with_http_info(self, project_id, id, snapshot_id, vm_id, **kwargs): # noqa: E501 + """Delete Disk Snapshots # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_disk_snapshot_with_http_info(project_id, id, snapshot_id, vm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str snapshot_id: (required) + :param str vm_id: (required) + :return: DeleteDiskSnapshotResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'snapshot_id', 'vm_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_disk_snapshot" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `delete_disk_snapshot`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_disk_snapshot`") # noqa: E501 + # verify the required parameter 'snapshot_id' is set + if self.api_client.client_side_validation and ('snapshot_id' not in params or + params['snapshot_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `snapshot_id` when calling `delete_disk_snapshot`") # noqa: E501 + # verify the required parameter 'vm_id' is set + if self.api_client.client_side_validation and ('vm_id' not in params or + params['vm_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `vm_id` when calling `delete_disk_snapshot`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'snapshot_id' in params: + query_params.append(('snapshotId', params['snapshot_id'])) # noqa: E501 + if 'vm_id' in params: + query_params.append(('vmId', params['vm_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks/{id}/snapshots', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeleteDiskSnapshotResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_storage_disk(self, project_id, id, **kwargs): # noqa: E501 + """Delete storage disk # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_storage_disk(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeleteStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_storage_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.delete_storage_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def delete_storage_disk_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Delete storage disk # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_storage_disk_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeleteStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_storage_disk" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `delete_storage_disk`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_storage_disk`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeleteStorageDiskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def detach_storage_disk(self, project_id, id, **kwargs): # noqa: E501 + """Detach storage disk from VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.detach_storage_disk(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DetachStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.detach_storage_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.detach_storage_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def detach_storage_disk_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Detach storage disk from VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.detach_storage_disk_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DetachStorageDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method detach_storage_disk" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `detach_storage_disk`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `detach_storage_disk`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disk/{id}/detach', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DetachStorageDiskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_disk(self, project_id, id, **kwargs): # noqa: E501 + """List disks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_disk(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.get_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def get_disk_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """List disks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_disk_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_disk" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_disk`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_disk`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetDiskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_disk_snapshots(self, project_id, id, **kwargs): # noqa: E501 + """List Disk Snapshots # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_disk_snapshots(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: ListDiskSnapshotsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_disk_snapshots_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.list_disk_snapshots_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def list_disk_snapshots_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """List Disk Snapshots # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_disk_snapshots_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: ListDiskSnapshotsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_disk_snapshots" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_disk_snapshots`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `list_disk_snapshots`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks/{id}/snapshots', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListDiskSnapshotsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_disks(self, project_id, **kwargs): # noqa: E501 + """List disks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_disks(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :param str data_center_id: + :return: ListDisksResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_disks_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_disks_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_disks_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List disks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_disks_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :param str data_center_id: + :return: ListDisksResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'page_number', 'page_size', 'data_center_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_disks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_disks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + if 'data_center_id' in params: + query_params.append(('dataCenterId', params['data_center_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListDisksResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def revert_disk(self, project_id, id, snapshot_id, vm_id, **kwargs): # noqa: E501 + """Revert Disk to Snapshot # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revert_disk(project_id, id, snapshot_id, vm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str snapshot_id: (required) + :param str vm_id: (required) + :return: RevertDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.revert_disk_with_http_info(project_id, id, snapshot_id, vm_id, **kwargs) # noqa: E501 + else: + (data) = self.revert_disk_with_http_info(project_id, id, snapshot_id, vm_id, **kwargs) # noqa: E501 + return data + + def revert_disk_with_http_info(self, project_id, id, snapshot_id, vm_id, **kwargs): # noqa: E501 + """Revert Disk to Snapshot # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revert_disk_with_http_info(project_id, id, snapshot_id, vm_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str snapshot_id: (required) + :param str vm_id: (required) + :return: RevertDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'snapshot_id', 'vm_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method revert_disk" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `revert_disk`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `revert_disk`") # noqa: E501 + # verify the required parameter 'snapshot_id' is set + if self.api_client.client_side_validation and ('snapshot_id' not in params or + params['snapshot_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `snapshot_id` when calling `revert_disk`") # noqa: E501 + # verify the required parameter 'vm_id' is set + if self.api_client.client_side_validation and ('vm_id' not in params or + params['vm_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `vm_id` when calling `revert_disk`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'snapshot_id' in params: + query_params.append(('snapshotId', params['snapshot_id'])) # noqa: E501 + if 'vm_id' in params: + query_params.append(('vmId', params['vm_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/disks/{id}/revert', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RevertDiskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/machine_types_api.py b/docs/cudo_compute/api/machine_types_api.py new file mode 100644 index 0000000..0ef2372 --- /dev/null +++ b/docs/cudo_compute/api/machine_types_api.py @@ -0,0 +1,341 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class MachineTypesApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_machine_type(self, data_center_id, machine_type, **kwargs): # noqa: E501 + """Get a machine type in a data center # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_machine_type(data_center_id, machine_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param str machine_type: (required) + :return: GetMachineTypeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_machine_type_with_http_info(data_center_id, machine_type, **kwargs) # noqa: E501 + else: + (data) = self.get_machine_type_with_http_info(data_center_id, machine_type, **kwargs) # noqa: E501 + return data + + def get_machine_type_with_http_info(self, data_center_id, machine_type, **kwargs): # noqa: E501 + """Get a machine type in a data center # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_machine_type_with_http_info(data_center_id, machine_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param str machine_type: (required) + :return: GetMachineTypeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', 'machine_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_machine_type" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `get_machine_type`") # noqa: E501 + # verify the required parameter 'machine_type' is set + if self.api_client.client_side_validation and ('machine_type' not in params or + params['machine_type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `machine_type` when calling `get_machine_type`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + if 'machine_type' in params: + path_params['machineType'] = params['machine_type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/machine-types/{machineType}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetMachineTypeResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_machine_type_live_utilization(self, data_center_id, machine_type, **kwargs): # noqa: E501 + """Get the utilization for a machine type in a data center # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_machine_type_live_utilization(data_center_id, machine_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param str machine_type: (required) + :return: GetMachineTypeLiveUtilizationResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_machine_type_live_utilization_with_http_info(data_center_id, machine_type, **kwargs) # noqa: E501 + else: + (data) = self.get_machine_type_live_utilization_with_http_info(data_center_id, machine_type, **kwargs) # noqa: E501 + return data + + def get_machine_type_live_utilization_with_http_info(self, data_center_id, machine_type, **kwargs): # noqa: E501 + """Get the utilization for a machine type in a data center # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_machine_type_live_utilization_with_http_info(data_center_id, machine_type, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param str machine_type: (required) + :return: GetMachineTypeLiveUtilizationResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', 'machine_type'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_machine_type_live_utilization" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `get_machine_type_live_utilization`") # noqa: E501 + # verify the required parameter 'machine_type' is set + if self.api_client.client_side_validation and ('machine_type' not in params or + params['machine_type'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `machine_type` when calling `get_machine_type_live_utilization`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + if 'machine_type' in params: + path_params['machineType'] = params['machine_type'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/machine-types/{machineType}/live-utilization', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetMachineTypeLiveUtilizationResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_machine_types(self, data_center_id, **kwargs): # noqa: E501 + """List machine types for a data center # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_machine_types(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListMachineTypesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_machine_types_with_http_info(data_center_id, **kwargs) # noqa: E501 + else: + (data) = self.list_machine_types_with_http_info(data_center_id, **kwargs) # noqa: E501 + return data + + def list_machine_types_with_http_info(self, data_center_id, **kwargs): # noqa: E501 + """List machine types for a data center # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_machine_types_with_http_info(data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :return: ListMachineTypesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_machine_types" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `list_machine_types`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/machine-types', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListMachineTypesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/networks_api.py b/docs/cudo_compute/api/networks_api.py new file mode 100644 index 0000000..f16b642 --- /dev/null +++ b/docs/cudo_compute/api/networks_api.py @@ -0,0 +1,1201 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class NetworksApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_network(self, project_id, create_network_body, **kwargs): # noqa: E501 + """Create network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_network(project_id, create_network_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param CreateNetworkBody create_network_body: (required) + :return: CreateNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_network_with_http_info(project_id, create_network_body, **kwargs) # noqa: E501 + else: + (data) = self.create_network_with_http_info(project_id, create_network_body, **kwargs) # noqa: E501 + return data + + def create_network_with_http_info(self, project_id, create_network_body, **kwargs): # noqa: E501 + """Create network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_network_with_http_info(project_id, create_network_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param CreateNetworkBody create_network_body: (required) + :return: CreateNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'create_network_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_network" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `create_network`") # noqa: E501 + # verify the required parameter 'create_network_body' is set + if self.api_client.client_side_validation and ('create_network_body' not in params or + params['create_network_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_network_body` when calling `create_network`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_network_body' in params: + body_params = params['create_network_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreateNetworkResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_security_group(self, security_group_project_id, security_group, **kwargs): # noqa: E501 + """Create security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_security_group(security_group_project_id, security_group, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str security_group_project_id: (required) + :param SecurityGroup security_group: (required) + :return: CreateSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_security_group_with_http_info(security_group_project_id, security_group, **kwargs) # noqa: E501 + else: + (data) = self.create_security_group_with_http_info(security_group_project_id, security_group, **kwargs) # noqa: E501 + return data + + def create_security_group_with_http_info(self, security_group_project_id, security_group, **kwargs): # noqa: E501 + """Create security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_security_group_with_http_info(security_group_project_id, security_group, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str security_group_project_id: (required) + :param SecurityGroup security_group: (required) + :return: CreateSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['security_group_project_id', 'security_group'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_security_group" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'security_group_project_id' is set + if self.api_client.client_side_validation and ('security_group_project_id' not in params or + params['security_group_project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `security_group_project_id` when calling `create_security_group`") # noqa: E501 + # verify the required parameter 'security_group' is set + if self.api_client.client_side_validation and ('security_group' not in params or + params['security_group'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `security_group` when calling `create_security_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'security_group_project_id' in params: + path_params['securityGroup.projectId'] = params['security_group_project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'security_group' in params: + body_params = params['security_group'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{securityGroup.projectId}/networks/security-groups', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreateSecurityGroupResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_network(self, project_id, id, **kwargs): # noqa: E501 + """Delete network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_network(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeleteNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.delete_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def delete_network_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Delete network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_network_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeleteNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_network" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `delete_network`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_network`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeleteNetworkResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_security_group(self, project_id, id, **kwargs): # noqa: E501 + """Delete security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_security_group(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeleteSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.delete_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def delete_security_group_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Delete security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_security_group_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeleteSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_security_group" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `delete_security_group`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_security_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks/security-groups/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeleteSecurityGroupResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_network(self, project_id, id, **kwargs): # noqa: E501 + """Get network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_network(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.get_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def get_network_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Get network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_network_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_network" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_network`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_network`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetNetworkResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_security_group(self, project_id, id, **kwargs): # noqa: E501 + """Get a security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_security_group(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.get_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def get_security_group_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Get a security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_security_group_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_security_group" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_security_group`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_security_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks/security-groups/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetSecurityGroupResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_networks(self, project_id, **kwargs): # noqa: E501 + """List networks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_networks(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListNetworksResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_networks_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_networks_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_networks_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List networks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_networks_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListNetworksResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'page_number', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_networks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_networks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListNetworksResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_security_groups(self, project_id, **kwargs): # noqa: E501 + """List security groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_security_groups(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: + :param int page_number: + :param int page_size: + :return: ListSecurityGroupsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_security_groups_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_security_groups_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_security_groups_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List security groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_security_groups_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: + :param int page_number: + :param int page_size: + :return: ListSecurityGroupsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'page_number', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_security_groups" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_security_groups`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'data_center_id' in params: + query_params.append(('dataCenterId', params['data_center_id'])) # noqa: E501 + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks/security-groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListSecurityGroupsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def start_network(self, project_id, id, **kwargs): # noqa: E501 + """Start network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.start_network(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StartNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.start_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.start_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def start_network_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Start network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.start_network_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StartNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method start_network" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `start_network`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `start_network`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks/{id}/start', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StartNetworkResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def stop_network(self, project_id, id, **kwargs): # noqa: E501 + """Stop network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stop_network(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StopNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.stop_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.stop_network_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def stop_network_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Stop network # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stop_network_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StopNetworkResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method stop_network" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `stop_network`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `stop_network`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/networks/{id}/stop', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StopNetworkResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_security_group(self, security_group_project_id, security_group_id, security_group, **kwargs): # noqa: E501 + """Update security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_security_group(security_group_project_id, security_group_id, security_group, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str security_group_project_id: (required) + :param str security_group_id: (required) + :param SecurityGroup1 security_group: (required) + :return: UpdateSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_security_group_with_http_info(security_group_project_id, security_group_id, security_group, **kwargs) # noqa: E501 + else: + (data) = self.update_security_group_with_http_info(security_group_project_id, security_group_id, security_group, **kwargs) # noqa: E501 + return data + + def update_security_group_with_http_info(self, security_group_project_id, security_group_id, security_group, **kwargs): # noqa: E501 + """Update security group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_security_group_with_http_info(security_group_project_id, security_group_id, security_group, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str security_group_project_id: (required) + :param str security_group_id: (required) + :param SecurityGroup1 security_group: (required) + :return: UpdateSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['security_group_project_id', 'security_group_id', 'security_group'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_security_group" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'security_group_project_id' is set + if self.api_client.client_side_validation and ('security_group_project_id' not in params or + params['security_group_project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `security_group_project_id` when calling `update_security_group`") # noqa: E501 + # verify the required parameter 'security_group_id' is set + if self.api_client.client_side_validation and ('security_group_id' not in params or + params['security_group_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `security_group_id` when calling `update_security_group`") # noqa: E501 + # verify the required parameter 'security_group' is set + if self.api_client.client_side_validation and ('security_group' not in params or + params['security_group'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `security_group` when calling `update_security_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'security_group_project_id' in params: + path_params['securityGroup.projectId'] = params['security_group_project_id'] # noqa: E501 + if 'security_group_id' in params: + path_params['securityGroup.id'] = params['security_group_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'security_group' in params: + body_params = params['security_group'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{securityGroup.projectId}/networks/security-groups/{securityGroup.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UpdateSecurityGroupResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/object_storage_api.py b/docs/cudo_compute/api/object_storage_api.py new file mode 100644 index 0000000..cd22266 --- /dev/null +++ b/docs/cudo_compute/api/object_storage_api.py @@ -0,0 +1,1148 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class ObjectStorageApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def activate(self, project_id, data_center_id, activate_body, **kwargs): # noqa: E501 + """Allow the use of S3 compatible storage in a project # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activate(project_id, data_center_id, activate_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param ActivateBody activate_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.activate_with_http_info(project_id, data_center_id, activate_body, **kwargs) # noqa: E501 + else: + (data) = self.activate_with_http_info(project_id, data_center_id, activate_body, **kwargs) # noqa: E501 + return data + + def activate_with_http_info(self, project_id, data_center_id, activate_body, **kwargs): # noqa: E501 + """Allow the use of S3 compatible storage in a project # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.activate_with_http_info(project_id, data_center_id, activate_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param ActivateBody activate_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'activate_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method activate" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `activate`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `activate`") # noqa: E501 + # verify the required parameter 'activate_body' is set + if self.api_client.client_side_validation and ('activate_body' not in params or + params['activate_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `activate_body` when calling `activate`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'activate_body' in params: + body_params = params['activate_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/activate/{dataCenterId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_object_storage_user(self, project_id, data_center_id, create_object_storage_user_body, **kwargs): # noqa: E501 + """Create user that stores keys for storage buckets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_object_storage_user(project_id, data_center_id, create_object_storage_user_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param CreateObjectStorageUserBody create_object_storage_user_body: (required) + :return: ObjectStorageUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_object_storage_user_with_http_info(project_id, data_center_id, create_object_storage_user_body, **kwargs) # noqa: E501 + else: + (data) = self.create_object_storage_user_with_http_info(project_id, data_center_id, create_object_storage_user_body, **kwargs) # noqa: E501 + return data + + def create_object_storage_user_with_http_info(self, project_id, data_center_id, create_object_storage_user_body, **kwargs): # noqa: E501 + """Create user that stores keys for storage buckets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_object_storage_user_with_http_info(project_id, data_center_id, create_object_storage_user_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param CreateObjectStorageUserBody create_object_storage_user_body: (required) + :return: ObjectStorageUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'create_object_storage_user_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_object_storage_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `create_object_storage_user`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `create_object_storage_user`") # noqa: E501 + # verify the required parameter 'create_object_storage_user_body' is set + if self.api_client.client_side_validation and ('create_object_storage_user_body' not in params or + params['create_object_storage_user_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_object_storage_user_body` when calling `create_object_storage_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_object_storage_user_body' in params: + body_params = params['create_object_storage_user_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/users/{dataCenterId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStorageUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_object_storage_key(self, project_id, data_center_id, id, access_key, **kwargs): # noqa: E501 + """Delete object storage user key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_object_storage_key(project_id, data_center_id, id, access_key, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :param str access_key: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_object_storage_key_with_http_info(project_id, data_center_id, id, access_key, **kwargs) # noqa: E501 + else: + (data) = self.delete_object_storage_key_with_http_info(project_id, data_center_id, id, access_key, **kwargs) # noqa: E501 + return data + + def delete_object_storage_key_with_http_info(self, project_id, data_center_id, id, access_key, **kwargs): # noqa: E501 + """Delete object storage user key # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_object_storage_key_with_http_info(project_id, data_center_id, id, access_key, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :param str access_key: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'id', 'access_key'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_object_storage_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `delete_object_storage_key`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `delete_object_storage_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_object_storage_key`") # noqa: E501 + # verify the required parameter 'access_key' is set + if self.api_client.client_side_validation and ('access_key' not in params or + params['access_key'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `access_key` when calling `delete_object_storage_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'access_key' in params: + path_params['accessKey'] = params['access_key'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}/keys/{accessKey}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_object_storage_user(self, project_id, data_center_id, id, **kwargs): # noqa: E501 + """Delete object storage user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_object_storage_user(project_id, data_center_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_object_storage_user_with_http_info(project_id, data_center_id, id, **kwargs) # noqa: E501 + else: + (data) = self.delete_object_storage_user_with_http_info(project_id, data_center_id, id, **kwargs) # noqa: E501 + return data + + def delete_object_storage_user_with_http_info(self, project_id, data_center_id, id, **kwargs): # noqa: E501 + """Delete object storage user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_object_storage_user_with_http_info(project_id, data_center_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_object_storage_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `delete_object_storage_user`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `delete_object_storage_user`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_object_storage_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def generate_object_storage_key(self, project_id, data_center_id, id, **kwargs): # noqa: E501 + """Generate access key for storage buckets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_object_storage_key(project_id, data_center_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :return: ObjectStorageKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.generate_object_storage_key_with_http_info(project_id, data_center_id, id, **kwargs) # noqa: E501 + else: + (data) = self.generate_object_storage_key_with_http_info(project_id, data_center_id, id, **kwargs) # noqa: E501 + return data + + def generate_object_storage_key_with_http_info(self, project_id, data_center_id, id, **kwargs): # noqa: E501 + """Generate access key for storage buckets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.generate_object_storage_key_with_http_info(project_id, data_center_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :return: ObjectStorageKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method generate_object_storage_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `generate_object_storage_key`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `generate_object_storage_key`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `generate_object_storage_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStorageKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_object_storage_bucket(self, project_id, data_center_id, id, **kwargs): # noqa: E501 + """Get details for a bucket # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_object_storage_bucket(project_id, data_center_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :return: ObjectStorageBucket + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_object_storage_bucket_with_http_info(project_id, data_center_id, id, **kwargs) # noqa: E501 + else: + (data) = self.get_object_storage_bucket_with_http_info(project_id, data_center_id, id, **kwargs) # noqa: E501 + return data + + def get_object_storage_bucket_with_http_info(self, project_id, data_center_id, id, **kwargs): # noqa: E501 + """Get details for a bucket # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_object_storage_bucket_with_http_info(project_id, data_center_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str id: (required) + :return: ObjectStorageBucket + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_object_storage_bucket" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_object_storage_bucket`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `get_object_storage_bucket`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_object_storage_bucket`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/buckets/{dataCenterId}/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStorageBucket', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_object_storage_session_key(self, project_id, data_center_id, **kwargs): # noqa: E501 + """Generate temporary key for storage bucket access # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_object_storage_session_key(project_id, data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :return: GetObjectStorageSessionKeyResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_object_storage_session_key_with_http_info(project_id, data_center_id, **kwargs) # noqa: E501 + else: + (data) = self.get_object_storage_session_key_with_http_info(project_id, data_center_id, **kwargs) # noqa: E501 + return data + + def get_object_storage_session_key_with_http_info(self, project_id, data_center_id, **kwargs): # noqa: E501 + """Generate temporary key for storage bucket access # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_object_storage_session_key_with_http_info(project_id, data_center_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :return: GetObjectStorageSessionKeyResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_object_storage_session_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_object_storage_session_key`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `get_object_storage_session_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/session-key/{dataCenterId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetObjectStorageSessionKeyResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_object_storage_user(self, project_id, data_center_id, user_id, **kwargs): # noqa: E501 + """Get details about an object storage user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_object_storage_user(project_id, data_center_id, user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str user_id: (required) + :return: ObjectStorageUser + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_object_storage_user_with_http_info(project_id, data_center_id, user_id, **kwargs) # noqa: E501 + else: + (data) = self.get_object_storage_user_with_http_info(project_id, data_center_id, user_id, **kwargs) # noqa: E501 + return data + + def get_object_storage_user_with_http_info(self, project_id, data_center_id, user_id, **kwargs): # noqa: E501 + """Get details about an object storage user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_object_storage_user_with_http_info(project_id, data_center_id, user_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str data_center_id: (required) + :param str user_id: (required) + :return: ObjectStorageUser + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'user_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_object_storage_user" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_object_storage_user`") # noqa: E501 + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `get_object_storage_user`") # noqa: E501 + # verify the required parameter 'user_id' is set + if self.api_client.client_side_validation and ('user_id' not in params or + params['user_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `get_object_storage_user`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + if 'user_id' in params: + path_params['userId'] = params['user_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/users/{dataCenterId}/{userId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ObjectStorageUser', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_object_storage_buckets(self, project_id, **kwargs): # noqa: E501 + """List buckets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_object_storage_buckets(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListObjectStorageBucketsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_object_storage_buckets_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_object_storage_buckets_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_object_storage_buckets_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List buckets # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_object_storage_buckets_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListObjectStorageBucketsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'page_number', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_object_storage_buckets" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_object_storage_buckets`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/buckets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListObjectStorageBucketsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_object_storage_users(self, project_id, **kwargs): # noqa: E501 + """List storage users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_object_storage_users(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListObjectStorageUsersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_object_storage_users_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_object_storage_users_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_object_storage_users_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List storage users # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_object_storage_users_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListObjectStorageUsersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'page_number', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_object_storage_users" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_object_storage_users`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/object-storage/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListObjectStorageUsersResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/permissions_api.py b/docs/cudo_compute/api/permissions_api.py new file mode 100644 index 0000000..983ba4b --- /dev/null +++ b/docs/cudo_compute/api/permissions_api.py @@ -0,0 +1,765 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class PermissionsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def add_billing_account_user_permission(self, billing_account_id, add_billing_account_user_permission_body, **kwargs): # noqa: E501 + """Add billing account user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_billing_account_user_permission(billing_account_id, add_billing_account_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param AddBillingAccountUserPermissionBody add_billing_account_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.add_billing_account_user_permission_with_http_info(billing_account_id, add_billing_account_user_permission_body, **kwargs) # noqa: E501 + else: + (data) = self.add_billing_account_user_permission_with_http_info(billing_account_id, add_billing_account_user_permission_body, **kwargs) # noqa: E501 + return data + + def add_billing_account_user_permission_with_http_info(self, billing_account_id, add_billing_account_user_permission_body, **kwargs): # noqa: E501 + """Add billing account user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_billing_account_user_permission_with_http_info(billing_account_id, add_billing_account_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param AddBillingAccountUserPermissionBody add_billing_account_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['billing_account_id', 'add_billing_account_user_permission_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method add_billing_account_user_permission" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'billing_account_id' is set + if self.api_client.client_side_validation and ('billing_account_id' not in params or + params['billing_account_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `billing_account_id` when calling `add_billing_account_user_permission`") # noqa: E501 + # verify the required parameter 'add_billing_account_user_permission_body' is set + if self.api_client.client_side_validation and ('add_billing_account_user_permission_body' not in params or + params['add_billing_account_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `add_billing_account_user_permission_body` when calling `add_billing_account_user_permission`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'billing_account_id' in params: + path_params['billingAccountId'] = params['billing_account_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'add_billing_account_user_permission_body' in params: + body_params = params['add_billing_account_user_permission_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{billingAccountId}/add-user-permission', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def add_data_center_user_permission(self, data_center_id, add_data_center_user_permission_body, **kwargs): # noqa: E501 + """Add data center user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_data_center_user_permission(data_center_id, add_data_center_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param AddDataCenterUserPermissionBody add_data_center_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.add_data_center_user_permission_with_http_info(data_center_id, add_data_center_user_permission_body, **kwargs) # noqa: E501 + else: + (data) = self.add_data_center_user_permission_with_http_info(data_center_id, add_data_center_user_permission_body, **kwargs) # noqa: E501 + return data + + def add_data_center_user_permission_with_http_info(self, data_center_id, add_data_center_user_permission_body, **kwargs): # noqa: E501 + """Add data center user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_data_center_user_permission_with_http_info(data_center_id, add_data_center_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param AddDataCenterUserPermissionBody add_data_center_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', 'add_data_center_user_permission_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method add_data_center_user_permission" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `add_data_center_user_permission`") # noqa: E501 + # verify the required parameter 'add_data_center_user_permission_body' is set + if self.api_client.client_side_validation and ('add_data_center_user_permission_body' not in params or + params['add_data_center_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `add_data_center_user_permission_body` when calling `add_data_center_user_permission`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'add_data_center_user_permission_body' in params: + body_params = params['add_data_center_user_permission_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/add-user-permission', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def add_project_user_permission(self, project_id, add_project_user_permission_body, **kwargs): # noqa: E501 + """Add project user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_project_user_permission(project_id, add_project_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param AddProjectUserPermissionBody add_project_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.add_project_user_permission_with_http_info(project_id, add_project_user_permission_body, **kwargs) # noqa: E501 + else: + (data) = self.add_project_user_permission_with_http_info(project_id, add_project_user_permission_body, **kwargs) # noqa: E501 + return data + + def add_project_user_permission_with_http_info(self, project_id, add_project_user_permission_body, **kwargs): # noqa: E501 + """Add project user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_project_user_permission_with_http_info(project_id, add_project_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param AddProjectUserPermissionBody add_project_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'add_project_user_permission_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method add_project_user_permission" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `add_project_user_permission`") # noqa: E501 + # verify the required parameter 'add_project_user_permission_body' is set + if self.api_client.client_side_validation and ('add_project_user_permission_body' not in params or + params['add_project_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `add_project_user_permission_body` when calling `add_project_user_permission`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'add_project_user_permission_body' in params: + body_params = params['add_project_user_permission_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/add-user-permission', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_user_permissions(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_user_permissions(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: + :param str data_center_id: + :param str billing_account_id: + :return: ListUserPermissionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_user_permissions_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_user_permissions_with_http_info(**kwargs) # noqa: E501 + return data + + def list_user_permissions_with_http_info(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_user_permissions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: + :param str data_center_id: + :param str billing_account_id: + :return: ListUserPermissionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'data_center_id', 'billing_account_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_user_permissions" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'project_id' in params: + query_params.append(('projectId', params['project_id'])) # noqa: E501 + if 'data_center_id' in params: + query_params.append(('dataCenterId', params['data_center_id'])) # noqa: E501 + if 'billing_account_id' in params: + query_params.append(('billingAccountId', params['billing_account_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/auth/permissions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListUserPermissionsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def remove_billing_account_user_permission(self, billing_account_id, remove_billing_account_user_permission_body, **kwargs): # noqa: E501 + """Remove billing account user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_billing_account_user_permission(billing_account_id, remove_billing_account_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param RemoveBillingAccountUserPermissionBody remove_billing_account_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.remove_billing_account_user_permission_with_http_info(billing_account_id, remove_billing_account_user_permission_body, **kwargs) # noqa: E501 + else: + (data) = self.remove_billing_account_user_permission_with_http_info(billing_account_id, remove_billing_account_user_permission_body, **kwargs) # noqa: E501 + return data + + def remove_billing_account_user_permission_with_http_info(self, billing_account_id, remove_billing_account_user_permission_body, **kwargs): # noqa: E501 + """Remove billing account user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_billing_account_user_permission_with_http_info(billing_account_id, remove_billing_account_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param RemoveBillingAccountUserPermissionBody remove_billing_account_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['billing_account_id', 'remove_billing_account_user_permission_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method remove_billing_account_user_permission" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'billing_account_id' is set + if self.api_client.client_side_validation and ('billing_account_id' not in params or + params['billing_account_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `billing_account_id` when calling `remove_billing_account_user_permission`") # noqa: E501 + # verify the required parameter 'remove_billing_account_user_permission_body' is set + if self.api_client.client_side_validation and ('remove_billing_account_user_permission_body' not in params or + params['remove_billing_account_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `remove_billing_account_user_permission_body` when calling `remove_billing_account_user_permission`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'billing_account_id' in params: + path_params['billingAccountId'] = params['billing_account_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'remove_billing_account_user_permission_body' in params: + body_params = params['remove_billing_account_user_permission_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/billing-accounts/{billingAccountId}/remove-user-permission', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def remove_data_center_user_permission(self, data_center_id, remove_data_center_user_permission_body, **kwargs): # noqa: E501 + """Remove data center user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_data_center_user_permission(data_center_id, remove_data_center_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param RemoveDataCenterUserPermissionBody remove_data_center_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.remove_data_center_user_permission_with_http_info(data_center_id, remove_data_center_user_permission_body, **kwargs) # noqa: E501 + else: + (data) = self.remove_data_center_user_permission_with_http_info(data_center_id, remove_data_center_user_permission_body, **kwargs) # noqa: E501 + return data + + def remove_data_center_user_permission_with_http_info(self, data_center_id, remove_data_center_user_permission_body, **kwargs): # noqa: E501 + """Remove data center user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_data_center_user_permission_with_http_info(data_center_id, remove_data_center_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param RemoveDataCenterUserPermissionBody remove_data_center_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', 'remove_data_center_user_permission_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method remove_data_center_user_permission" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'data_center_id' is set + if self.api_client.client_side_validation and ('data_center_id' not in params or + params['data_center_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `data_center_id` when calling `remove_data_center_user_permission`") # noqa: E501 + # verify the required parameter 'remove_data_center_user_permission_body' is set + if self.api_client.client_side_validation and ('remove_data_center_user_permission_body' not in params or + params['remove_data_center_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `remove_data_center_user_permission_body` when calling `remove_data_center_user_permission`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'data_center_id' in params: + path_params['dataCenterId'] = params['data_center_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'remove_data_center_user_permission_body' in params: + body_params = params['remove_data_center_user_permission_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/data-centers/{dataCenterId}/remove-user-permission', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def remove_project_user_permission(self, project_id, remove_project_user_permission_body, **kwargs): # noqa: E501 + """Remove project user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_project_user_permission(project_id, remove_project_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param RemoveProjectUserPermissionBody remove_project_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.remove_project_user_permission_with_http_info(project_id, remove_project_user_permission_body, **kwargs) # noqa: E501 + else: + (data) = self.remove_project_user_permission_with_http_info(project_id, remove_project_user_permission_body, **kwargs) # noqa: E501 + return data + + def remove_project_user_permission_with_http_info(self, project_id, remove_project_user_permission_body, **kwargs): # noqa: E501 + """Remove project user # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_project_user_permission_with_http_info(project_id, remove_project_user_permission_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param RemoveProjectUserPermissionBody remove_project_user_permission_body: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'remove_project_user_permission_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method remove_project_user_permission" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `remove_project_user_permission`") # noqa: E501 + # verify the required parameter 'remove_project_user_permission_body' is set + if self.api_client.client_side_validation and ('remove_project_user_permission_body' not in params or + params['remove_project_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `remove_project_user_permission_body` when calling `remove_project_user_permission`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'remove_project_user_permission_body' in params: + body_params = params['remove_project_user_permission_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/remove-user-permission', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/projects_api.py b/docs/cudo_compute/api/projects_api.py new file mode 100644 index 0000000..fdc7330 --- /dev/null +++ b/docs/cudo_compute/api/projects_api.py @@ -0,0 +1,624 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class ProjectsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_project(self, project, **kwargs): # noqa: E501 + """Create # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_project(project, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Project project: (required) + :return: Project + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_project_with_http_info(project, **kwargs) # noqa: E501 + else: + (data) = self.create_project_with_http_info(project, **kwargs) # noqa: E501 + return data + + def create_project_with_http_info(self, project, **kwargs): # noqa: E501 + """Create # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_project_with_http_info(project, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param Project project: (required) + :return: Project + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_project" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project' is set + if self.api_client.client_side_validation and ('project' not in params or + params['project'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project` when calling `create_project`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'project' in params: + body_params = params['project'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Project', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_project(self, id, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_project(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_project_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_project_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_project_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_project_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_project" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_project`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_project(self, id, **kwargs): # noqa: E501 + """Get # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_project(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: Project + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_project_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_project_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_project_with_http_info(self, id, **kwargs): # noqa: E501 + """Get # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_project_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: Project + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_project" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_project`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Project', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_project_ssh_keys(self, project_id, **kwargs): # noqa: E501 + """List SSH keys # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_project_ssh_keys(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :return: ListProjectSshKeysResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_project_ssh_keys_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_project_ssh_keys_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_project_ssh_keys_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List SSH keys # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_project_ssh_keys_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :return: ListProjectSshKeysResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_project_ssh_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_project_ssh_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/project/{projectId}/ssh-keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListProjectSshKeysResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_projects(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_projects(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_token: + :param int page_size: + :return: ListProjectsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_projects_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_projects_with_http_info(**kwargs) # noqa: E501 + return data + + def list_projects_with_http_info(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_projects_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str page_token: + :param int page_size: + :return: ListProjectsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_token', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_projects" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_token' in params: + query_params.append(('pageToken', params['page_token'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListProjectsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_project(self, project_id, update_project_body, **kwargs): # noqa: E501 + """Update # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_project(project_id, update_project_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param UpdateProjectBody update_project_body: (required) + :return: Project + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_project_with_http_info(project_id, update_project_body, **kwargs) # noqa: E501 + else: + (data) = self.update_project_with_http_info(project_id, update_project_body, **kwargs) # noqa: E501 + return data + + def update_project_with_http_info(self, project_id, update_project_body, **kwargs): # noqa: E501 + """Update # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_project_with_http_info(project_id, update_project_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param UpdateProjectBody update_project_body: (required) + :return: Project + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'update_project_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_project" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `update_project`") # noqa: E501 + # verify the required parameter 'update_project_body' is set + if self.api_client.client_side_validation and ('update_project_body' not in params or + params['update_project_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `update_project_body` when calling `update_project`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['project.id'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_project_body' in params: + body_params = params['update_project_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{project.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Project', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/search_api.py b/docs/cudo_compute/api/search_api.py new file mode 100644 index 0000000..524244c --- /dev/null +++ b/docs/cudo_compute/api/search_api.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class SearchApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def list_regions(self, **kwargs): # noqa: E501 + """Regions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_regions(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListRegionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_regions_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_regions_with_http_info(**kwargs) # noqa: E501 + return data + + def list_regions_with_http_info(self, **kwargs): # noqa: E501 + """Regions # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_regions_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListRegionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_regions" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/regions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListRegionsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/ssh_keys_api.py b/docs/cudo_compute/api/ssh_keys_api.py new file mode 100644 index 0000000..a78e7bb --- /dev/null +++ b/docs/cudo_compute/api/ssh_keys_api.py @@ -0,0 +1,422 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class SSHKeysApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_ssh_key(self, ssh_key, **kwargs): # noqa: E501 + """Create # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_ssh_key(ssh_key, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SshKey ssh_key: (required) + :return: SshKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_ssh_key_with_http_info(ssh_key, **kwargs) # noqa: E501 + else: + (data) = self.create_ssh_key_with_http_info(ssh_key, **kwargs) # noqa: E501 + return data + + def create_ssh_key_with_http_info(self, ssh_key, **kwargs): # noqa: E501 + """Create # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_ssh_key_with_http_info(ssh_key, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param SshKey ssh_key: (required) + :return: SshKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['ssh_key'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_ssh_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'ssh_key' is set + if self.api_client.client_side_validation and ('ssh_key' not in params or + params['ssh_key'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `ssh_key` when calling `create_ssh_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'ssh_key' in params: + body_params = params['ssh_key'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/ssh-keys', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SshKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_ssh_key(self, id, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_ssh_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_ssh_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.delete_ssh_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def delete_ssh_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_ssh_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_ssh_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_ssh_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/ssh-keys/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_ssh_key(self, id, **kwargs): # noqa: E501 + """Get # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ssh_key(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: SshKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_ssh_key_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_ssh_key_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_ssh_key_with_http_info(self, id, **kwargs): # noqa: E501 + """Get # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ssh_key_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: (required) + :return: SshKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_ssh_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_ssh_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/ssh-keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SshKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_ssh_keys(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_ssh_keys(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_number: + :param int page_size: + :return: ListSshKeysResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_ssh_keys_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_ssh_keys_with_http_info(**kwargs) # noqa: E501 + return data + + def list_ssh_keys_with_http_info(self, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_ssh_keys_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page_number: + :param int page_size: + :return: ListSshKeysResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page_number', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_ssh_keys" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/ssh-keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListSshKeysResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/user_api.py b/docs/cudo_compute/api/user_api.py new file mode 100644 index 0000000..c5081be --- /dev/null +++ b/docs/cudo_compute/api/user_api.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class UserApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_identity_verification_session(self, **kwargs): # noqa: E501 + """Get identity verification session # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_identity_verification_session(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: IdentityVerificationSession + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_identity_verification_session_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_identity_verification_session_with_http_info(**kwargs) # noqa: E501 + return data + + def create_identity_verification_session_with_http_info(self, **kwargs): # noqa: E501 + """Get identity verification session # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_identity_verification_session_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: IdentityVerificationSession + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_identity_verification_session" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/auth/create-identity-verification-session', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IdentityVerificationSession', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_user(self, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + Deletes your user, deleting all records of your user, and revoking access to every resource. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: object + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_user_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.delete_user_with_http_info(**kwargs) # noqa: E501 + return data + + def delete_user_with_http_info(self, **kwargs): # noqa: E501 + """Delete # noqa: E501 + + Deletes your user, deleting all records of your user, and revoking access to every resource. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_user_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: object + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_user" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/auth', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='object', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get(self, **kwargs): # noqa: E501 + """Get # noqa: E501 + + Responds with details of the user when suitable authentication material is sent with the request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: Profile + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_with_http_info(**kwargs) # noqa: E501 + return data + + def get_with_http_info(self, **kwargs): # noqa: E501 + """Get # noqa: E501 + + Responds with details of the user when suitable authentication material is sent with the request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: Profile + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/auth', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Profile', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api/virtual_machines_api.py b/docs/cudo_compute/api/virtual_machines_api.py new file mode 100644 index 0000000..ad8aa4a --- /dev/null +++ b/docs/cudo_compute/api/virtual_machines_api.py @@ -0,0 +1,2644 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from src.cudo_compute.api_client import ApiClient + + +class VirtualMachinesApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def attach_security_group(self, project_id, id, **kwargs): # noqa: E501 + """Attach security group to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.attach_security_group(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str security_group_id: + :return: AttachSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.attach_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.attach_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def attach_security_group_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Attach security group to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.attach_security_group_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str security_group_id: + :return: AttachSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'security_group_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method attach_security_group" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `attach_security_group`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `attach_security_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'security_group_id' in params: + query_params.append(('securityGroupId', params['security_group_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vm/{id}/security-group/attach', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AttachSecurityGroupResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def connect_vm(self, project_id, id, **kwargs): # noqa: E501 + """Connect via VNC # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str connection_id: + :return: ConnectVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.connect_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.connect_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def connect_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Connect via VNC # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.connect_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str connection_id: + :return: ConnectVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'connection_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method connect_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `connect_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `connect_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'connection_id' in params: + query_params.append(('connectionId', params['connection_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/connect', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ConnectVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def count_vms(self, project_id, **kwargs): # noqa: E501 + """Count # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_vms(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :return: CountVMsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.count_vms_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.count_vms_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def count_vms_with_http_info(self, project_id, **kwargs): # noqa: E501 + """Count # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.count_vms_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :return: CountVMsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method count_vms" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `count_vms`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/count-vms', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CountVMsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_private_vm_image(self, project_id, vm_id, id, **kwargs): # noqa: E501 + """Create private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_private_vm_image(project_id, vm_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str vm_id: (required) + :param str id: (required) + :param str description: + :return: CreatePrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_private_vm_image_with_http_info(project_id, vm_id, id, **kwargs) # noqa: E501 + else: + (data) = self.create_private_vm_image_with_http_info(project_id, vm_id, id, **kwargs) # noqa: E501 + return data + + def create_private_vm_image_with_http_info(self, project_id, vm_id, id, **kwargs): # noqa: E501 + """Create private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_private_vm_image_with_http_info(project_id, vm_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str vm_id: (required) + :param str id: (required) + :param str description: + :return: CreatePrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'vm_id', 'id', 'description'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_private_vm_image" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `create_private_vm_image`") # noqa: E501 + # verify the required parameter 'vm_id' is set + if self.api_client.client_side_validation and ('vm_id' not in params or + params['vm_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `vm_id` when calling `create_private_vm_image`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `create_private_vm_image`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'vm_id' in params: + query_params.append(('vmId', params['vm_id'])) # noqa: E501 + if 'id' in params: + query_params.append(('id', params['id'])) # noqa: E501 + if 'description' in params: + query_params.append(('description', params['description'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/images', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreatePrivateVMImageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_vm(self, project_id, create_vm_body, **kwargs): # noqa: E501 + """Create virtual machine # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_vm(project_id, create_vm_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param CreateVMBody create_vm_body: (required) + :return: CreateVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_vm_with_http_info(project_id, create_vm_body, **kwargs) # noqa: E501 + else: + (data) = self.create_vm_with_http_info(project_id, create_vm_body, **kwargs) # noqa: E501 + return data + + def create_vm_with_http_info(self, project_id, create_vm_body, **kwargs): # noqa: E501 + """Create virtual machine # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_vm_with_http_info(project_id, create_vm_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param CreateVMBody create_vm_body: (required) + :return: CreateVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'create_vm_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `create_vm`") # noqa: E501 + # verify the required parameter 'create_vm_body' is set + if self.api_client.client_side_validation and ('create_vm_body' not in params or + params['create_vm_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_vm_body` when calling `create_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_vm_body' in params: + body_params = params['create_vm_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vm', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CreateVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_private_vm_image(self, project_id, id, **kwargs): # noqa: E501 + """Delete private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_private_vm_image(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeletePrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.delete_private_vm_image_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.delete_private_vm_image_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def delete_private_vm_image_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Delete private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_private_vm_image_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: DeletePrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_private_vm_image" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `delete_private_vm_image`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `delete_private_vm_image`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/images/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeletePrivateVMImageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def detach_security_group(self, project_id, id, **kwargs): # noqa: E501 + """Attach security group to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.detach_security_group(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str security_group_id: + :return: DetachSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.detach_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.detach_security_group_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def detach_security_group_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Attach security group to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.detach_security_group_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str security_group_id: + :return: DetachSecurityGroupResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'security_group_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method detach_security_group" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `detach_security_group`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `detach_security_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'security_group_id' in params: + query_params.append(('securityGroupId', params['security_group_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vm/{id}/security-group/detach', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DetachSecurityGroupResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_private_vm_image(self, project_id, id, **kwargs): # noqa: E501 + """Get private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_private_vm_image(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetPrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_private_vm_image_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.get_private_vm_image_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def get_private_vm_image_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Get private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_private_vm_image_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetPrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_private_vm_image" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_private_vm_image`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_private_vm_image`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/images/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetPrivateVMImageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_vm(self, project_id, id, **kwargs): # noqa: E501 + """Get # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.get_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def get_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Get # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: GetVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `get_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `get_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GetVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_private_vm_images(self, project_id, **kwargs): # noqa: E501 + """List private VM images # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_private_vm_images(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListPrivateVMImagesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_private_vm_images_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_private_vm_images_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_private_vm_images_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List private VM images # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_private_vm_images_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param int page_number: + :param int page_size: + :return: ListPrivateVMImagesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'page_number', 'page_size'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_private_vm_images" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_private_vm_images`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'page_number' in params: + query_params.append(('pageNumber', params['page_number'])) # noqa: E501 + if 'page_size' in params: + query_params.append(('pageSize', params['page_size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/images', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListPrivateVMImagesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_public_vm_images(self, **kwargs): # noqa: E501 + """List public VM images # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_public_vm_images(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListPublicVMImagesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_public_vm_images_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_public_vm_images_with_http_info(**kwargs) # noqa: E501 + return data + + def list_public_vm_images_with_http_info(self, **kwargs): # noqa: E501 + """List public VM images # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_public_vm_images_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListPublicVMImagesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_public_vm_images" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/vms/public-images', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListPublicVMImagesResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_vm_data_centers(self, **kwargs): # noqa: E501 + """List data centers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_data_centers(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[str] region_id: + :param bool renewable_energy: + :return: ListVMDataCentersResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_vm_data_centers_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_vm_data_centers_with_http_info(**kwargs) # noqa: E501 + return data + + def list_vm_data_centers_with_http_info(self, **kwargs): # noqa: E501 + """List data centers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_data_centers_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param list[str] region_id: + :param bool renewable_energy: + :return: ListVMDataCentersResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['region_id', 'renewable_energy'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_vm_data_centers" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'region_id' in params: + query_params.append(('regionId', params['region_id'])) # noqa: E501 + collection_formats['regionId'] = 'multi' # noqa: E501 + if 'renewable_energy' in params: + query_params.append(('renewableEnergy', params['renewable_energy'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/vms/data-centers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListVMDataCentersResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_vm_disks(self, project_id, id, **kwargs): # noqa: E501 + """List disks attached to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_disks(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: ListVMDisksResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_vm_disks_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.list_vm_disks_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def list_vm_disks_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """List disks attached to VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_disks_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: ListVMDisksResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_vm_disks" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_vm_disks`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `list_vm_disks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/disks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListVMDisksResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_vm_gpu_models(self, **kwargs): # noqa: E501 + """List GPU models # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_gpu_models(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListVMGpuModelsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_vm_gpu_models_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_vm_gpu_models_with_http_info(**kwargs) # noqa: E501 + return data + + def list_vm_gpu_models_with_http_info(self, **kwargs): # noqa: E501 + """List GPU models # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_gpu_models_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListVMGpuModelsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_vm_gpu_models" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/vms/gpu-models', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListVMGpuModelsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_vm_machine_types2(self, **kwargs): # noqa: E501 + """List machine types v2 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_machine_types2(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListVMMachineTypes2Response + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_vm_machine_types2_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_vm_machine_types2_with_http_info(**kwargs) # noqa: E501 + return data + + def list_vm_machine_types2_with_http_info(self, **kwargs): # noqa: E501 + """List machine types v2 # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vm_machine_types2_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListVMMachineTypes2Response + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_vm_machine_types2" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/vms/machine-types-2', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListVMMachineTypes2Response', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_vms(self, project_id, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vms(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str network_id: + :return: ListVMsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_vms_with_http_info(project_id, **kwargs) # noqa: E501 + else: + (data) = self.list_vms_with_http_info(project_id, **kwargs) # noqa: E501 + return data + + def list_vms_with_http_info(self, project_id, **kwargs): # noqa: E501 + """List # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_vms_with_http_info(project_id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str network_id: + :return: ListVMsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'network_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_vms" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `list_vms`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + + query_params = [] + if 'network_id' in params: + query_params.append(('networkId', params['network_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ListVMsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def monitor_vm(self, project_id, id, **kwargs): # noqa: E501 + """Monitor # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.monitor_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: MonitorVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.monitor_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.monitor_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def monitor_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Monitor # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.monitor_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: MonitorVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method monitor_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `monitor_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `monitor_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/monitor', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MonitorVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def reboot_vm(self, project_id, id, **kwargs): # noqa: E501 + """Reboot # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reboot_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: RebootVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.reboot_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.reboot_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def reboot_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Reboot # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reboot_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: RebootVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method reboot_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `reboot_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `reboot_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/reboot', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RebootVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def resize_vm(self, project_id, id, **kwargs): # noqa: E501 + """Resize vCPU and memory of VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resize_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param int vcpus: + :param int memory_gib: + :return: ResizeVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resize_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.resize_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def resize_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Resize vCPU and memory of VM # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resize_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param int vcpus: + :param int memory_gib: + :return: ResizeVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'vcpus', 'memory_gib'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resize_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `resize_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `resize_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'vcpus' in params: + query_params.append(('vcpus', params['vcpus'])) # noqa: E501 + if 'memory_gib' in params: + query_params.append(('memoryGib', params['memory_gib'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/resize', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResizeVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def resize_vm_disk(self, project_id, id, **kwargs): # noqa: E501 + """Resize a VM's disk # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resize_vm_disk(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str disk_id: + :param int size_gib: + :return: ResizeVMDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.resize_vm_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.resize_vm_disk_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def resize_vm_disk_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Resize a VM's disk # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.resize_vm_disk_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str disk_id: + :param int size_gib: + :return: ResizeVMDiskResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'disk_id', 'size_gib'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method resize_vm_disk" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `resize_vm_disk`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `resize_vm_disk`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'disk_id' in params: + query_params.append(('diskId', params['disk_id'])) # noqa: E501 + if 'size_gib' in params: + query_params.append(('sizeGib', params['size_gib'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/disks', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ResizeVMDiskResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def start_vm(self, project_id, id, **kwargs): # noqa: E501 + """Start # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.start_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StartVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.start_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.start_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def start_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Start # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.start_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StartVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method start_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `start_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `start_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/start', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StartVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def stop_vm(self, project_id, id, **kwargs): # noqa: E501 + """Stop # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stop_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StopVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.stop_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.stop_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def stop_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Stop # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.stop_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: StopVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method stop_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `stop_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `stop_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/stop', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='StopVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def terminate_vm(self, project_id, id, **kwargs): # noqa: E501 + """Terminate # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.terminate_vm(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: TerminateVMResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.terminate_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.terminate_vm_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def terminate_vm_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Terminate # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.terminate_vm_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :return: TerminateVMResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method terminate_vm" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `terminate_vm`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `terminate_vm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vms/{id}/terminate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TerminateVMResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_private_vm_image(self, project_id, id, **kwargs): # noqa: E501 + """Update private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_private_vm_image(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str description: + :return: UpdatePrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_private_vm_image_with_http_info(project_id, id, **kwargs) # noqa: E501 + else: + (data) = self.update_private_vm_image_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def update_private_vm_image_with_http_info(self, project_id, id, **kwargs): # noqa: E501 + """Update private VM image # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_private_vm_image_with_http_info(project_id, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str description: + :return: UpdatePrivateVMImageResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'description'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_private_vm_image" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `update_private_vm_image`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `update_private_vm_image`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + if 'description' in params: + query_params.append(('description', params['description'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/images/{id}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UpdatePrivateVMImageResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_vm_metadata(self, project_id, id, update_vm_metadata_body, **kwargs): # noqa: E501 + """Update VM metadata # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_vm_metadata(project_id, id, update_vm_metadata_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param UpdateVMMetadataBody update_vm_metadata_body: (required) + :return: UpdateVMMetadataResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.update_vm_metadata_with_http_info(project_id, id, update_vm_metadata_body, **kwargs) # noqa: E501 + else: + (data) = self.update_vm_metadata_with_http_info(project_id, id, update_vm_metadata_body, **kwargs) # noqa: E501 + return data + + def update_vm_metadata_with_http_info(self, project_id, id, update_vm_metadata_body, **kwargs): # noqa: E501 + """Update VM metadata # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_vm_metadata_with_http_info(project_id, id, update_vm_metadata_body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param UpdateVMMetadataBody update_vm_metadata_body: (required) + :return: UpdateVMMetadataResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'update_vm_metadata_body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_vm_metadata" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'project_id' is set + if self.api_client.client_side_validation and ('project_id' not in params or + params['project_id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `project_id` when calling `update_vm_metadata`") # noqa: E501 + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in params or + params['id'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `update_vm_metadata`") # noqa: E501 + # verify the required parameter 'update_vm_metadata_body' is set + if self.api_client.client_side_validation and ('update_vm_metadata_body' not in params or + params['update_vm_metadata_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `update_vm_metadata_body` when calling `update_vm_metadata`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'project_id' in params: + path_params['projectId'] = params['project_id'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_vm_metadata_body' in params: + body_params = params['update_vm_metadata_body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/v1/projects/{projectId}/vm/{id}/metadata', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UpdateVMMetadataResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/docs/cudo_compute/api_client.py b/docs/cudo_compute/api_client.py new file mode 100644 index 0000000..cbeb5c9 --- /dev/null +++ b/docs/cudo_compute/api_client.py @@ -0,0 +1,639 @@ +# coding: utf-8 +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from src.cudo_compute.configuration import Configuration +import src.cudo_compute.models +from src.cudo_compute import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + # Use the pool property to lazily initialize the ThreadPool. + self._pool = None + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/1.0.0/python' + self.client_side_validation = configuration.client_side_validation + + def __del__(self): + if self._pool is not None: + self._pool.close() + self._pool.join() + + @property + def pool(self): + if self._pool is None: + self._pool = ThreadPool() + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(src.cudo_compute.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "w") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __hasattr(self, object, name): + return name in object.__class__.__dict__ + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if (not klass.swagger_types and + not self.__hasattr(klass, 'get_real_child_model')): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if (isinstance(instance, dict) and + klass.swagger_types is not None and + isinstance(data, dict)): + for key, value in data.items(): + if key not in klass.swagger_types: + instance[key] = value + if self.__hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/docs/cudo_compute/configuration.py b/docs/cudo_compute/configuration.py new file mode 100644 index 0000000..3d9e17f --- /dev/null +++ b/docs/cudo_compute/configuration.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + _default = None + + def __init__(self): + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + + # Default Base url + self.host = "https://rest.compute.cudo.org" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # function to refresh API key if expired + self.refresh_api_key_hook = None + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("src.cudo_compute") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + # Disable client side validation + self.client_side_validation = True + + @classmethod + def set_default(cls, default): + cls._default = default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + + if self.refresh_api_key_hook: + self.refresh_api_key_hook(self) + + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + token = "" + if self.username or self.password: + token = urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + return token + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/docs/cudo_compute/models/__init__.py b/docs/cudo_compute/models/__init__.py new file mode 100644 index 0000000..55ace73 --- /dev/null +++ b/docs/cudo_compute/models/__init__.py @@ -0,0 +1,223 @@ +# coding: utf-8 + +# flake8: noqa +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from src.cudo_compute.models.activate_body import ActivateBody +from src.cudo_compute.models.add_billing_account_user_permission_body import AddBillingAccountUserPermissionBody +from src.cudo_compute.models.add_data_center_user_permission_body import AddDataCenterUserPermissionBody +from src.cudo_compute.models.add_project_user_permission_body import AddProjectUserPermissionBody +from src.cudo_compute.models.api_key import ApiKey +from src.cudo_compute.models.attach_security_group_response import AttachSecurityGroupResponse +from src.cudo_compute.models.attach_storage_disk_response import AttachStorageDiskResponse +from src.cudo_compute.models.billing_account import BillingAccount +from src.cudo_compute.models.billing_account_payment_method import BillingAccountPaymentMethod +from src.cudo_compute.models.billing_account_payment_methods import BillingAccountPaymentMethods +from src.cudo_compute.models.billing_account_project import BillingAccountProject +from src.cudo_compute.models.billing_account_result import BillingAccountResult +from src.cudo_compute.models.billing_account_setup_intent import BillingAccountSetupIntent +from src.cudo_compute.models.billing_account_spend_row import BillingAccountSpendRow +from src.cudo_compute.models.billing_account_state import BillingAccountState +from src.cudo_compute.models.billing_address import BillingAddress +from src.cudo_compute.models.charge import Charge +from src.cudo_compute.models.cluster import Cluster +from src.cudo_compute.models.commitment_term import CommitmentTerm +from src.cudo_compute.models.connect_vm_response import ConnectVMResponse +from src.cudo_compute.models.count_hosts_response import CountHostsResponse +from src.cudo_compute.models.count_vms_response import CountVMsResponse +from src.cudo_compute.models.cpu_topology import CpuTopology +from src.cudo_compute.models.create_billing_account_credit_payment_response import CreateBillingAccountCreditPaymentResponse +from src.cudo_compute.models.create_billing_account_request import CreateBillingAccountRequest +from src.cudo_compute.models.create_disk_snapshot_body import CreateDiskSnapshotBody +from src.cudo_compute.models.create_disk_snapshot_response import CreateDiskSnapshotResponse +from src.cudo_compute.models.create_network_body import CreateNetworkBody +from src.cudo_compute.models.create_network_response import CreateNetworkResponse +from src.cudo_compute.models.create_object_storage_user_body import CreateObjectStorageUserBody +from src.cudo_compute.models.create_private_vm_image_response import CreatePrivateVMImageResponse +from src.cudo_compute.models.create_security_group_response import CreateSecurityGroupResponse +from src.cudo_compute.models.create_storage_disk_body import CreateStorageDiskBody +from src.cudo_compute.models.create_storage_disk_response import CreateStorageDiskResponse +from src.cudo_compute.models.create_vm_body import CreateVMBody +from src.cudo_compute.models.create_vm_request_nic import CreateVMRequestNIC +from src.cudo_compute.models.create_vm_response import CreateVMResponse +from src.cudo_compute.models.credit_balance_recharge import CreditBalanceRecharge +from src.cudo_compute.models.credit_balance_transaction import CreditBalanceTransaction +from src.cudo_compute.models.data_center_commitment import DataCenterCommitment +from src.cudo_compute.models.data_center_commitment_interval import DataCenterCommitmentInterval +from src.cudo_compute.models.data_center_machine_type import DataCenterMachineType +from src.cudo_compute.models.data_center_revenue_resource import DataCenterRevenueResource +from src.cudo_compute.models.data_center_time_revenue import DataCenterTimeRevenue +from src.cudo_compute.models.decimal import Decimal +from src.cudo_compute.models.delete_disk_snapshot_response import DeleteDiskSnapshotResponse +from src.cudo_compute.models.delete_network_response import DeleteNetworkResponse +from src.cudo_compute.models.delete_private_vm_image_response import DeletePrivateVMImageResponse +from src.cudo_compute.models.delete_security_group_response import DeleteSecurityGroupResponse +from src.cudo_compute.models.delete_storage_disk_response import DeleteStorageDiskResponse +from src.cudo_compute.models.detach_security_group_response import DetachSecurityGroupResponse +from src.cudo_compute.models.detach_storage_disk_response import DetachStorageDiskResponse +from src.cudo_compute.models.disk import Disk +from src.cudo_compute.models.disk_result import DiskResult +from src.cudo_compute.models.disk_state import DiskState +from src.cudo_compute.models.disk_storage_class import DiskStorageClass +from src.cudo_compute.models.disk_storage_price_hr import DiskStoragePriceHr +from src.cudo_compute.models.disk_type import DiskType +from src.cudo_compute.models.generate_api_key_request import GenerateApiKeyRequest +from src.cudo_compute.models.get_billing_account_details_response import GetBillingAccountDetailsResponse +from src.cudo_compute.models.get_billing_account_spend_details_response import GetBillingAccountSpendDetailsResponse +from src.cudo_compute.models.get_data_center_commitment_schedule_response import GetDataCenterCommitmentScheduleResponse +from src.cudo_compute.models.get_data_center_commitment_time_series_request_interval import GetDataCenterCommitmentTimeSeriesRequestInterval +from src.cudo_compute.models.get_data_center_commitment_time_series_response import GetDataCenterCommitmentTimeSeriesResponse +from src.cudo_compute.models.get_data_center_live_utilization_response import GetDataCenterLiveUtilizationResponse +from src.cudo_compute.models.get_data_center_revenue_by_resource_response import GetDataCenterRevenueByResourceResponse +from src.cudo_compute.models.get_data_center_revenue_time_series_request_interval import GetDataCenterRevenueTimeSeriesRequestInterval +from src.cudo_compute.models.get_data_center_revenue_time_series_response import GetDataCenterRevenueTimeSeriesResponse +from src.cudo_compute.models.get_disk_response import GetDiskResponse +from src.cudo_compute.models.get_machine_type_live_utilization_response import GetMachineTypeLiveUtilizationResponse +from src.cudo_compute.models.get_machine_type_response import GetMachineTypeResponse +from src.cudo_compute.models.get_network_response import GetNetworkResponse +from src.cudo_compute.models.get_object_storage_session_key_response import GetObjectStorageSessionKeyResponse +from src.cudo_compute.models.get_private_vm_image_response import GetPrivateVMImageResponse +from src.cudo_compute.models.get_response import GetResponse +from src.cudo_compute.models.get_security_group_response import GetSecurityGroupResponse +from src.cudo_compute.models.get_vm_response import GetVMResponse +from src.cudo_compute.models.gpu_model import GpuModel +from src.cudo_compute.models.host import Host +from src.cudo_compute.models.identity_verification_session import IdentityVerificationSession +from src.cudo_compute.models.image import Image +from src.cudo_compute.models.image_result import ImageResult +from src.cudo_compute.models.invoice import Invoice +from src.cudo_compute.models.last_payment_error import LastPaymentError +from src.cudo_compute.models.list_api_keys_response import ListApiKeysResponse +from src.cudo_compute.models.list_billing_account_credit_balance_transactions_response import ListBillingAccountCreditBalanceTransactionsResponse +from src.cudo_compute.models.list_billing_account_invoices_response import ListBillingAccountInvoicesResponse +from src.cudo_compute.models.list_billing_account_projects_response import ListBillingAccountProjectsResponse +from src.cudo_compute.models.list_billing_account_transactions_response import ListBillingAccountTransactionsResponse +from src.cudo_compute.models.list_billing_accounts_response import ListBillingAccountsResponse +from src.cudo_compute.models.list_clusters_response import ListClustersResponse +from src.cudo_compute.models.list_data_center_machine_type_prices_response import ListDataCenterMachineTypePricesResponse +from src.cudo_compute.models.list_data_center_machine_type_prices_response_machine_type_price import ListDataCenterMachineTypePricesResponseMachineTypePrice +from src.cudo_compute.models.list_data_centers_response import ListDataCentersResponse +from src.cudo_compute.models.list_disk_snapshots_response import ListDiskSnapshotsResponse +from src.cudo_compute.models.list_disks_response import ListDisksResponse +from src.cudo_compute.models.list_hosts_response import ListHostsResponse +from src.cudo_compute.models.list_machine_types_response import ListMachineTypesResponse +from src.cudo_compute.models.list_networks_response import ListNetworksResponse +from src.cudo_compute.models.list_object_storage_buckets_response import ListObjectStorageBucketsResponse +from src.cudo_compute.models.list_object_storage_users_response import ListObjectStorageUsersResponse +from src.cudo_compute.models.list_outstanding_invoices_response import ListOutstandingInvoicesResponse +from src.cudo_compute.models.list_private_vm_images_response import ListPrivateVMImagesResponse +from src.cudo_compute.models.list_project_ssh_keys_response import ListProjectSshKeysResponse +from src.cudo_compute.models.list_projects_response import ListProjectsResponse +from src.cudo_compute.models.list_public_vm_images_response import ListPublicVMImagesResponse +from src.cudo_compute.models.list_regions_response import ListRegionsResponse +from src.cudo_compute.models.list_security_groups_response import ListSecurityGroupsResponse +from src.cudo_compute.models.list_ssh_keys_response import ListSshKeysResponse +from src.cudo_compute.models.list_user_permissions_response import ListUserPermissionsResponse +from src.cudo_compute.models.list_vm_data_centers_response import ListVMDataCentersResponse +from src.cudo_compute.models.list_vm_disks_response import ListVMDisksResponse +from src.cudo_compute.models.list_vm_gpu_models_response import ListVMGpuModelsResponse +from src.cudo_compute.models.list_vm_machine_types2_response import ListVMMachineTypes2Response +from src.cudo_compute.models.list_vm_machine_types2_response_vm_machine_type import ListVMMachineTypes2ResponseVMMachineType +from src.cudo_compute.models.list_vm_machine_types_response import ListVMMachineTypesResponse +from src.cudo_compute.models.list_vm_machine_types_response_vm_machine_type import ListVMMachineTypesResponseVMMachineType +from src.cudo_compute.models.list_vms_response import ListVMsResponse +from src.cudo_compute.models.monitor_vm_response import MonitorVMResponse +from src.cudo_compute.models.network import Network +from src.cudo_compute.models.network_price_hr import NetworkPriceHr +from src.cudo_compute.models.network_result import NetworkResult +from src.cudo_compute.models.network_state import NetworkState +from src.cudo_compute.models.object_storage_bucket import ObjectStorageBucket +from src.cudo_compute.models.object_storage_key import ObjectStorageKey +from src.cudo_compute.models.object_storage_user import ObjectStorageUser +from src.cudo_compute.models.package import Package +from src.cudo_compute.models.payment_intent import PaymentIntent +from src.cudo_compute.models.payment_method_card import PaymentMethodCard +from src.cudo_compute.models.payment_method_paypal import PaymentMethodPaypal +from src.cudo_compute.models.payment_terms import PaymentTerms +from src.cudo_compute.models.point import Point +from src.cudo_compute.models.private_image import PrivateImage +from src.cudo_compute.models.profile import Profile +from src.cudo_compute.models.project import Project +from src.cudo_compute.models.project_result import ProjectResult +from src.cudo_compute.models.protobuf_any import ProtobufAny +from src.cudo_compute.models.reboot_vm_response import RebootVMResponse +from src.cudo_compute.models.region import Region +from src.cudo_compute.models.region_data_center import RegionDataCenter +from src.cudo_compute.models.remove_billing_account_payment_method_response import RemoveBillingAccountPaymentMethodResponse +from src.cudo_compute.models.remove_billing_account_user_permission_body import RemoveBillingAccountUserPermissionBody +from src.cudo_compute.models.remove_data_center_user_permission_body import RemoveDataCenterUserPermissionBody +from src.cudo_compute.models.remove_project_user_permission_body import RemoveProjectUserPermissionBody +from src.cudo_compute.models.resize_vm_disk_response import ResizeVMDiskResponse +from src.cudo_compute.models.resize_vm_response import ResizeVMResponse +from src.cudo_compute.models.result import Result +from src.cudo_compute.models.revert_disk_response import RevertDiskResponse +from src.cudo_compute.models.role import Role +from src.cudo_compute.models.rule import Rule +from src.cudo_compute.models.rule_protocol import RuleProtocol +from src.cudo_compute.models.rule_rule_type import RuleRuleType +from src.cudo_compute.models.search_resources_response import SearchResourcesResponse +from src.cudo_compute.models.security_group import SecurityGroup +from src.cudo_compute.models.security_group1 import SecurityGroup1 +from src.cudo_compute.models.security_group_rule import SecurityGroupRule +from src.cudo_compute.models.security_group_rule_protocol import SecurityGroupRuleProtocol +from src.cudo_compute.models.security_group_rule_rule_type import SecurityGroupRuleRuleType +from src.cudo_compute.models.set_billing_account_default_payment_method_response import SetBillingAccountDefaultPaymentMethodResponse +from src.cudo_compute.models.snapshot import Snapshot +from src.cudo_compute.models.ssh_key import SshKey +from src.cudo_compute.models.ssh_key_source import SshKeySource +from src.cudo_compute.models.start_network_response import StartNetworkResponse +from src.cudo_compute.models.start_vm_response import StartVMResponse +from src.cudo_compute.models.status import Status +from src.cudo_compute.models.stop_network_response import StopNetworkResponse +from src.cudo_compute.models.stop_vm_response import StopVMResponse +from src.cudo_compute.models.stripe_customer import StripeCustomer +from src.cudo_compute.models.sync_response import SyncResponse +from src.cudo_compute.models.task import Task +from src.cudo_compute.models.tax_id import TaxId +from src.cudo_compute.models.terminate_vm_response import TerminateVMResponse +from src.cudo_compute.models.track_request import TrackRequest +from src.cudo_compute.models.transaction import Transaction +from src.cudo_compute.models.unit import Unit +from src.cudo_compute.models.update_billing_account_body import UpdateBillingAccountBody +from src.cudo_compute.models.update_billing_account_body_billing_account import UpdateBillingAccountBodyBillingAccount +from src.cudo_compute.models.update_data_center_body import UpdateDataCenterBody +from src.cudo_compute.models.update_data_center_body_data_center import UpdateDataCenterBodyDataCenter +from src.cudo_compute.models.update_host_response import UpdateHostResponse +from src.cudo_compute.models.update_image_response import UpdateImageResponse +from src.cudo_compute.models.update_net_response import UpdateNetResponse +from src.cudo_compute.models.update_private_vm_image_response import UpdatePrivateVMImageResponse +from src.cudo_compute.models.update_project_body import UpdateProjectBody +from src.cudo_compute.models.update_project_body_project import UpdateProjectBodyProject +from src.cudo_compute.models.update_security_group_response import UpdateSecurityGroupResponse +from src.cudo_compute.models.update_vm_expire_time_body import UpdateVMExpireTimeBody +from src.cudo_compute.models.update_vm_expire_time_response import UpdateVMExpireTimeResponse +from src.cudo_compute.models.update_vm_metadata_body import UpdateVMMetadataBody +from src.cudo_compute.models.update_vm_metadata_response import UpdateVMMetadataResponse +from src.cudo_compute.models.update_vm_password_body import UpdateVMPasswordBody +from src.cudo_compute.models.update_vm_password_response import UpdateVMPasswordResponse +from src.cudo_compute.models.update_vm_response import UpdateVMResponse +from src.cudo_compute.models.user_permission import UserPermission +from src.cudo_compute.models.v1_data_center import V1DataCenter +from src.cudo_compute.models.v1_v_router_size import V1VRouterSize +from src.cudo_compute.models.vm import VM +from src.cudo_compute.models.vm_data_center import VMDataCenter +from src.cudo_compute.models.vm_data_center_storage_class import VMDataCenterStorageClass +from src.cudo_compute.models.vm_data_center_v_router_size import VMDataCenterVRouterSize +from src.cudo_compute.models.vm_machine_type_machine_type_price import VMMachineTypeMachineTypePrice +from src.cudo_compute.models.vm_monitoring_item import VMMonitoringItem +from src.cudo_compute.models.vmnic import VMNIC +from src.cudo_compute.models.vm_price import VMPrice +from src.cudo_compute.models.virtual_machine_result import VirtualMachineResult +from src.cudo_compute.models.vm_state import VmState diff --git a/docs/cudo_compute/models/activate_body.py b/docs/cudo_compute/models/activate_body.py new file mode 100644 index 0000000..ea673e8 --- /dev/null +++ b/docs/cudo_compute/models/activate_body.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ActivateBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """ActivateBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ActivateBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ActivateBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ActivateBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/add_billing_account_user_permission_body.py b/docs/cudo_compute/models/add_billing_account_user_permission_body.py new file mode 100644 index 0000000..e3a93c3 --- /dev/null +++ b/docs/cudo_compute/models/add_billing_account_user_permission_body.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class AddBillingAccountUserPermissionBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'data_center_id': 'str', + 'user_email': 'str', + 'role': 'Role' + } + + attribute_map = { + 'project_id': 'projectId', + 'data_center_id': 'dataCenterId', + 'user_email': 'userEmail', + 'role': 'role' + } + + def __init__(self, project_id=None, data_center_id=None, user_email=None, role=None, _configuration=None): # noqa: E501 + """AddBillingAccountUserPermissionBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._data_center_id = None + self._user_email = None + self._role = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if data_center_id is not None: + self.data_center_id = data_center_id + self.user_email = user_email + self.role = role + + @property + def project_id(self): + """Gets the project_id of this AddBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The project_id of this AddBillingAccountUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this AddBillingAccountUserPermissionBody. + + + :param project_id: The project_id of this AddBillingAccountUserPermissionBody. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def data_center_id(self): + """Gets the data_center_id of this AddBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The data_center_id of this AddBillingAccountUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this AddBillingAccountUserPermissionBody. + + + :param data_center_id: The data_center_id of this AddBillingAccountUserPermissionBody. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def user_email(self): + """Gets the user_email of this AddBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The user_email of this AddBillingAccountUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._user_email + + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this AddBillingAccountUserPermissionBody. + + + :param user_email: The user_email of this AddBillingAccountUserPermissionBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_email is None: + raise ValueError("Invalid value for `user_email`, must not be `None`") # noqa: E501 + + self._user_email = user_email + + @property + def role(self): + """Gets the role of this AddBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The role of this AddBillingAccountUserPermissionBody. # noqa: E501 + :rtype: Role + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this AddBillingAccountUserPermissionBody. + + + :param role: The role of this AddBillingAccountUserPermissionBody. # noqa: E501 + :type: Role + """ + if self._configuration.client_side_validation and role is None: + raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 + + self._role = role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AddBillingAccountUserPermissionBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AddBillingAccountUserPermissionBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddBillingAccountUserPermissionBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/add_data_center_user_permission_body.py b/docs/cudo_compute/models/add_data_center_user_permission_body.py new file mode 100644 index 0000000..df5e310 --- /dev/null +++ b/docs/cudo_compute/models/add_data_center_user_permission_body.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class AddDataCenterUserPermissionBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'billing_account_id': 'str', + 'user_email': 'str', + 'role': 'Role' + } + + attribute_map = { + 'project_id': 'projectId', + 'billing_account_id': 'billingAccountId', + 'user_email': 'userEmail', + 'role': 'role' + } + + def __init__(self, project_id=None, billing_account_id=None, user_email=None, role=None, _configuration=None): # noqa: E501 + """AddDataCenterUserPermissionBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._billing_account_id = None + self._user_email = None + self._role = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if billing_account_id is not None: + self.billing_account_id = billing_account_id + self.user_email = user_email + self.role = role + + @property + def project_id(self): + """Gets the project_id of this AddDataCenterUserPermissionBody. # noqa: E501 + + + :return: The project_id of this AddDataCenterUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this AddDataCenterUserPermissionBody. + + + :param project_id: The project_id of this AddDataCenterUserPermissionBody. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def billing_account_id(self): + """Gets the billing_account_id of this AddDataCenterUserPermissionBody. # noqa: E501 + + + :return: The billing_account_id of this AddDataCenterUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._billing_account_id + + @billing_account_id.setter + def billing_account_id(self, billing_account_id): + """Sets the billing_account_id of this AddDataCenterUserPermissionBody. + + + :param billing_account_id: The billing_account_id of this AddDataCenterUserPermissionBody. # noqa: E501 + :type: str + """ + + self._billing_account_id = billing_account_id + + @property + def user_email(self): + """Gets the user_email of this AddDataCenterUserPermissionBody. # noqa: E501 + + + :return: The user_email of this AddDataCenterUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._user_email + + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this AddDataCenterUserPermissionBody. + + + :param user_email: The user_email of this AddDataCenterUserPermissionBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_email is None: + raise ValueError("Invalid value for `user_email`, must not be `None`") # noqa: E501 + + self._user_email = user_email + + @property + def role(self): + """Gets the role of this AddDataCenterUserPermissionBody. # noqa: E501 + + + :return: The role of this AddDataCenterUserPermissionBody. # noqa: E501 + :rtype: Role + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this AddDataCenterUserPermissionBody. + + + :param role: The role of this AddDataCenterUserPermissionBody. # noqa: E501 + :type: Role + """ + if self._configuration.client_side_validation and role is None: + raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 + + self._role = role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AddDataCenterUserPermissionBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AddDataCenterUserPermissionBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddDataCenterUserPermissionBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/add_project_user_permission_body.py b/docs/cudo_compute/models/add_project_user_permission_body.py new file mode 100644 index 0000000..3eaea2f --- /dev/null +++ b/docs/cudo_compute/models/add_project_user_permission_body.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class AddProjectUserPermissionBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'billing_account_id': 'str', + 'user_email': 'str', + 'role': 'Role' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'billing_account_id': 'billingAccountId', + 'user_email': 'userEmail', + 'role': 'role' + } + + def __init__(self, data_center_id=None, billing_account_id=None, user_email=None, role=None, _configuration=None): # noqa: E501 + """AddProjectUserPermissionBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._billing_account_id = None + self._user_email = None + self._role = None + self.discriminator = None + + if data_center_id is not None: + self.data_center_id = data_center_id + if billing_account_id is not None: + self.billing_account_id = billing_account_id + self.user_email = user_email + self.role = role + + @property + def data_center_id(self): + """Gets the data_center_id of this AddProjectUserPermissionBody. # noqa: E501 + + + :return: The data_center_id of this AddProjectUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this AddProjectUserPermissionBody. + + + :param data_center_id: The data_center_id of this AddProjectUserPermissionBody. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def billing_account_id(self): + """Gets the billing_account_id of this AddProjectUserPermissionBody. # noqa: E501 + + + :return: The billing_account_id of this AddProjectUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._billing_account_id + + @billing_account_id.setter + def billing_account_id(self, billing_account_id): + """Sets the billing_account_id of this AddProjectUserPermissionBody. + + + :param billing_account_id: The billing_account_id of this AddProjectUserPermissionBody. # noqa: E501 + :type: str + """ + + self._billing_account_id = billing_account_id + + @property + def user_email(self): + """Gets the user_email of this AddProjectUserPermissionBody. # noqa: E501 + + + :return: The user_email of this AddProjectUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._user_email + + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this AddProjectUserPermissionBody. + + + :param user_email: The user_email of this AddProjectUserPermissionBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_email is None: + raise ValueError("Invalid value for `user_email`, must not be `None`") # noqa: E501 + + self._user_email = user_email + + @property + def role(self): + """Gets the role of this AddProjectUserPermissionBody. # noqa: E501 + + + :return: The role of this AddProjectUserPermissionBody. # noqa: E501 + :rtype: Role + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this AddProjectUserPermissionBody. + + + :param role: The role of this AddProjectUserPermissionBody. # noqa: E501 + :type: Role + """ + if self._configuration.client_side_validation and role is None: + raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 + + self._role = role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AddProjectUserPermissionBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AddProjectUserPermissionBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AddProjectUserPermissionBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/api_key.py b/docs/cudo_compute/models/api_key.py new file mode 100644 index 0000000..0406bf4 --- /dev/null +++ b/docs/cudo_compute/models/api_key.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ApiKey(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'create_time': 'datetime', + 'key': 'str' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'createTime', + 'key': 'key' + } + + def __init__(self, id=None, create_time=None, key=None, _configuration=None): # noqa: E501 + """ApiKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._create_time = None + self._key = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if key is not None: + self.key = key + + @property + def id(self): + """Gets the id of this ApiKey. # noqa: E501 + + + :return: The id of this ApiKey. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ApiKey. + + + :param id: The id of this ApiKey. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this ApiKey. # noqa: E501 + + + :return: The create_time of this ApiKey. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ApiKey. + + + :param create_time: The create_time of this ApiKey. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def key(self): + """Gets the key of this ApiKey. # noqa: E501 + + + :return: The key of this ApiKey. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this ApiKey. + + + :param key: The key of this ApiKey. # noqa: E501 + :type: str + """ + + self._key = key + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ApiKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ApiKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ApiKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/attach_security_group_response.py b/docs/cudo_compute/models/attach_security_group_response.py new file mode 100644 index 0000000..03d60b9 --- /dev/null +++ b/docs/cudo_compute/models/attach_security_group_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class AttachSecurityGroupResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """AttachSecurityGroupResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AttachSecurityGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AttachSecurityGroupResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AttachSecurityGroupResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/attach_storage_disk_response.py b/docs/cudo_compute/models/attach_storage_disk_response.py new file mode 100644 index 0000000..bd8f1f2 --- /dev/null +++ b/docs/cudo_compute/models/attach_storage_disk_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class AttachStorageDiskResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """AttachStorageDiskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AttachStorageDiskResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AttachStorageDiskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AttachStorageDiskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account.py b/docs/cudo_compute/models/billing_account.py new file mode 100644 index 0000000..3e3d117 --- /dev/null +++ b/docs/cudo_compute/models/billing_account.py @@ -0,0 +1,565 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccount(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'create_time': 'datetime', + 'display_name': 'str', + 'stripe_ref': 'str', + 'create_by': 'str', + 'monthly_spend': 'str', + 'hourly_spend_rate': 'Decimal', + 'tax_id': 'TaxId', + 'invoice_time': 'datetime', + 'billing_threshold': 'Decimal', + 'monthly_spend_limit': 'Decimal', + 'hourly_spend_limit': 'Decimal', + 'next_invoice_total': 'Decimal', + 'credit_balance': 'Decimal', + 'credit_balance_recharge': 'CreditBalanceRecharge', + 'billing_address': 'BillingAddress', + 'state': 'BillingAccountState', + 'payment_terms': 'PaymentTerms' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'createTime', + 'display_name': 'displayName', + 'stripe_ref': 'stripeRef', + 'create_by': 'createBy', + 'monthly_spend': 'monthlySpend', + 'hourly_spend_rate': 'hourlySpendRate', + 'tax_id': 'taxId', + 'invoice_time': 'invoiceTime', + 'billing_threshold': 'billingThreshold', + 'monthly_spend_limit': 'monthlySpendLimit', + 'hourly_spend_limit': 'hourlySpendLimit', + 'next_invoice_total': 'nextInvoiceTotal', + 'credit_balance': 'creditBalance', + 'credit_balance_recharge': 'creditBalanceRecharge', + 'billing_address': 'billingAddress', + 'state': 'state', + 'payment_terms': 'paymentTerms' + } + + def __init__(self, id=None, create_time=None, display_name=None, stripe_ref=None, create_by=None, monthly_spend=None, hourly_spend_rate=None, tax_id=None, invoice_time=None, billing_threshold=None, monthly_spend_limit=None, hourly_spend_limit=None, next_invoice_total=None, credit_balance=None, credit_balance_recharge=None, billing_address=None, state=None, payment_terms=None, _configuration=None): # noqa: E501 + """BillingAccount - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._create_time = None + self._display_name = None + self._stripe_ref = None + self._create_by = None + self._monthly_spend = None + self._hourly_spend_rate = None + self._tax_id = None + self._invoice_time = None + self._billing_threshold = None + self._monthly_spend_limit = None + self._hourly_spend_limit = None + self._next_invoice_total = None + self._credit_balance = None + self._credit_balance_recharge = None + self._billing_address = None + self._state = None + self._payment_terms = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + if display_name is not None: + self.display_name = display_name + if stripe_ref is not None: + self.stripe_ref = stripe_ref + if create_by is not None: + self.create_by = create_by + if monthly_spend is not None: + self.monthly_spend = monthly_spend + if hourly_spend_rate is not None: + self.hourly_spend_rate = hourly_spend_rate + if tax_id is not None: + self.tax_id = tax_id + if invoice_time is not None: + self.invoice_time = invoice_time + if billing_threshold is not None: + self.billing_threshold = billing_threshold + if monthly_spend_limit is not None: + self.monthly_spend_limit = monthly_spend_limit + if hourly_spend_limit is not None: + self.hourly_spend_limit = hourly_spend_limit + if next_invoice_total is not None: + self.next_invoice_total = next_invoice_total + if credit_balance is not None: + self.credit_balance = credit_balance + if credit_balance_recharge is not None: + self.credit_balance_recharge = credit_balance_recharge + if billing_address is not None: + self.billing_address = billing_address + if state is not None: + self.state = state + if payment_terms is not None: + self.payment_terms = payment_terms + + @property + def id(self): + """Gets the id of this BillingAccount. # noqa: E501 + + + :return: The id of this BillingAccount. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BillingAccount. + + + :param id: The id of this BillingAccount. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this BillingAccount. # noqa: E501 + + + :return: The create_time of this BillingAccount. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this BillingAccount. + + + :param create_time: The create_time of this BillingAccount. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def display_name(self): + """Gets the display_name of this BillingAccount. # noqa: E501 + + + :return: The display_name of this BillingAccount. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this BillingAccount. + + + :param display_name: The display_name of this BillingAccount. # noqa: E501 + :type: str + """ + + self._display_name = display_name + + @property + def stripe_ref(self): + """Gets the stripe_ref of this BillingAccount. # noqa: E501 + + + :return: The stripe_ref of this BillingAccount. # noqa: E501 + :rtype: str + """ + return self._stripe_ref + + @stripe_ref.setter + def stripe_ref(self, stripe_ref): + """Sets the stripe_ref of this BillingAccount. + + + :param stripe_ref: The stripe_ref of this BillingAccount. # noqa: E501 + :type: str + """ + + self._stripe_ref = stripe_ref + + @property + def create_by(self): + """Gets the create_by of this BillingAccount. # noqa: E501 + + + :return: The create_by of this BillingAccount. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this BillingAccount. + + + :param create_by: The create_by of this BillingAccount. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def monthly_spend(self): + """Gets the monthly_spend of this BillingAccount. # noqa: E501 + + + :return: The monthly_spend of this BillingAccount. # noqa: E501 + :rtype: str + """ + return self._monthly_spend + + @monthly_spend.setter + def monthly_spend(self, monthly_spend): + """Sets the monthly_spend of this BillingAccount. + + + :param monthly_spend: The monthly_spend of this BillingAccount. # noqa: E501 + :type: str + """ + + self._monthly_spend = monthly_spend + + @property + def hourly_spend_rate(self): + """Gets the hourly_spend_rate of this BillingAccount. # noqa: E501 + + + :return: The hourly_spend_rate of this BillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._hourly_spend_rate + + @hourly_spend_rate.setter + def hourly_spend_rate(self, hourly_spend_rate): + """Sets the hourly_spend_rate of this BillingAccount. + + + :param hourly_spend_rate: The hourly_spend_rate of this BillingAccount. # noqa: E501 + :type: Decimal + """ + + self._hourly_spend_rate = hourly_spend_rate + + @property + def tax_id(self): + """Gets the tax_id of this BillingAccount. # noqa: E501 + + + :return: The tax_id of this BillingAccount. # noqa: E501 + :rtype: TaxId + """ + return self._tax_id + + @tax_id.setter + def tax_id(self, tax_id): + """Sets the tax_id of this BillingAccount. + + + :param tax_id: The tax_id of this BillingAccount. # noqa: E501 + :type: TaxId + """ + + self._tax_id = tax_id + + @property + def invoice_time(self): + """Gets the invoice_time of this BillingAccount. # noqa: E501 + + + :return: The invoice_time of this BillingAccount. # noqa: E501 + :rtype: datetime + """ + return self._invoice_time + + @invoice_time.setter + def invoice_time(self, invoice_time): + """Sets the invoice_time of this BillingAccount. + + + :param invoice_time: The invoice_time of this BillingAccount. # noqa: E501 + :type: datetime + """ + + self._invoice_time = invoice_time + + @property + def billing_threshold(self): + """Gets the billing_threshold of this BillingAccount. # noqa: E501 + + + :return: The billing_threshold of this BillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._billing_threshold + + @billing_threshold.setter + def billing_threshold(self, billing_threshold): + """Sets the billing_threshold of this BillingAccount. + + + :param billing_threshold: The billing_threshold of this BillingAccount. # noqa: E501 + :type: Decimal + """ + + self._billing_threshold = billing_threshold + + @property + def monthly_spend_limit(self): + """Gets the monthly_spend_limit of this BillingAccount. # noqa: E501 + + + :return: The monthly_spend_limit of this BillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._monthly_spend_limit + + @monthly_spend_limit.setter + def monthly_spend_limit(self, monthly_spend_limit): + """Sets the monthly_spend_limit of this BillingAccount. + + + :param monthly_spend_limit: The monthly_spend_limit of this BillingAccount. # noqa: E501 + :type: Decimal + """ + + self._monthly_spend_limit = monthly_spend_limit + + @property + def hourly_spend_limit(self): + """Gets the hourly_spend_limit of this BillingAccount. # noqa: E501 + + + :return: The hourly_spend_limit of this BillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._hourly_spend_limit + + @hourly_spend_limit.setter + def hourly_spend_limit(self, hourly_spend_limit): + """Sets the hourly_spend_limit of this BillingAccount. + + + :param hourly_spend_limit: The hourly_spend_limit of this BillingAccount. # noqa: E501 + :type: Decimal + """ + + self._hourly_spend_limit = hourly_spend_limit + + @property + def next_invoice_total(self): + """Gets the next_invoice_total of this BillingAccount. # noqa: E501 + + + :return: The next_invoice_total of this BillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._next_invoice_total + + @next_invoice_total.setter + def next_invoice_total(self, next_invoice_total): + """Sets the next_invoice_total of this BillingAccount. + + + :param next_invoice_total: The next_invoice_total of this BillingAccount. # noqa: E501 + :type: Decimal + """ + + self._next_invoice_total = next_invoice_total + + @property + def credit_balance(self): + """Gets the credit_balance of this BillingAccount. # noqa: E501 + + + :return: The credit_balance of this BillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._credit_balance + + @credit_balance.setter + def credit_balance(self, credit_balance): + """Sets the credit_balance of this BillingAccount. + + + :param credit_balance: The credit_balance of this BillingAccount. # noqa: E501 + :type: Decimal + """ + + self._credit_balance = credit_balance + + @property + def credit_balance_recharge(self): + """Gets the credit_balance_recharge of this BillingAccount. # noqa: E501 + + + :return: The credit_balance_recharge of this BillingAccount. # noqa: E501 + :rtype: CreditBalanceRecharge + """ + return self._credit_balance_recharge + + @credit_balance_recharge.setter + def credit_balance_recharge(self, credit_balance_recharge): + """Sets the credit_balance_recharge of this BillingAccount. + + + :param credit_balance_recharge: The credit_balance_recharge of this BillingAccount. # noqa: E501 + :type: CreditBalanceRecharge + """ + + self._credit_balance_recharge = credit_balance_recharge + + @property + def billing_address(self): + """Gets the billing_address of this BillingAccount. # noqa: E501 + + + :return: The billing_address of this BillingAccount. # noqa: E501 + :rtype: BillingAddress + """ + return self._billing_address + + @billing_address.setter + def billing_address(self, billing_address): + """Sets the billing_address of this BillingAccount. + + + :param billing_address: The billing_address of this BillingAccount. # noqa: E501 + :type: BillingAddress + """ + + self._billing_address = billing_address + + @property + def state(self): + """Gets the state of this BillingAccount. # noqa: E501 + + + :return: The state of this BillingAccount. # noqa: E501 + :rtype: BillingAccountState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this BillingAccount. + + + :param state: The state of this BillingAccount. # noqa: E501 + :type: BillingAccountState + """ + + self._state = state + + @property + def payment_terms(self): + """Gets the payment_terms of this BillingAccount. # noqa: E501 + + + :return: The payment_terms of this BillingAccount. # noqa: E501 + :rtype: PaymentTerms + """ + return self._payment_terms + + @payment_terms.setter + def payment_terms(self, payment_terms): + """Sets the payment_terms of this BillingAccount. + + + :param payment_terms: The payment_terms of this BillingAccount. # noqa: E501 + :type: PaymentTerms + """ + + self._payment_terms = payment_terms + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccount, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account_payment_method.py b/docs/cudo_compute/models/billing_account_payment_method.py new file mode 100644 index 0000000..fbf8fd5 --- /dev/null +++ b/docs/cudo_compute/models/billing_account_payment_method.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccountPaymentMethod(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'type': 'str', + 'card': 'PaymentMethodCard', + 'paypal': 'PaymentMethodPaypal', + 'is_default': 'bool' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'card': 'card', + 'paypal': 'paypal', + 'is_default': 'isDefault' + } + + def __init__(self, id=None, type=None, card=None, paypal=None, is_default=None, _configuration=None): # noqa: E501 + """BillingAccountPaymentMethod - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._type = None + self._card = None + self._paypal = None + self._is_default = None + self.discriminator = None + + if id is not None: + self.id = id + if type is not None: + self.type = type + if card is not None: + self.card = card + if paypal is not None: + self.paypal = paypal + if is_default is not None: + self.is_default = is_default + + @property + def id(self): + """Gets the id of this BillingAccountPaymentMethod. # noqa: E501 + + + :return: The id of this BillingAccountPaymentMethod. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BillingAccountPaymentMethod. + + + :param id: The id of this BillingAccountPaymentMethod. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def type(self): + """Gets the type of this BillingAccountPaymentMethod. # noqa: E501 + + + :return: The type of this BillingAccountPaymentMethod. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this BillingAccountPaymentMethod. + + + :param type: The type of this BillingAccountPaymentMethod. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def card(self): + """Gets the card of this BillingAccountPaymentMethod. # noqa: E501 + + + :return: The card of this BillingAccountPaymentMethod. # noqa: E501 + :rtype: PaymentMethodCard + """ + return self._card + + @card.setter + def card(self, card): + """Sets the card of this BillingAccountPaymentMethod. + + + :param card: The card of this BillingAccountPaymentMethod. # noqa: E501 + :type: PaymentMethodCard + """ + + self._card = card + + @property + def paypal(self): + """Gets the paypal of this BillingAccountPaymentMethod. # noqa: E501 + + + :return: The paypal of this BillingAccountPaymentMethod. # noqa: E501 + :rtype: PaymentMethodPaypal + """ + return self._paypal + + @paypal.setter + def paypal(self, paypal): + """Sets the paypal of this BillingAccountPaymentMethod. + + + :param paypal: The paypal of this BillingAccountPaymentMethod. # noqa: E501 + :type: PaymentMethodPaypal + """ + + self._paypal = paypal + + @property + def is_default(self): + """Gets the is_default of this BillingAccountPaymentMethod. # noqa: E501 + + + :return: The is_default of this BillingAccountPaymentMethod. # noqa: E501 + :rtype: bool + """ + return self._is_default + + @is_default.setter + def is_default(self, is_default): + """Sets the is_default of this BillingAccountPaymentMethod. + + + :param is_default: The is_default of this BillingAccountPaymentMethod. # noqa: E501 + :type: bool + """ + + self._is_default = is_default + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccountPaymentMethod, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccountPaymentMethod): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccountPaymentMethod): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account_payment_methods.py b/docs/cudo_compute/models/billing_account_payment_methods.py new file mode 100644 index 0000000..3fd32be --- /dev/null +++ b/docs/cudo_compute/models/billing_account_payment_methods.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccountPaymentMethods(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payment_methods': 'list[BillingAccountPaymentMethod]' + } + + attribute_map = { + 'payment_methods': 'paymentMethods' + } + + def __init__(self, payment_methods=None, _configuration=None): # noqa: E501 + """BillingAccountPaymentMethods - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._payment_methods = None + self.discriminator = None + + if payment_methods is not None: + self.payment_methods = payment_methods + + @property + def payment_methods(self): + """Gets the payment_methods of this BillingAccountPaymentMethods. # noqa: E501 + + + :return: The payment_methods of this BillingAccountPaymentMethods. # noqa: E501 + :rtype: list[BillingAccountPaymentMethod] + """ + return self._payment_methods + + @payment_methods.setter + def payment_methods(self, payment_methods): + """Sets the payment_methods of this BillingAccountPaymentMethods. + + + :param payment_methods: The payment_methods of this BillingAccountPaymentMethods. # noqa: E501 + :type: list[BillingAccountPaymentMethod] + """ + + self._payment_methods = payment_methods + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccountPaymentMethods, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccountPaymentMethods): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccountPaymentMethods): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account_project.py b/docs/cudo_compute/models/billing_account_project.py new file mode 100644 index 0000000..789990b --- /dev/null +++ b/docs/cudo_compute/models/billing_account_project.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccountProject(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'resource_count': 'int' + } + + attribute_map = { + 'id': 'id', + 'resource_count': 'resourceCount' + } + + def __init__(self, id=None, resource_count=None, _configuration=None): # noqa: E501 + """BillingAccountProject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._resource_count = None + self.discriminator = None + + self.id = id + self.resource_count = resource_count + + @property + def id(self): + """Gets the id of this BillingAccountProject. # noqa: E501 + + + :return: The id of this BillingAccountProject. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BillingAccountProject. + + + :param id: The id of this BillingAccountProject. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def resource_count(self): + """Gets the resource_count of this BillingAccountProject. # noqa: E501 + + + :return: The resource_count of this BillingAccountProject. # noqa: E501 + :rtype: int + """ + return self._resource_count + + @resource_count.setter + def resource_count(self, resource_count): + """Sets the resource_count of this BillingAccountProject. + + + :param resource_count: The resource_count of this BillingAccountProject. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and resource_count is None: + raise ValueError("Invalid value for `resource_count`, must not be `None`") # noqa: E501 + + self._resource_count = resource_count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccountProject, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccountProject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccountProject): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account_result.py b/docs/cudo_compute/models/billing_account_result.py new file mode 100644 index 0000000..d734323 --- /dev/null +++ b/docs/cudo_compute/models/billing_account_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccountResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'create_time': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'create_time': 'createTime' + } + + def __init__(self, id=None, display_name=None, create_time=None, _configuration=None): # noqa: E501 + """BillingAccountResult - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._display_name = None + self._create_time = None + self.discriminator = None + + if id is not None: + self.id = id + if display_name is not None: + self.display_name = display_name + if create_time is not None: + self.create_time = create_time + + @property + def id(self): + """Gets the id of this BillingAccountResult. # noqa: E501 + + + :return: The id of this BillingAccountResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BillingAccountResult. + + + :param id: The id of this BillingAccountResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def display_name(self): + """Gets the display_name of this BillingAccountResult. # noqa: E501 + + + :return: The display_name of this BillingAccountResult. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this BillingAccountResult. + + + :param display_name: The display_name of this BillingAccountResult. # noqa: E501 + :type: str + """ + + self._display_name = display_name + + @property + def create_time(self): + """Gets the create_time of this BillingAccountResult. # noqa: E501 + + + :return: The create_time of this BillingAccountResult. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this BillingAccountResult. + + + :param create_time: The create_time of this BillingAccountResult. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccountResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccountResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccountResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account_setup_intent.py b/docs/cudo_compute/models/billing_account_setup_intent.py new file mode 100644 index 0000000..0108c56 --- /dev/null +++ b/docs/cudo_compute/models/billing_account_setup_intent.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccountSetupIntent(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'client_secret': 'str' + } + + attribute_map = { + 'id': 'id', + 'client_secret': 'clientSecret' + } + + def __init__(self, id=None, client_secret=None, _configuration=None): # noqa: E501 + """BillingAccountSetupIntent - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._client_secret = None + self.discriminator = None + + self.id = id + self.client_secret = client_secret + + @property + def id(self): + """Gets the id of this BillingAccountSetupIntent. # noqa: E501 + + + :return: The id of this BillingAccountSetupIntent. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BillingAccountSetupIntent. + + + :param id: The id of this BillingAccountSetupIntent. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def client_secret(self): + """Gets the client_secret of this BillingAccountSetupIntent. # noqa: E501 + + + :return: The client_secret of this BillingAccountSetupIntent. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this BillingAccountSetupIntent. + + + :param client_secret: The client_secret of this BillingAccountSetupIntent. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and client_secret is None: + raise ValueError("Invalid value for `client_secret`, must not be `None`") # noqa: E501 + + self._client_secret = client_secret + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccountSetupIntent, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccountSetupIntent): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccountSetupIntent): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account_spend_row.py b/docs/cudo_compute/models/billing_account_spend_row.py new file mode 100644 index 0000000..9448d2f --- /dev/null +++ b/docs/cudo_compute/models/billing_account_spend_row.py @@ -0,0 +1,259 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccountSpendRow(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'description': 'str', + 'quantity': 'float', + 'unit': 'Unit', + 'unit_amount': 'Decimal', + 'amount': 'Decimal' + } + + attribute_map = { + 'project_id': 'projectId', + 'description': 'description', + 'quantity': 'quantity', + 'unit': 'unit', + 'unit_amount': 'unitAmount', + 'amount': 'amount' + } + + def __init__(self, project_id=None, description=None, quantity=None, unit=None, unit_amount=None, amount=None, _configuration=None): # noqa: E501 + """BillingAccountSpendRow - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._description = None + self._quantity = None + self._unit = None + self._unit_amount = None + self._amount = None + self.discriminator = None + + self.project_id = project_id + self.description = description + self.quantity = quantity + self.unit = unit + self.unit_amount = unit_amount + self.amount = amount + + @property + def project_id(self): + """Gets the project_id of this BillingAccountSpendRow. # noqa: E501 + + + :return: The project_id of this BillingAccountSpendRow. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this BillingAccountSpendRow. + + + :param project_id: The project_id of this BillingAccountSpendRow. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and project_id is None: + raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501 + + self._project_id = project_id + + @property + def description(self): + """Gets the description of this BillingAccountSpendRow. # noqa: E501 + + + :return: The description of this BillingAccountSpendRow. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this BillingAccountSpendRow. + + + :param description: The description of this BillingAccountSpendRow. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and description is None: + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + @property + def quantity(self): + """Gets the quantity of this BillingAccountSpendRow. # noqa: E501 + + + :return: The quantity of this BillingAccountSpendRow. # noqa: E501 + :rtype: float + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """Sets the quantity of this BillingAccountSpendRow. + + + :param quantity: The quantity of this BillingAccountSpendRow. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and quantity is None: + raise ValueError("Invalid value for `quantity`, must not be `None`") # noqa: E501 + + self._quantity = quantity + + @property + def unit(self): + """Gets the unit of this BillingAccountSpendRow. # noqa: E501 + + + :return: The unit of this BillingAccountSpendRow. # noqa: E501 + :rtype: Unit + """ + return self._unit + + @unit.setter + def unit(self, unit): + """Sets the unit of this BillingAccountSpendRow. + + + :param unit: The unit of this BillingAccountSpendRow. # noqa: E501 + :type: Unit + """ + if self._configuration.client_side_validation and unit is None: + raise ValueError("Invalid value for `unit`, must not be `None`") # noqa: E501 + + self._unit = unit + + @property + def unit_amount(self): + """Gets the unit_amount of this BillingAccountSpendRow. # noqa: E501 + + + :return: The unit_amount of this BillingAccountSpendRow. # noqa: E501 + :rtype: Decimal + """ + return self._unit_amount + + @unit_amount.setter + def unit_amount(self, unit_amount): + """Sets the unit_amount of this BillingAccountSpendRow. + + + :param unit_amount: The unit_amount of this BillingAccountSpendRow. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and unit_amount is None: + raise ValueError("Invalid value for `unit_amount`, must not be `None`") # noqa: E501 + + self._unit_amount = unit_amount + + @property + def amount(self): + """Gets the amount of this BillingAccountSpendRow. # noqa: E501 + + + :return: The amount of this BillingAccountSpendRow. # noqa: E501 + :rtype: Decimal + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this BillingAccountSpendRow. + + + :param amount: The amount of this BillingAccountSpendRow. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccountSpendRow, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccountSpendRow): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccountSpendRow): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_account_state.py b/docs/cudo_compute/models/billing_account_state.py new file mode 100644 index 0000000..1813f65 --- /dev/null +++ b/docs/cudo_compute/models/billing_account_state.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAccountState(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNSPECIFIED = "STATE_UNSPECIFIED" + ACTIVE = "STATE_ACTIVE" + SUSPENDED_ABUSE = "STATE_SUSPENDED_ABUSE" + SUSPENDED_PAYMENT = "STATE_SUSPENDED_PAYMENT" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """BillingAccountState - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAccountState, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAccountState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAccountState): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/billing_address.py b/docs/cudo_compute/models/billing_address.py new file mode 100644 index 0000000..390c562 --- /dev/null +++ b/docs/cudo_compute/models/billing_address.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class BillingAddress(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'phone': 'str', + 'city': 'str', + 'line1': 'str', + 'line2': 'str', + 'state': 'str', + 'postal_code': 'str', + 'country': 'str' + } + + attribute_map = { + 'name': 'name', + 'phone': 'phone', + 'city': 'city', + 'line1': 'line1', + 'line2': 'line2', + 'state': 'state', + 'postal_code': 'postalCode', + 'country': 'country' + } + + def __init__(self, name=None, phone=None, city=None, line1=None, line2=None, state=None, postal_code=None, country=None, _configuration=None): # noqa: E501 + """BillingAddress - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._phone = None + self._city = None + self._line1 = None + self._line2 = None + self._state = None + self._postal_code = None + self._country = None + self.discriminator = None + + if name is not None: + self.name = name + if phone is not None: + self.phone = phone + if city is not None: + self.city = city + if line1 is not None: + self.line1 = line1 + if line2 is not None: + self.line2 = line2 + if state is not None: + self.state = state + if postal_code is not None: + self.postal_code = postal_code + if country is not None: + self.country = country + + @property + def name(self): + """Gets the name of this BillingAddress. # noqa: E501 + + + :return: The name of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this BillingAddress. + + + :param name: The name of this BillingAddress. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def phone(self): + """Gets the phone of this BillingAddress. # noqa: E501 + + + :return: The phone of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._phone + + @phone.setter + def phone(self, phone): + """Sets the phone of this BillingAddress. + + + :param phone: The phone of this BillingAddress. # noqa: E501 + :type: str + """ + + self._phone = phone + + @property + def city(self): + """Gets the city of this BillingAddress. # noqa: E501 + + + :return: The city of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """Sets the city of this BillingAddress. + + + :param city: The city of this BillingAddress. # noqa: E501 + :type: str + """ + + self._city = city + + @property + def line1(self): + """Gets the line1 of this BillingAddress. # noqa: E501 + + + :return: The line1 of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._line1 + + @line1.setter + def line1(self, line1): + """Sets the line1 of this BillingAddress. + + + :param line1: The line1 of this BillingAddress. # noqa: E501 + :type: str + """ + + self._line1 = line1 + + @property + def line2(self): + """Gets the line2 of this BillingAddress. # noqa: E501 + + + :return: The line2 of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._line2 + + @line2.setter + def line2(self, line2): + """Sets the line2 of this BillingAddress. + + + :param line2: The line2 of this BillingAddress. # noqa: E501 + :type: str + """ + + self._line2 = line2 + + @property + def state(self): + """Gets the state of this BillingAddress. # noqa: E501 + + + :return: The state of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this BillingAddress. + + + :param state: The state of this BillingAddress. # noqa: E501 + :type: str + """ + + self._state = state + + @property + def postal_code(self): + """Gets the postal_code of this BillingAddress. # noqa: E501 + + + :return: The postal_code of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._postal_code + + @postal_code.setter + def postal_code(self, postal_code): + """Sets the postal_code of this BillingAddress. + + + :param postal_code: The postal_code of this BillingAddress. # noqa: E501 + :type: str + """ + + self._postal_code = postal_code + + @property + def country(self): + """Gets the country of this BillingAddress. # noqa: E501 + + + :return: The country of this BillingAddress. # noqa: E501 + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """Sets the country of this BillingAddress. + + + :param country: The country of this BillingAddress. # noqa: E501 + :type: str + """ + + self._country = country + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BillingAddress, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BillingAddress): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BillingAddress): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/charge.py b/docs/cudo_compute/models/charge.py new file mode 100644 index 0000000..1aef36b --- /dev/null +++ b/docs/cudo_compute/models/charge.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Charge(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'amount': 'Decimal', + 'create_time': 'datetime', + 'paid': 'bool', + 'refunded': 'bool', + 'status': 'str', + 'failure_code': 'str' + } + + attribute_map = { + 'amount': 'amount', + 'create_time': 'createTime', + 'paid': 'paid', + 'refunded': 'refunded', + 'status': 'status', + 'failure_code': 'failureCode' + } + + def __init__(self, amount=None, create_time=None, paid=None, refunded=None, status=None, failure_code=None, _configuration=None): # noqa: E501 + """Charge - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._amount = None + self._create_time = None + self._paid = None + self._refunded = None + self._status = None + self._failure_code = None + self.discriminator = None + + self.amount = amount + self.create_time = create_time + self.paid = paid + self.refunded = refunded + self.status = status + if failure_code is not None: + self.failure_code = failure_code + + @property + def amount(self): + """Gets the amount of this Charge. # noqa: E501 + + + :return: The amount of this Charge. # noqa: E501 + :rtype: Decimal + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Charge. + + + :param amount: The amount of this Charge. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def create_time(self): + """Gets the create_time of this Charge. # noqa: E501 + + + :return: The create_time of this Charge. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Charge. + + + :param create_time: The create_time of this Charge. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and create_time is None: + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def paid(self): + """Gets the paid of this Charge. # noqa: E501 + + + :return: The paid of this Charge. # noqa: E501 + :rtype: bool + """ + return self._paid + + @paid.setter + def paid(self, paid): + """Sets the paid of this Charge. + + + :param paid: The paid of this Charge. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and paid is None: + raise ValueError("Invalid value for `paid`, must not be `None`") # noqa: E501 + + self._paid = paid + + @property + def refunded(self): + """Gets the refunded of this Charge. # noqa: E501 + + + :return: The refunded of this Charge. # noqa: E501 + :rtype: bool + """ + return self._refunded + + @refunded.setter + def refunded(self, refunded): + """Sets the refunded of this Charge. + + + :param refunded: The refunded of this Charge. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and refunded is None: + raise ValueError("Invalid value for `refunded`, must not be `None`") # noqa: E501 + + self._refunded = refunded + + @property + def status(self): + """Gets the status of this Charge. # noqa: E501 + + + :return: The status of this Charge. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Charge. + + + :param status: The status of this Charge. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def failure_code(self): + """Gets the failure_code of this Charge. # noqa: E501 + + + :return: The failure_code of this Charge. # noqa: E501 + :rtype: str + """ + return self._failure_code + + @failure_code.setter + def failure_code(self, failure_code): + """Sets the failure_code of this Charge. + + + :param failure_code: The failure_code of this Charge. # noqa: E501 + :type: str + """ + + self._failure_code = failure_code + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Charge, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Charge): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Charge): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/cluster.py b/docs/cudo_compute/models/cluster.py new file mode 100644 index 0000000..c06857f --- /dev/null +++ b/docs/cudo_compute/models/cluster.py @@ -0,0 +1,799 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Cluster(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'machine_type': 'str', + 'cpu_model': 'str', + 'vcpu_per_cpu_thread': 'int', + 'vcpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal', + 'gpu_model': 'str', + 'gpu_model_id': 'str', + 'gpu_model_pci_types': 'list[str]', + 'gpu_price_hr': 'Decimal', + 'min_vcpu_per_memory_gib': 'float', + 'max_vcpu_per_memory_gib': 'float', + 'min_vcpu_per_gpu': 'float', + 'max_vcpu_per_gpu': 'float', + 'create_time': 'datetime', + 'update_time': 'datetime', + 'host_count': 'int', + 'host_problem_count': 'int', + 'vm_count': 'int', + 'vcpu_free': 'int', + 'vcpu_used': 'int', + 'memory_gib_free': 'int', + 'memory_gib_used': 'int', + 'gpu_free': 'int', + 'gpu_used': 'int', + 'min_vcpu': 'float', + 'min_memory_gib': 'float' + } + + attribute_map = { + 'machine_type': 'machineType', + 'cpu_model': 'cpuModel', + 'vcpu_per_cpu_thread': 'vcpuPerCpuThread', + 'vcpu_price_hr': 'vcpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr', + 'gpu_model': 'gpuModel', + 'gpu_model_id': 'gpuModelId', + 'gpu_model_pci_types': 'gpuModelPciTypes', + 'gpu_price_hr': 'gpuPriceHr', + 'min_vcpu_per_memory_gib': 'minVcpuPerMemoryGib', + 'max_vcpu_per_memory_gib': 'maxVcpuPerMemoryGib', + 'min_vcpu_per_gpu': 'minVcpuPerGpu', + 'max_vcpu_per_gpu': 'maxVcpuPerGpu', + 'create_time': 'createTime', + 'update_time': 'updateTime', + 'host_count': 'hostCount', + 'host_problem_count': 'hostProblemCount', + 'vm_count': 'vmCount', + 'vcpu_free': 'vcpuFree', + 'vcpu_used': 'vcpuUsed', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_used': 'memoryGibUsed', + 'gpu_free': 'gpuFree', + 'gpu_used': 'gpuUsed', + 'min_vcpu': 'minVcpu', + 'min_memory_gib': 'minMemoryGib' + } + + def __init__(self, machine_type=None, cpu_model=None, vcpu_per_cpu_thread=None, vcpu_price_hr=None, memory_gib_price_hr=None, gpu_model=None, gpu_model_id=None, gpu_model_pci_types=None, gpu_price_hr=None, min_vcpu_per_memory_gib=None, max_vcpu_per_memory_gib=None, min_vcpu_per_gpu=None, max_vcpu_per_gpu=None, create_time=None, update_time=None, host_count=None, host_problem_count=None, vm_count=None, vcpu_free=None, vcpu_used=None, memory_gib_free=None, memory_gib_used=None, gpu_free=None, gpu_used=None, min_vcpu=None, min_memory_gib=None, _configuration=None): # noqa: E501 + """Cluster - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._machine_type = None + self._cpu_model = None + self._vcpu_per_cpu_thread = None + self._vcpu_price_hr = None + self._memory_gib_price_hr = None + self._gpu_model = None + self._gpu_model_id = None + self._gpu_model_pci_types = None + self._gpu_price_hr = None + self._min_vcpu_per_memory_gib = None + self._max_vcpu_per_memory_gib = None + self._min_vcpu_per_gpu = None + self._max_vcpu_per_gpu = None + self._create_time = None + self._update_time = None + self._host_count = None + self._host_problem_count = None + self._vm_count = None + self._vcpu_free = None + self._vcpu_used = None + self._memory_gib_free = None + self._memory_gib_used = None + self._gpu_free = None + self._gpu_used = None + self._min_vcpu = None + self._min_memory_gib = None + self.discriminator = None + + self.machine_type = machine_type + self.cpu_model = cpu_model + self.vcpu_per_cpu_thread = vcpu_per_cpu_thread + self.vcpu_price_hr = vcpu_price_hr + self.memory_gib_price_hr = memory_gib_price_hr + self.gpu_model = gpu_model + self.gpu_model_id = gpu_model_id + self.gpu_model_pci_types = gpu_model_pci_types + self.gpu_price_hr = gpu_price_hr + self.min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + self.max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + self.min_vcpu_per_gpu = min_vcpu_per_gpu + self.max_vcpu_per_gpu = max_vcpu_per_gpu + self.create_time = create_time + self.update_time = update_time + self.host_count = host_count + self.host_problem_count = host_problem_count + self.vm_count = vm_count + self.vcpu_free = vcpu_free + self.vcpu_used = vcpu_used + self.memory_gib_free = memory_gib_free + self.memory_gib_used = memory_gib_used + self.gpu_free = gpu_free + self.gpu_used = gpu_used + self.min_vcpu = min_vcpu + self.min_memory_gib = min_memory_gib + + @property + def machine_type(self): + """Gets the machine_type of this Cluster. # noqa: E501 + + + :return: The machine_type of this Cluster. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this Cluster. + + + :param machine_type: The machine_type of this Cluster. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def cpu_model(self): + """Gets the cpu_model of this Cluster. # noqa: E501 + + + :return: The cpu_model of this Cluster. # noqa: E501 + :rtype: str + """ + return self._cpu_model + + @cpu_model.setter + def cpu_model(self, cpu_model): + """Sets the cpu_model of this Cluster. + + + :param cpu_model: The cpu_model of this Cluster. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and cpu_model is None: + raise ValueError("Invalid value for `cpu_model`, must not be `None`") # noqa: E501 + + self._cpu_model = cpu_model + + @property + def vcpu_per_cpu_thread(self): + """Gets the vcpu_per_cpu_thread of this Cluster. # noqa: E501 + + + :return: The vcpu_per_cpu_thread of this Cluster. # noqa: E501 + :rtype: int + """ + return self._vcpu_per_cpu_thread + + @vcpu_per_cpu_thread.setter + def vcpu_per_cpu_thread(self, vcpu_per_cpu_thread): + """Sets the vcpu_per_cpu_thread of this Cluster. + + + :param vcpu_per_cpu_thread: The vcpu_per_cpu_thread of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_per_cpu_thread is None: + raise ValueError("Invalid value for `vcpu_per_cpu_thread`, must not be `None`") # noqa: E501 + + self._vcpu_per_cpu_thread = vcpu_per_cpu_thread + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this Cluster. # noqa: E501 + + + :return: The vcpu_price_hr of this Cluster. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this Cluster. + + + :param vcpu_price_hr: The vcpu_price_hr of this Cluster. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and vcpu_price_hr is None: + raise ValueError("Invalid value for `vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._vcpu_price_hr = vcpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this Cluster. # noqa: E501 + + + :return: The memory_gib_price_hr of this Cluster. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this Cluster. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this Cluster. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and memory_gib_price_hr is None: + raise ValueError("Invalid value for `memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._memory_gib_price_hr = memory_gib_price_hr + + @property + def gpu_model(self): + """Gets the gpu_model of this Cluster. # noqa: E501 + + + :return: The gpu_model of this Cluster. # noqa: E501 + :rtype: str + """ + return self._gpu_model + + @gpu_model.setter + def gpu_model(self, gpu_model): + """Sets the gpu_model of this Cluster. + + + :param gpu_model: The gpu_model of this Cluster. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model is None: + raise ValueError("Invalid value for `gpu_model`, must not be `None`") # noqa: E501 + + self._gpu_model = gpu_model + + @property + def gpu_model_id(self): + """Gets the gpu_model_id of this Cluster. # noqa: E501 + + + :return: The gpu_model_id of this Cluster. # noqa: E501 + :rtype: str + """ + return self._gpu_model_id + + @gpu_model_id.setter + def gpu_model_id(self, gpu_model_id): + """Sets the gpu_model_id of this Cluster. + + + :param gpu_model_id: The gpu_model_id of this Cluster. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model_id is None: + raise ValueError("Invalid value for `gpu_model_id`, must not be `None`") # noqa: E501 + + self._gpu_model_id = gpu_model_id + + @property + def gpu_model_pci_types(self): + """Gets the gpu_model_pci_types of this Cluster. # noqa: E501 + + + :return: The gpu_model_pci_types of this Cluster. # noqa: E501 + :rtype: list[str] + """ + return self._gpu_model_pci_types + + @gpu_model_pci_types.setter + def gpu_model_pci_types(self, gpu_model_pci_types): + """Sets the gpu_model_pci_types of this Cluster. + + + :param gpu_model_pci_types: The gpu_model_pci_types of this Cluster. # noqa: E501 + :type: list[str] + """ + if self._configuration.client_side_validation and gpu_model_pci_types is None: + raise ValueError("Invalid value for `gpu_model_pci_types`, must not be `None`") # noqa: E501 + + self._gpu_model_pci_types = gpu_model_pci_types + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this Cluster. # noqa: E501 + + + :return: The gpu_price_hr of this Cluster. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this Cluster. + + + :param gpu_price_hr: The gpu_price_hr of this Cluster. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and gpu_price_hr is None: + raise ValueError("Invalid value for `gpu_price_hr`, must not be `None`") # noqa: E501 + + self._gpu_price_hr = gpu_price_hr + + @property + def min_vcpu_per_memory_gib(self): + """Gets the min_vcpu_per_memory_gib of this Cluster. # noqa: E501 + + + :return: The min_vcpu_per_memory_gib of this Cluster. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_memory_gib + + @min_vcpu_per_memory_gib.setter + def min_vcpu_per_memory_gib(self, min_vcpu_per_memory_gib): + """Sets the min_vcpu_per_memory_gib of this Cluster. + + + :param min_vcpu_per_memory_gib: The min_vcpu_per_memory_gib of this Cluster. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `min_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + + @property + def max_vcpu_per_memory_gib(self): + """Gets the max_vcpu_per_memory_gib of this Cluster. # noqa: E501 + + + :return: The max_vcpu_per_memory_gib of this Cluster. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_memory_gib + + @max_vcpu_per_memory_gib.setter + def max_vcpu_per_memory_gib(self, max_vcpu_per_memory_gib): + """Sets the max_vcpu_per_memory_gib of this Cluster. + + + :param max_vcpu_per_memory_gib: The max_vcpu_per_memory_gib of this Cluster. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `max_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + + @property + def min_vcpu_per_gpu(self): + """Gets the min_vcpu_per_gpu of this Cluster. # noqa: E501 + + + :return: The min_vcpu_per_gpu of this Cluster. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_gpu + + @min_vcpu_per_gpu.setter + def min_vcpu_per_gpu(self, min_vcpu_per_gpu): + """Sets the min_vcpu_per_gpu of this Cluster. + + + :param min_vcpu_per_gpu: The min_vcpu_per_gpu of this Cluster. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_gpu is None: + raise ValueError("Invalid value for `min_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_gpu = min_vcpu_per_gpu + + @property + def max_vcpu_per_gpu(self): + """Gets the max_vcpu_per_gpu of this Cluster. # noqa: E501 + + + :return: The max_vcpu_per_gpu of this Cluster. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_gpu + + @max_vcpu_per_gpu.setter + def max_vcpu_per_gpu(self, max_vcpu_per_gpu): + """Sets the max_vcpu_per_gpu of this Cluster. + + + :param max_vcpu_per_gpu: The max_vcpu_per_gpu of this Cluster. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_gpu is None: + raise ValueError("Invalid value for `max_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_gpu = max_vcpu_per_gpu + + @property + def create_time(self): + """Gets the create_time of this Cluster. # noqa: E501 + + + :return: The create_time of this Cluster. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Cluster. + + + :param create_time: The create_time of this Cluster. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and create_time is None: + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this Cluster. # noqa: E501 + + + :return: The update_time of this Cluster. # noqa: E501 + :rtype: datetime + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this Cluster. + + + :param update_time: The update_time of this Cluster. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and update_time is None: + raise ValueError("Invalid value for `update_time`, must not be `None`") # noqa: E501 + + self._update_time = update_time + + @property + def host_count(self): + """Gets the host_count of this Cluster. # noqa: E501 + + + :return: The host_count of this Cluster. # noqa: E501 + :rtype: int + """ + return self._host_count + + @host_count.setter + def host_count(self, host_count): + """Sets the host_count of this Cluster. + + + :param host_count: The host_count of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and host_count is None: + raise ValueError("Invalid value for `host_count`, must not be `None`") # noqa: E501 + + self._host_count = host_count + + @property + def host_problem_count(self): + """Gets the host_problem_count of this Cluster. # noqa: E501 + + + :return: The host_problem_count of this Cluster. # noqa: E501 + :rtype: int + """ + return self._host_problem_count + + @host_problem_count.setter + def host_problem_count(self, host_problem_count): + """Sets the host_problem_count of this Cluster. + + + :param host_problem_count: The host_problem_count of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and host_problem_count is None: + raise ValueError("Invalid value for `host_problem_count`, must not be `None`") # noqa: E501 + + self._host_problem_count = host_problem_count + + @property + def vm_count(self): + """Gets the vm_count of this Cluster. # noqa: E501 + + + :return: The vm_count of this Cluster. # noqa: E501 + :rtype: int + """ + return self._vm_count + + @vm_count.setter + def vm_count(self, vm_count): + """Sets the vm_count of this Cluster. + + + :param vm_count: The vm_count of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vm_count is None: + raise ValueError("Invalid value for `vm_count`, must not be `None`") # noqa: E501 + + self._vm_count = vm_count + + @property + def vcpu_free(self): + """Gets the vcpu_free of this Cluster. # noqa: E501 + + + :return: The vcpu_free of this Cluster. # noqa: E501 + :rtype: int + """ + return self._vcpu_free + + @vcpu_free.setter + def vcpu_free(self, vcpu_free): + """Sets the vcpu_free of this Cluster. + + + :param vcpu_free: The vcpu_free of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_free is None: + raise ValueError("Invalid value for `vcpu_free`, must not be `None`") # noqa: E501 + + self._vcpu_free = vcpu_free + + @property + def vcpu_used(self): + """Gets the vcpu_used of this Cluster. # noqa: E501 + + + :return: The vcpu_used of this Cluster. # noqa: E501 + :rtype: int + """ + return self._vcpu_used + + @vcpu_used.setter + def vcpu_used(self, vcpu_used): + """Sets the vcpu_used of this Cluster. + + + :param vcpu_used: The vcpu_used of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_used is None: + raise ValueError("Invalid value for `vcpu_used`, must not be `None`") # noqa: E501 + + self._vcpu_used = vcpu_used + + @property + def memory_gib_free(self): + """Gets the memory_gib_free of this Cluster. # noqa: E501 + + + :return: The memory_gib_free of this Cluster. # noqa: E501 + :rtype: int + """ + return self._memory_gib_free + + @memory_gib_free.setter + def memory_gib_free(self, memory_gib_free): + """Sets the memory_gib_free of this Cluster. + + + :param memory_gib_free: The memory_gib_free of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_free is None: + raise ValueError("Invalid value for `memory_gib_free`, must not be `None`") # noqa: E501 + + self._memory_gib_free = memory_gib_free + + @property + def memory_gib_used(self): + """Gets the memory_gib_used of this Cluster. # noqa: E501 + + + :return: The memory_gib_used of this Cluster. # noqa: E501 + :rtype: int + """ + return self._memory_gib_used + + @memory_gib_used.setter + def memory_gib_used(self, memory_gib_used): + """Sets the memory_gib_used of this Cluster. + + + :param memory_gib_used: The memory_gib_used of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_used is None: + raise ValueError("Invalid value for `memory_gib_used`, must not be `None`") # noqa: E501 + + self._memory_gib_used = memory_gib_used + + @property + def gpu_free(self): + """Gets the gpu_free of this Cluster. # noqa: E501 + + + :return: The gpu_free of this Cluster. # noqa: E501 + :rtype: int + """ + return self._gpu_free + + @gpu_free.setter + def gpu_free(self, gpu_free): + """Sets the gpu_free of this Cluster. + + + :param gpu_free: The gpu_free of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_free is None: + raise ValueError("Invalid value for `gpu_free`, must not be `None`") # noqa: E501 + + self._gpu_free = gpu_free + + @property + def gpu_used(self): + """Gets the gpu_used of this Cluster. # noqa: E501 + + + :return: The gpu_used of this Cluster. # noqa: E501 + :rtype: int + """ + return self._gpu_used + + @gpu_used.setter + def gpu_used(self, gpu_used): + """Sets the gpu_used of this Cluster. + + + :param gpu_used: The gpu_used of this Cluster. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_used is None: + raise ValueError("Invalid value for `gpu_used`, must not be `None`") # noqa: E501 + + self._gpu_used = gpu_used + + @property + def min_vcpu(self): + """Gets the min_vcpu of this Cluster. # noqa: E501 + + + :return: The min_vcpu of this Cluster. # noqa: E501 + :rtype: float + """ + return self._min_vcpu + + @min_vcpu.setter + def min_vcpu(self, min_vcpu): + """Sets the min_vcpu of this Cluster. + + + :param min_vcpu: The min_vcpu of this Cluster. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu is None: + raise ValueError("Invalid value for `min_vcpu`, must not be `None`") # noqa: E501 + + self._min_vcpu = min_vcpu + + @property + def min_memory_gib(self): + """Gets the min_memory_gib of this Cluster. # noqa: E501 + + + :return: The min_memory_gib of this Cluster. # noqa: E501 + :rtype: float + """ + return self._min_memory_gib + + @min_memory_gib.setter + def min_memory_gib(self, min_memory_gib): + """Sets the min_memory_gib of this Cluster. + + + :param min_memory_gib: The min_memory_gib of this Cluster. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_memory_gib is None: + raise ValueError("Invalid value for `min_memory_gib`, must not be `None`") # noqa: E501 + + self._min_memory_gib = min_memory_gib + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Cluster, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Cluster): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Cluster): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/commitment_term.py b/docs/cudo_compute/models/commitment_term.py new file mode 100644 index 0000000..f55b7ed --- /dev/null +++ b/docs/cudo_compute/models/commitment_term.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CommitmentTerm(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + NONE = "COMMITMENT_TERM_NONE" + _1_MONTH = "COMMITMENT_TERM_1_MONTH" + _3_MONTHS = "COMMITMENT_TERM_3_MONTHS" + _6_MONTHS = "COMMITMENT_TERM_6_MONTHS" + _12_MONTHS = "COMMITMENT_TERM_12_MONTHS" + _24_MONTHS = "COMMITMENT_TERM_24_MONTHS" + _36_MONTHS = "COMMITMENT_TERM_36_MONTHS" + _60_MONTHS = "COMMITMENT_TERM_60_MONTHS" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """CommitmentTerm - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CommitmentTerm, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CommitmentTerm): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CommitmentTerm): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/connect_vm_response.py b/docs/cudo_compute/models/connect_vm_response.py new file mode 100644 index 0000000..89411b7 --- /dev/null +++ b/docs/cudo_compute/models/connect_vm_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ConnectVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'connect_url': 'str', + 'token': 'str' + } + + attribute_map = { + 'connect_url': 'connectUrl', + 'token': 'token' + } + + def __init__(self, connect_url=None, token=None, _configuration=None): # noqa: E501 + """ConnectVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._connect_url = None + self._token = None + self.discriminator = None + + self.connect_url = connect_url + self.token = token + + @property + def connect_url(self): + """Gets the connect_url of this ConnectVMResponse. # noqa: E501 + + + :return: The connect_url of this ConnectVMResponse. # noqa: E501 + :rtype: str + """ + return self._connect_url + + @connect_url.setter + def connect_url(self, connect_url): + """Sets the connect_url of this ConnectVMResponse. + + + :param connect_url: The connect_url of this ConnectVMResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and connect_url is None: + raise ValueError("Invalid value for `connect_url`, must not be `None`") # noqa: E501 + + self._connect_url = connect_url + + @property + def token(self): + """Gets the token of this ConnectVMResponse. # noqa: E501 + + + :return: The token of this ConnectVMResponse. # noqa: E501 + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this ConnectVMResponse. + + + :param token: The token of this ConnectVMResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and token is None: + raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 + + self._token = token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ConnectVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ConnectVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/count_hosts_response.py b/docs/cudo_compute/models/count_hosts_response.py new file mode 100644 index 0000000..da672b2 --- /dev/null +++ b/docs/cudo_compute/models/count_hosts_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CountHostsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int' + } + + attribute_map = { + 'count': 'count' + } + + def __init__(self, count=None, _configuration=None): # noqa: E501 + """CountHostsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._count = None + self.discriminator = None + + self.count = count + + @property + def count(self): + """Gets the count of this CountHostsResponse. # noqa: E501 + + + :return: The count of this CountHostsResponse. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this CountHostsResponse. + + + :param count: The count of this CountHostsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CountHostsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CountHostsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountHostsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/count_vms_response.py b/docs/cudo_compute/models/count_vms_response.py new file mode 100644 index 0000000..bb9d77d --- /dev/null +++ b/docs/cudo_compute/models/count_vms_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CountVMsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'count': 'int' + } + + attribute_map = { + 'count': 'count' + } + + def __init__(self, count=None, _configuration=None): # noqa: E501 + """CountVMsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._count = None + self.discriminator = None + + self.count = count + + @property + def count(self): + """Gets the count of this CountVMsResponse. # noqa: E501 + + + :return: The count of this CountVMsResponse. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this CountVMsResponse. + + + :param count: The count of this CountVMsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count is None: + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CountVMsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CountVMsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountVMsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/cpu_topology.py b/docs/cudo_compute/models/cpu_topology.py new file mode 100644 index 0000000..d5cae69 --- /dev/null +++ b/docs/cudo_compute/models/cpu_topology.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CpuTopology(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'sockets': 'int', + 'cores': 'int', + 'threads': 'int' + } + + attribute_map = { + 'sockets': 'sockets', + 'cores': 'cores', + 'threads': 'threads' + } + + def __init__(self, sockets=None, cores=None, threads=None, _configuration=None): # noqa: E501 + """CpuTopology - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._sockets = None + self._cores = None + self._threads = None + self.discriminator = None + + if sockets is not None: + self.sockets = sockets + if cores is not None: + self.cores = cores + if threads is not None: + self.threads = threads + + @property + def sockets(self): + """Gets the sockets of this CpuTopology. # noqa: E501 + + + :return: The sockets of this CpuTopology. # noqa: E501 + :rtype: int + """ + return self._sockets + + @sockets.setter + def sockets(self, sockets): + """Sets the sockets of this CpuTopology. + + + :param sockets: The sockets of this CpuTopology. # noqa: E501 + :type: int + """ + + self._sockets = sockets + + @property + def cores(self): + """Gets the cores of this CpuTopology. # noqa: E501 + + + :return: The cores of this CpuTopology. # noqa: E501 + :rtype: int + """ + return self._cores + + @cores.setter + def cores(self, cores): + """Sets the cores of this CpuTopology. + + + :param cores: The cores of this CpuTopology. # noqa: E501 + :type: int + """ + + self._cores = cores + + @property + def threads(self): + """Gets the threads of this CpuTopology. # noqa: E501 + + + :return: The threads of this CpuTopology. # noqa: E501 + :rtype: int + """ + return self._threads + + @threads.setter + def threads(self, threads): + """Sets the threads of this CpuTopology. + + + :param threads: The threads of this CpuTopology. # noqa: E501 + :type: int + """ + + self._threads = threads + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CpuTopology, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CpuTopology): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CpuTopology): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_billing_account_credit_payment_response.py b/docs/cudo_compute/models/create_billing_account_credit_payment_response.py new file mode 100644 index 0000000..32ca200 --- /dev/null +++ b/docs/cudo_compute/models/create_billing_account_credit_payment_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateBillingAccountCreditPaymentResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payment_intent': 'PaymentIntent' + } + + attribute_map = { + 'payment_intent': 'paymentIntent' + } + + def __init__(self, payment_intent=None, _configuration=None): # noqa: E501 + """CreateBillingAccountCreditPaymentResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._payment_intent = None + self.discriminator = None + + self.payment_intent = payment_intent + + @property + def payment_intent(self): + """Gets the payment_intent of this CreateBillingAccountCreditPaymentResponse. # noqa: E501 + + + :return: The payment_intent of this CreateBillingAccountCreditPaymentResponse. # noqa: E501 + :rtype: PaymentIntent + """ + return self._payment_intent + + @payment_intent.setter + def payment_intent(self, payment_intent): + """Sets the payment_intent of this CreateBillingAccountCreditPaymentResponse. + + + :param payment_intent: The payment_intent of this CreateBillingAccountCreditPaymentResponse. # noqa: E501 + :type: PaymentIntent + """ + if self._configuration.client_side_validation and payment_intent is None: + raise ValueError("Invalid value for `payment_intent`, must not be `None`") # noqa: E501 + + self._payment_intent = payment_intent + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateBillingAccountCreditPaymentResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateBillingAccountCreditPaymentResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateBillingAccountCreditPaymentResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_billing_account_request.py b/docs/cudo_compute/models/create_billing_account_request.py new file mode 100644 index 0000000..723d271 --- /dev/null +++ b/docs/cudo_compute/models/create_billing_account_request.py @@ -0,0 +1,255 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateBillingAccountRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'display_name': 'str', + 'invoice_name': 'str', + 'email': 'str', + 'tax_id': 'TaxId', + 'referral': 'str', + 'billing_address': 'BillingAddress' + } + + attribute_map = { + 'display_name': 'displayName', + 'invoice_name': 'invoiceName', + 'email': 'email', + 'tax_id': 'taxId', + 'referral': 'referral', + 'billing_address': 'billingAddress' + } + + def __init__(self, display_name=None, invoice_name=None, email=None, tax_id=None, referral=None, billing_address=None, _configuration=None): # noqa: E501 + """CreateBillingAccountRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._display_name = None + self._invoice_name = None + self._email = None + self._tax_id = None + self._referral = None + self._billing_address = None + self.discriminator = None + + self.display_name = display_name + if invoice_name is not None: + self.invoice_name = invoice_name + self.email = email + if tax_id is not None: + self.tax_id = tax_id + if referral is not None: + self.referral = referral + if billing_address is not None: + self.billing_address = billing_address + + @property + def display_name(self): + """Gets the display_name of this CreateBillingAccountRequest. # noqa: E501 + + + :return: The display_name of this CreateBillingAccountRequest. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this CreateBillingAccountRequest. + + + :param display_name: The display_name of this CreateBillingAccountRequest. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and display_name is None: + raise ValueError("Invalid value for `display_name`, must not be `None`") # noqa: E501 + + self._display_name = display_name + + @property + def invoice_name(self): + """Gets the invoice_name of this CreateBillingAccountRequest. # noqa: E501 + + + :return: The invoice_name of this CreateBillingAccountRequest. # noqa: E501 + :rtype: str + """ + return self._invoice_name + + @invoice_name.setter + def invoice_name(self, invoice_name): + """Sets the invoice_name of this CreateBillingAccountRequest. + + + :param invoice_name: The invoice_name of this CreateBillingAccountRequest. # noqa: E501 + :type: str + """ + + self._invoice_name = invoice_name + + @property + def email(self): + """Gets the email of this CreateBillingAccountRequest. # noqa: E501 + + + :return: The email of this CreateBillingAccountRequest. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this CreateBillingAccountRequest. + + + :param email: The email of this CreateBillingAccountRequest. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and email is None: + raise ValueError("Invalid value for `email`, must not be `None`") # noqa: E501 + + self._email = email + + @property + def tax_id(self): + """Gets the tax_id of this CreateBillingAccountRequest. # noqa: E501 + + + :return: The tax_id of this CreateBillingAccountRequest. # noqa: E501 + :rtype: TaxId + """ + return self._tax_id + + @tax_id.setter + def tax_id(self, tax_id): + """Sets the tax_id of this CreateBillingAccountRequest. + + + :param tax_id: The tax_id of this CreateBillingAccountRequest. # noqa: E501 + :type: TaxId + """ + + self._tax_id = tax_id + + @property + def referral(self): + """Gets the referral of this CreateBillingAccountRequest. # noqa: E501 + + + :return: The referral of this CreateBillingAccountRequest. # noqa: E501 + :rtype: str + """ + return self._referral + + @referral.setter + def referral(self, referral): + """Sets the referral of this CreateBillingAccountRequest. + + + :param referral: The referral of this CreateBillingAccountRequest. # noqa: E501 + :type: str + """ + + self._referral = referral + + @property + def billing_address(self): + """Gets the billing_address of this CreateBillingAccountRequest. # noqa: E501 + + + :return: The billing_address of this CreateBillingAccountRequest. # noqa: E501 + :rtype: BillingAddress + """ + return self._billing_address + + @billing_address.setter + def billing_address(self, billing_address): + """Sets the billing_address of this CreateBillingAccountRequest. + + + :param billing_address: The billing_address of this CreateBillingAccountRequest. # noqa: E501 + :type: BillingAddress + """ + + self._billing_address = billing_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateBillingAccountRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateBillingAccountRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateBillingAccountRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_disk_snapshot_body.py b/docs/cudo_compute/models/create_disk_snapshot_body.py new file mode 100644 index 0000000..f25f347 --- /dev/null +++ b/docs/cudo_compute/models/create_disk_snapshot_body.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateDiskSnapshotBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'snapshot_id': 'str', + 'vm_id': 'str' + } + + attribute_map = { + 'snapshot_id': 'snapshotId', + 'vm_id': 'vmId' + } + + def __init__(self, snapshot_id=None, vm_id=None, _configuration=None): # noqa: E501 + """CreateDiskSnapshotBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._snapshot_id = None + self._vm_id = None + self.discriminator = None + + self.snapshot_id = snapshot_id + self.vm_id = vm_id + + @property + def snapshot_id(self): + """Gets the snapshot_id of this CreateDiskSnapshotBody. # noqa: E501 + + + :return: The snapshot_id of this CreateDiskSnapshotBody. # noqa: E501 + :rtype: str + """ + return self._snapshot_id + + @snapshot_id.setter + def snapshot_id(self, snapshot_id): + """Sets the snapshot_id of this CreateDiskSnapshotBody. + + + :param snapshot_id: The snapshot_id of this CreateDiskSnapshotBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and snapshot_id is None: + raise ValueError("Invalid value for `snapshot_id`, must not be `None`") # noqa: E501 + + self._snapshot_id = snapshot_id + + @property + def vm_id(self): + """Gets the vm_id of this CreateDiskSnapshotBody. # noqa: E501 + + + :return: The vm_id of this CreateDiskSnapshotBody. # noqa: E501 + :rtype: str + """ + return self._vm_id + + @vm_id.setter + def vm_id(self, vm_id): + """Sets the vm_id of this CreateDiskSnapshotBody. + + + :param vm_id: The vm_id of this CreateDiskSnapshotBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and vm_id is None: + raise ValueError("Invalid value for `vm_id`, must not be `None`") # noqa: E501 + + self._vm_id = vm_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateDiskSnapshotBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateDiskSnapshotBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateDiskSnapshotBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_disk_snapshot_response.py b/docs/cudo_compute/models/create_disk_snapshot_response.py new file mode 100644 index 0000000..b0ba9bd --- /dev/null +++ b/docs/cudo_compute/models/create_disk_snapshot_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateDiskSnapshotResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """CreateDiskSnapshotResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateDiskSnapshotResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateDiskSnapshotResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateDiskSnapshotResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_network_body.py b/docs/cudo_compute/models/create_network_body.py new file mode 100644 index 0000000..4211c57 --- /dev/null +++ b/docs/cudo_compute/models/create_network_body.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateNetworkBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'id': 'str', + 'cidr_prefix': 'str', + 'vrouter_size': 'V1VRouterSize' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'id': 'id', + 'cidr_prefix': 'cidrPrefix', + 'vrouter_size': 'vrouterSize' + } + + def __init__(self, data_center_id=None, id=None, cidr_prefix=None, vrouter_size=None, _configuration=None): # noqa: E501 + """CreateNetworkBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._id = None + self._cidr_prefix = None + self._vrouter_size = None + self.discriminator = None + + self.data_center_id = data_center_id + self.id = id + self.cidr_prefix = cidr_prefix + if vrouter_size is not None: + self.vrouter_size = vrouter_size + + @property + def data_center_id(self): + """Gets the data_center_id of this CreateNetworkBody. # noqa: E501 + + + :return: The data_center_id of this CreateNetworkBody. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this CreateNetworkBody. + + + :param data_center_id: The data_center_id of this CreateNetworkBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def id(self): + """Gets the id of this CreateNetworkBody. # noqa: E501 + + + :return: The id of this CreateNetworkBody. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateNetworkBody. + + + :param id: The id of this CreateNetworkBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def cidr_prefix(self): + """Gets the cidr_prefix of this CreateNetworkBody. # noqa: E501 + + + :return: The cidr_prefix of this CreateNetworkBody. # noqa: E501 + :rtype: str + """ + return self._cidr_prefix + + @cidr_prefix.setter + def cidr_prefix(self, cidr_prefix): + """Sets the cidr_prefix of this CreateNetworkBody. + + + :param cidr_prefix: The cidr_prefix of this CreateNetworkBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and cidr_prefix is None: + raise ValueError("Invalid value for `cidr_prefix`, must not be `None`") # noqa: E501 + + self._cidr_prefix = cidr_prefix + + @property + def vrouter_size(self): + """Gets the vrouter_size of this CreateNetworkBody. # noqa: E501 + + + :return: The vrouter_size of this CreateNetworkBody. # noqa: E501 + :rtype: V1VRouterSize + """ + return self._vrouter_size + + @vrouter_size.setter + def vrouter_size(self, vrouter_size): + """Sets the vrouter_size of this CreateNetworkBody. + + + :param vrouter_size: The vrouter_size of this CreateNetworkBody. # noqa: E501 + :type: V1VRouterSize + """ + + self._vrouter_size = vrouter_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateNetworkBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateNetworkBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateNetworkBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_network_response.py b/docs/cudo_compute/models/create_network_response.py new file mode 100644 index 0000000..ee39a8a --- /dev/null +++ b/docs/cudo_compute/models/create_network_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateNetworkResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """CreateNetworkResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateNetworkResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateNetworkResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateNetworkResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_object_storage_user_body.py b/docs/cudo_compute/models/create_object_storage_user_body.py new file mode 100644 index 0000000..f6035bb --- /dev/null +++ b/docs/cudo_compute/models/create_object_storage_user_body.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateObjectStorageUserBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None, _configuration=None): # noqa: E501 + """CreateObjectStorageUserBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self.discriminator = None + + self.id = id + + @property + def id(self): + """Gets the id of this CreateObjectStorageUserBody. # noqa: E501 + + + :return: The id of this CreateObjectStorageUserBody. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateObjectStorageUserBody. + + + :param id: The id of this CreateObjectStorageUserBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateObjectStorageUserBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateObjectStorageUserBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateObjectStorageUserBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_private_vm_image_response.py b/docs/cudo_compute/models/create_private_vm_image_response.py new file mode 100644 index 0000000..dc9465c --- /dev/null +++ b/docs/cudo_compute/models/create_private_vm_image_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreatePrivateVMImageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'image': 'PrivateImage' + } + + attribute_map = { + 'image': 'image' + } + + def __init__(self, image=None, _configuration=None): # noqa: E501 + """CreatePrivateVMImageResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._image = None + self.discriminator = None + + if image is not None: + self.image = image + + @property + def image(self): + """Gets the image of this CreatePrivateVMImageResponse. # noqa: E501 + + + :return: The image of this CreatePrivateVMImageResponse. # noqa: E501 + :rtype: PrivateImage + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this CreatePrivateVMImageResponse. + + + :param image: The image of this CreatePrivateVMImageResponse. # noqa: E501 + :type: PrivateImage + """ + + self._image = image + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreatePrivateVMImageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePrivateVMImageResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreatePrivateVMImageResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_security_group_response.py b/docs/cudo_compute/models/create_security_group_response.py new file mode 100644 index 0000000..3f119ee --- /dev/null +++ b/docs/cudo_compute/models/create_security_group_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateSecurityGroupResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'security_group': 'SecurityGroup' + } + + attribute_map = { + 'security_group': 'securityGroup' + } + + def __init__(self, security_group=None, _configuration=None): # noqa: E501 + """CreateSecurityGroupResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._security_group = None + self.discriminator = None + + self.security_group = security_group + + @property + def security_group(self): + """Gets the security_group of this CreateSecurityGroupResponse. # noqa: E501 + + + :return: The security_group of this CreateSecurityGroupResponse. # noqa: E501 + :rtype: SecurityGroup + """ + return self._security_group + + @security_group.setter + def security_group(self, security_group): + """Sets the security_group of this CreateSecurityGroupResponse. + + + :param security_group: The security_group of this CreateSecurityGroupResponse. # noqa: E501 + :type: SecurityGroup + """ + if self._configuration.client_side_validation and security_group is None: + raise ValueError("Invalid value for `security_group`, must not be `None`") # noqa: E501 + + self._security_group = security_group + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateSecurityGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateSecurityGroupResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateSecurityGroupResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_storage_disk_body.py b/docs/cudo_compute/models/create_storage_disk_body.py new file mode 100644 index 0000000..a58a951 --- /dev/null +++ b/docs/cudo_compute/models/create_storage_disk_body.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateStorageDiskBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'disk': 'Disk' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'disk': 'disk' + } + + def __init__(self, data_center_id=None, disk=None, _configuration=None): # noqa: E501 + """CreateStorageDiskBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._disk = None + self.discriminator = None + + if data_center_id is not None: + self.data_center_id = data_center_id + if disk is not None: + self.disk = disk + + @property + def data_center_id(self): + """Gets the data_center_id of this CreateStorageDiskBody. # noqa: E501 + + + :return: The data_center_id of this CreateStorageDiskBody. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this CreateStorageDiskBody. + + + :param data_center_id: The data_center_id of this CreateStorageDiskBody. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def disk(self): + """Gets the disk of this CreateStorageDiskBody. # noqa: E501 + + + :return: The disk of this CreateStorageDiskBody. # noqa: E501 + :rtype: Disk + """ + return self._disk + + @disk.setter + def disk(self, disk): + """Sets the disk of this CreateStorageDiskBody. + + + :param disk: The disk of this CreateStorageDiskBody. # noqa: E501 + :type: Disk + """ + + self._disk = disk + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateStorageDiskBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateStorageDiskBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateStorageDiskBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_storage_disk_response.py b/docs/cudo_compute/models/create_storage_disk_response.py new file mode 100644 index 0000000..f6691a6 --- /dev/null +++ b/docs/cudo_compute/models/create_storage_disk_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateStorageDiskResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """CreateStorageDiskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateStorageDiskResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateStorageDiskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateStorageDiskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_vm_body.py b/docs/cudo_compute/models/create_vm_body.py new file mode 100644 index 0000000..993b839 --- /dev/null +++ b/docs/cudo_compute/models/create_vm_body.py @@ -0,0 +1,728 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateVMBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'machine_type': 'str', + 'vm_id': 'str', + 'start_script': 'str', + 'ssh_key_source': 'SshKeySource', + 'custom_ssh_keys': 'list[str]', + 'password': 'str', + 'boot_disk': 'Disk', + 'boot_disk_image_id': 'str', + 'vcpus': 'int', + 'memory_gib': 'int', + 'gpus': 'int', + 'cpu_model': 'str', + 'gpu_model': 'str', + 'gpu_model_id': 'str', + 'nics': 'list[CreateVMRequestNIC]', + 'security_group_ids': 'list[str]', + 'storage_disk_ids': 'list[str]', + 'metadata': 'dict(str, str)', + 'topology': 'CpuTopology', + 'validate_only': 'bool', + 'expire_time': 'datetime', + 'ttl': 'str', + 'commitment_term': 'CommitmentTerm' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'machine_type': 'machineType', + 'vm_id': 'vmId', + 'start_script': 'startScript', + 'ssh_key_source': 'sshKeySource', + 'custom_ssh_keys': 'customSshKeys', + 'password': 'password', + 'boot_disk': 'bootDisk', + 'boot_disk_image_id': 'bootDiskImageId', + 'vcpus': 'vcpus', + 'memory_gib': 'memoryGib', + 'gpus': 'gpus', + 'cpu_model': 'cpuModel', + 'gpu_model': 'gpuModel', + 'gpu_model_id': 'gpuModelId', + 'nics': 'nics', + 'security_group_ids': 'securityGroupIds', + 'storage_disk_ids': 'storageDiskIds', + 'metadata': 'metadata', + 'topology': 'topology', + 'validate_only': 'validateOnly', + 'expire_time': 'expireTime', + 'ttl': 'ttl', + 'commitment_term': 'commitmentTerm' + } + + def __init__(self, data_center_id=None, machine_type=None, vm_id=None, start_script=None, ssh_key_source=None, custom_ssh_keys=None, password=None, boot_disk=None, boot_disk_image_id=None, vcpus=None, memory_gib=None, gpus=None, cpu_model=None, gpu_model=None, gpu_model_id=None, nics=None, security_group_ids=None, storage_disk_ids=None, metadata=None, topology=None, validate_only=None, expire_time=None, ttl=None, commitment_term=None, _configuration=None): # noqa: E501 + """CreateVMBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._machine_type = None + self._vm_id = None + self._start_script = None + self._ssh_key_source = None + self._custom_ssh_keys = None + self._password = None + self._boot_disk = None + self._boot_disk_image_id = None + self._vcpus = None + self._memory_gib = None + self._gpus = None + self._cpu_model = None + self._gpu_model = None + self._gpu_model_id = None + self._nics = None + self._security_group_ids = None + self._storage_disk_ids = None + self._metadata = None + self._topology = None + self._validate_only = None + self._expire_time = None + self._ttl = None + self._commitment_term = None + self.discriminator = None + + self.data_center_id = data_center_id + self.machine_type = machine_type + self.vm_id = vm_id + if start_script is not None: + self.start_script = start_script + if ssh_key_source is not None: + self.ssh_key_source = ssh_key_source + if custom_ssh_keys is not None: + self.custom_ssh_keys = custom_ssh_keys + if password is not None: + self.password = password + if boot_disk is not None: + self.boot_disk = boot_disk + self.boot_disk_image_id = boot_disk_image_id + self.vcpus = vcpus + self.memory_gib = memory_gib + self.gpus = gpus + if cpu_model is not None: + self.cpu_model = cpu_model + if gpu_model is not None: + self.gpu_model = gpu_model + if gpu_model_id is not None: + self.gpu_model_id = gpu_model_id + if nics is not None: + self.nics = nics + if security_group_ids is not None: + self.security_group_ids = security_group_ids + if storage_disk_ids is not None: + self.storage_disk_ids = storage_disk_ids + if metadata is not None: + self.metadata = metadata + if topology is not None: + self.topology = topology + if validate_only is not None: + self.validate_only = validate_only + if expire_time is not None: + self.expire_time = expire_time + if ttl is not None: + self.ttl = ttl + if commitment_term is not None: + self.commitment_term = commitment_term + + @property + def data_center_id(self): + """Gets the data_center_id of this CreateVMBody. # noqa: E501 + + + :return: The data_center_id of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this CreateVMBody. + + + :param data_center_id: The data_center_id of this CreateVMBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def machine_type(self): + """Gets the machine_type of this CreateVMBody. # noqa: E501 + + + :return: The machine_type of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this CreateVMBody. + + + :param machine_type: The machine_type of this CreateVMBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def vm_id(self): + """Gets the vm_id of this CreateVMBody. # noqa: E501 + + + :return: The vm_id of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._vm_id + + @vm_id.setter + def vm_id(self, vm_id): + """Sets the vm_id of this CreateVMBody. + + + :param vm_id: The vm_id of this CreateVMBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and vm_id is None: + raise ValueError("Invalid value for `vm_id`, must not be `None`") # noqa: E501 + + self._vm_id = vm_id + + @property + def start_script(self): + """Gets the start_script of this CreateVMBody. # noqa: E501 + + + :return: The start_script of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._start_script + + @start_script.setter + def start_script(self, start_script): + """Sets the start_script of this CreateVMBody. + + + :param start_script: The start_script of this CreateVMBody. # noqa: E501 + :type: str + """ + + self._start_script = start_script + + @property + def ssh_key_source(self): + """Gets the ssh_key_source of this CreateVMBody. # noqa: E501 + + + :return: The ssh_key_source of this CreateVMBody. # noqa: E501 + :rtype: SshKeySource + """ + return self._ssh_key_source + + @ssh_key_source.setter + def ssh_key_source(self, ssh_key_source): + """Sets the ssh_key_source of this CreateVMBody. + + + :param ssh_key_source: The ssh_key_source of this CreateVMBody. # noqa: E501 + :type: SshKeySource + """ + + self._ssh_key_source = ssh_key_source + + @property + def custom_ssh_keys(self): + """Gets the custom_ssh_keys of this CreateVMBody. # noqa: E501 + + + :return: The custom_ssh_keys of this CreateVMBody. # noqa: E501 + :rtype: list[str] + """ + return self._custom_ssh_keys + + @custom_ssh_keys.setter + def custom_ssh_keys(self, custom_ssh_keys): + """Sets the custom_ssh_keys of this CreateVMBody. + + + :param custom_ssh_keys: The custom_ssh_keys of this CreateVMBody. # noqa: E501 + :type: list[str] + """ + + self._custom_ssh_keys = custom_ssh_keys + + @property + def password(self): + """Gets the password of this CreateVMBody. # noqa: E501 + + + :return: The password of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this CreateVMBody. + + + :param password: The password of this CreateVMBody. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def boot_disk(self): + """Gets the boot_disk of this CreateVMBody. # noqa: E501 + + + :return: The boot_disk of this CreateVMBody. # noqa: E501 + :rtype: Disk + """ + return self._boot_disk + + @boot_disk.setter + def boot_disk(self, boot_disk): + """Sets the boot_disk of this CreateVMBody. + + + :param boot_disk: The boot_disk of this CreateVMBody. # noqa: E501 + :type: Disk + """ + + self._boot_disk = boot_disk + + @property + def boot_disk_image_id(self): + """Gets the boot_disk_image_id of this CreateVMBody. # noqa: E501 + + + :return: The boot_disk_image_id of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._boot_disk_image_id + + @boot_disk_image_id.setter + def boot_disk_image_id(self, boot_disk_image_id): + """Sets the boot_disk_image_id of this CreateVMBody. + + + :param boot_disk_image_id: The boot_disk_image_id of this CreateVMBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and boot_disk_image_id is None: + raise ValueError("Invalid value for `boot_disk_image_id`, must not be `None`") # noqa: E501 + + self._boot_disk_image_id = boot_disk_image_id + + @property + def vcpus(self): + """Gets the vcpus of this CreateVMBody. # noqa: E501 + + + :return: The vcpus of this CreateVMBody. # noqa: E501 + :rtype: int + """ + return self._vcpus + + @vcpus.setter + def vcpus(self, vcpus): + """Sets the vcpus of this CreateVMBody. + + + :param vcpus: The vcpus of this CreateVMBody. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpus is None: + raise ValueError("Invalid value for `vcpus`, must not be `None`") # noqa: E501 + + self._vcpus = vcpus + + @property + def memory_gib(self): + """Gets the memory_gib of this CreateVMBody. # noqa: E501 + + + :return: The memory_gib of this CreateVMBody. # noqa: E501 + :rtype: int + """ + return self._memory_gib + + @memory_gib.setter + def memory_gib(self, memory_gib): + """Sets the memory_gib of this CreateVMBody. + + + :param memory_gib: The memory_gib of this CreateVMBody. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib is None: + raise ValueError("Invalid value for `memory_gib`, must not be `None`") # noqa: E501 + + self._memory_gib = memory_gib + + @property + def gpus(self): + """Gets the gpus of this CreateVMBody. # noqa: E501 + + + :return: The gpus of this CreateVMBody. # noqa: E501 + :rtype: int + """ + return self._gpus + + @gpus.setter + def gpus(self, gpus): + """Sets the gpus of this CreateVMBody. + + + :param gpus: The gpus of this CreateVMBody. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpus is None: + raise ValueError("Invalid value for `gpus`, must not be `None`") # noqa: E501 + + self._gpus = gpus + + @property + def cpu_model(self): + """Gets the cpu_model of this CreateVMBody. # noqa: E501 + + + :return: The cpu_model of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._cpu_model + + @cpu_model.setter + def cpu_model(self, cpu_model): + """Sets the cpu_model of this CreateVMBody. + + + :param cpu_model: The cpu_model of this CreateVMBody. # noqa: E501 + :type: str + """ + + self._cpu_model = cpu_model + + @property + def gpu_model(self): + """Gets the gpu_model of this CreateVMBody. # noqa: E501 + + + :return: The gpu_model of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._gpu_model + + @gpu_model.setter + def gpu_model(self, gpu_model): + """Sets the gpu_model of this CreateVMBody. + + + :param gpu_model: The gpu_model of this CreateVMBody. # noqa: E501 + :type: str + """ + + self._gpu_model = gpu_model + + @property + def gpu_model_id(self): + """Gets the gpu_model_id of this CreateVMBody. # noqa: E501 + + + :return: The gpu_model_id of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._gpu_model_id + + @gpu_model_id.setter + def gpu_model_id(self, gpu_model_id): + """Sets the gpu_model_id of this CreateVMBody. + + + :param gpu_model_id: The gpu_model_id of this CreateVMBody. # noqa: E501 + :type: str + """ + + self._gpu_model_id = gpu_model_id + + @property + def nics(self): + """Gets the nics of this CreateVMBody. # noqa: E501 + + + :return: The nics of this CreateVMBody. # noqa: E501 + :rtype: list[CreateVMRequestNIC] + """ + return self._nics + + @nics.setter + def nics(self, nics): + """Sets the nics of this CreateVMBody. + + + :param nics: The nics of this CreateVMBody. # noqa: E501 + :type: list[CreateVMRequestNIC] + """ + + self._nics = nics + + @property + def security_group_ids(self): + """Gets the security_group_ids of this CreateVMBody. # noqa: E501 + + + :return: The security_group_ids of this CreateVMBody. # noqa: E501 + :rtype: list[str] + """ + return self._security_group_ids + + @security_group_ids.setter + def security_group_ids(self, security_group_ids): + """Sets the security_group_ids of this CreateVMBody. + + + :param security_group_ids: The security_group_ids of this CreateVMBody. # noqa: E501 + :type: list[str] + """ + + self._security_group_ids = security_group_ids + + @property + def storage_disk_ids(self): + """Gets the storage_disk_ids of this CreateVMBody. # noqa: E501 + + + :return: The storage_disk_ids of this CreateVMBody. # noqa: E501 + :rtype: list[str] + """ + return self._storage_disk_ids + + @storage_disk_ids.setter + def storage_disk_ids(self, storage_disk_ids): + """Sets the storage_disk_ids of this CreateVMBody. + + + :param storage_disk_ids: The storage_disk_ids of this CreateVMBody. # noqa: E501 + :type: list[str] + """ + + self._storage_disk_ids = storage_disk_ids + + @property + def metadata(self): + """Gets the metadata of this CreateVMBody. # noqa: E501 + + + :return: The metadata of this CreateVMBody. # noqa: E501 + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this CreateVMBody. + + + :param metadata: The metadata of this CreateVMBody. # noqa: E501 + :type: dict(str, str) + """ + + self._metadata = metadata + + @property + def topology(self): + """Gets the topology of this CreateVMBody. # noqa: E501 + + + :return: The topology of this CreateVMBody. # noqa: E501 + :rtype: CpuTopology + """ + return self._topology + + @topology.setter + def topology(self, topology): + """Sets the topology of this CreateVMBody. + + + :param topology: The topology of this CreateVMBody. # noqa: E501 + :type: CpuTopology + """ + + self._topology = topology + + @property + def validate_only(self): + """Gets the validate_only of this CreateVMBody. # noqa: E501 + + + :return: The validate_only of this CreateVMBody. # noqa: E501 + :rtype: bool + """ + return self._validate_only + + @validate_only.setter + def validate_only(self, validate_only): + """Sets the validate_only of this CreateVMBody. + + + :param validate_only: The validate_only of this CreateVMBody. # noqa: E501 + :type: bool + """ + + self._validate_only = validate_only + + @property + def expire_time(self): + """Gets the expire_time of this CreateVMBody. # noqa: E501 + + + :return: The expire_time of this CreateVMBody. # noqa: E501 + :rtype: datetime + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this CreateVMBody. + + + :param expire_time: The expire_time of this CreateVMBody. # noqa: E501 + :type: datetime + """ + + self._expire_time = expire_time + + @property + def ttl(self): + """Gets the ttl of this CreateVMBody. # noqa: E501 + + + :return: The ttl of this CreateVMBody. # noqa: E501 + :rtype: str + """ + return self._ttl + + @ttl.setter + def ttl(self, ttl): + """Sets the ttl of this CreateVMBody. + + + :param ttl: The ttl of this CreateVMBody. # noqa: E501 + :type: str + """ + + self._ttl = ttl + + @property + def commitment_term(self): + """Gets the commitment_term of this CreateVMBody. # noqa: E501 + + + :return: The commitment_term of this CreateVMBody. # noqa: E501 + :rtype: CommitmentTerm + """ + return self._commitment_term + + @commitment_term.setter + def commitment_term(self, commitment_term): + """Sets the commitment_term of this CreateVMBody. + + + :param commitment_term: The commitment_term of this CreateVMBody. # noqa: E501 + :type: CommitmentTerm + """ + + self._commitment_term = commitment_term + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateVMBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateVMBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateVMBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_vm_request_nic.py b/docs/cudo_compute/models/create_vm_request_nic.py new file mode 100644 index 0000000..9c5db58 --- /dev/null +++ b/docs/cudo_compute/models/create_vm_request_nic.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateVMRequestNIC(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'network_id': 'str', + 'assign_public_ip': 'bool', + 'security_group_ids': 'list[str]' + } + + attribute_map = { + 'network_id': 'networkId', + 'assign_public_ip': 'assignPublicIp', + 'security_group_ids': 'securityGroupIds' + } + + def __init__(self, network_id=None, assign_public_ip=None, security_group_ids=None, _configuration=None): # noqa: E501 + """CreateVMRequestNIC - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._network_id = None + self._assign_public_ip = None + self._security_group_ids = None + self.discriminator = None + + if network_id is not None: + self.network_id = network_id + if assign_public_ip is not None: + self.assign_public_ip = assign_public_ip + if security_group_ids is not None: + self.security_group_ids = security_group_ids + + @property + def network_id(self): + """Gets the network_id of this CreateVMRequestNIC. # noqa: E501 + + + :return: The network_id of this CreateVMRequestNIC. # noqa: E501 + :rtype: str + """ + return self._network_id + + @network_id.setter + def network_id(self, network_id): + """Sets the network_id of this CreateVMRequestNIC. + + + :param network_id: The network_id of this CreateVMRequestNIC. # noqa: E501 + :type: str + """ + + self._network_id = network_id + + @property + def assign_public_ip(self): + """Gets the assign_public_ip of this CreateVMRequestNIC. # noqa: E501 + + + :return: The assign_public_ip of this CreateVMRequestNIC. # noqa: E501 + :rtype: bool + """ + return self._assign_public_ip + + @assign_public_ip.setter + def assign_public_ip(self, assign_public_ip): + """Sets the assign_public_ip of this CreateVMRequestNIC. + + + :param assign_public_ip: The assign_public_ip of this CreateVMRequestNIC. # noqa: E501 + :type: bool + """ + + self._assign_public_ip = assign_public_ip + + @property + def security_group_ids(self): + """Gets the security_group_ids of this CreateVMRequestNIC. # noqa: E501 + + + :return: The security_group_ids of this CreateVMRequestNIC. # noqa: E501 + :rtype: list[str] + """ + return self._security_group_ids + + @security_group_ids.setter + def security_group_ids(self, security_group_ids): + """Sets the security_group_ids of this CreateVMRequestNIC. + + + :param security_group_ids: The security_group_ids of this CreateVMRequestNIC. # noqa: E501 + :type: list[str] + """ + + self._security_group_ids = security_group_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateVMRequestNIC, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateVMRequestNIC): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateVMRequestNIC): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/create_vm_response.py b/docs/cudo_compute/models/create_vm_response.py new file mode 100644 index 0000000..2bd09b5 --- /dev/null +++ b/docs/cudo_compute/models/create_vm_response.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreateVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'vm': 'VM' + } + + attribute_map = { + 'id': 'id', + 'vm': 'vm' + } + + def __init__(self, id=None, vm=None, _configuration=None): # noqa: E501 + """CreateVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._vm = None + self.discriminator = None + + self.id = id + if vm is not None: + self.vm = vm + + @property + def id(self): + """Gets the id of this CreateVMResponse. # noqa: E501 + + + :return: The id of this CreateVMResponse. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateVMResponse. + + + :param id: The id of this CreateVMResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def vm(self): + """Gets the vm of this CreateVMResponse. # noqa: E501 + + + :return: The vm of this CreateVMResponse. # noqa: E501 + :rtype: VM + """ + return self._vm + + @vm.setter + def vm(self, vm): + """Sets the vm of this CreateVMResponse. + + + :param vm: The vm of this CreateVMResponse. # noqa: E501 + :type: VM + """ + + self._vm = vm + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/credit_balance_recharge.py b/docs/cudo_compute/models/credit_balance_recharge.py new file mode 100644 index 0000000..f33f9a4 --- /dev/null +++ b/docs/cudo_compute/models/credit_balance_recharge.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreditBalanceRecharge(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'low': 'Decimal', + 'high': 'Decimal', + 'auto_recharge': 'bool', + 'transaction': 'Transaction' + } + + attribute_map = { + 'low': 'low', + 'high': 'high', + 'auto_recharge': 'autoRecharge', + 'transaction': 'transaction' + } + + def __init__(self, low=None, high=None, auto_recharge=None, transaction=None, _configuration=None): # noqa: E501 + """CreditBalanceRecharge - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._low = None + self._high = None + self._auto_recharge = None + self._transaction = None + self.discriminator = None + + self.low = low + self.high = high + self.auto_recharge = auto_recharge + if transaction is not None: + self.transaction = transaction + + @property + def low(self): + """Gets the low of this CreditBalanceRecharge. # noqa: E501 + + + :return: The low of this CreditBalanceRecharge. # noqa: E501 + :rtype: Decimal + """ + return self._low + + @low.setter + def low(self, low): + """Sets the low of this CreditBalanceRecharge. + + + :param low: The low of this CreditBalanceRecharge. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and low is None: + raise ValueError("Invalid value for `low`, must not be `None`") # noqa: E501 + + self._low = low + + @property + def high(self): + """Gets the high of this CreditBalanceRecharge. # noqa: E501 + + + :return: The high of this CreditBalanceRecharge. # noqa: E501 + :rtype: Decimal + """ + return self._high + + @high.setter + def high(self, high): + """Sets the high of this CreditBalanceRecharge. + + + :param high: The high of this CreditBalanceRecharge. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and high is None: + raise ValueError("Invalid value for `high`, must not be `None`") # noqa: E501 + + self._high = high + + @property + def auto_recharge(self): + """Gets the auto_recharge of this CreditBalanceRecharge. # noqa: E501 + + + :return: The auto_recharge of this CreditBalanceRecharge. # noqa: E501 + :rtype: bool + """ + return self._auto_recharge + + @auto_recharge.setter + def auto_recharge(self, auto_recharge): + """Sets the auto_recharge of this CreditBalanceRecharge. + + + :param auto_recharge: The auto_recharge of this CreditBalanceRecharge. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and auto_recharge is None: + raise ValueError("Invalid value for `auto_recharge`, must not be `None`") # noqa: E501 + + self._auto_recharge = auto_recharge + + @property + def transaction(self): + """Gets the transaction of this CreditBalanceRecharge. # noqa: E501 + + + :return: The transaction of this CreditBalanceRecharge. # noqa: E501 + :rtype: Transaction + """ + return self._transaction + + @transaction.setter + def transaction(self, transaction): + """Sets the transaction of this CreditBalanceRecharge. + + + :param transaction: The transaction of this CreditBalanceRecharge. # noqa: E501 + :type: Transaction + """ + + self._transaction = transaction + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreditBalanceRecharge, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreditBalanceRecharge): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreditBalanceRecharge): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/credit_balance_transaction.py b/docs/cudo_compute/models/credit_balance_transaction.py new file mode 100644 index 0000000..b081e02 --- /dev/null +++ b/docs/cudo_compute/models/credit_balance_transaction.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class CreditBalanceTransaction(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'amount': 'Decimal', + 'description': 'str', + 'create_time': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'amount': 'amount', + 'description': 'description', + 'create_time': 'createTime' + } + + def __init__(self, id=None, amount=None, description=None, create_time=None, _configuration=None): # noqa: E501 + """CreditBalanceTransaction - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._amount = None + self._description = None + self._create_time = None + self.discriminator = None + + self.id = id + self.amount = amount + self.description = description + self.create_time = create_time + + @property + def id(self): + """Gets the id of this CreditBalanceTransaction. # noqa: E501 + + + :return: The id of this CreditBalanceTransaction. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreditBalanceTransaction. + + + :param id: The id of this CreditBalanceTransaction. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def amount(self): + """Gets the amount of this CreditBalanceTransaction. # noqa: E501 + + + :return: The amount of this CreditBalanceTransaction. # noqa: E501 + :rtype: Decimal + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this CreditBalanceTransaction. + + + :param amount: The amount of this CreditBalanceTransaction. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def description(self): + """Gets the description of this CreditBalanceTransaction. # noqa: E501 + + + :return: The description of this CreditBalanceTransaction. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreditBalanceTransaction. + + + :param description: The description of this CreditBalanceTransaction. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and description is None: + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + @property + def create_time(self): + """Gets the create_time of this CreditBalanceTransaction. # noqa: E501 + + + :return: The create_time of this CreditBalanceTransaction. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this CreditBalanceTransaction. + + + :param create_time: The create_time of this CreditBalanceTransaction. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and create_time is None: + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreditBalanceTransaction, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreditBalanceTransaction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreditBalanceTransaction): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/data_center_commitment.py b/docs/cudo_compute/models/data_center_commitment.py new file mode 100644 index 0000000..7bf6a02 --- /dev/null +++ b/docs/cudo_compute/models/data_center_commitment.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DataCenterCommitment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'create_time': 'datetime', + 'commitment_end_time': 'datetime', + 'vcpus': 'int', + 'gpus': 'int', + 'memory_gib': 'int', + 'vcpu_price_hr': 'Decimal', + 'gpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal' + } + + attribute_map = { + 'create_time': 'createTime', + 'commitment_end_time': 'commitmentEndTime', + 'vcpus': 'vcpus', + 'gpus': 'gpus', + 'memory_gib': 'memoryGib', + 'vcpu_price_hr': 'vcpuPriceHr', + 'gpu_price_hr': 'gpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr' + } + + def __init__(self, create_time=None, commitment_end_time=None, vcpus=None, gpus=None, memory_gib=None, vcpu_price_hr=None, gpu_price_hr=None, memory_gib_price_hr=None, _configuration=None): # noqa: E501 + """DataCenterCommitment - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._create_time = None + self._commitment_end_time = None + self._vcpus = None + self._gpus = None + self._memory_gib = None + self._vcpu_price_hr = None + self._gpu_price_hr = None + self._memory_gib_price_hr = None + self.discriminator = None + + if create_time is not None: + self.create_time = create_time + if commitment_end_time is not None: + self.commitment_end_time = commitment_end_time + if vcpus is not None: + self.vcpus = vcpus + if gpus is not None: + self.gpus = gpus + if memory_gib is not None: + self.memory_gib = memory_gib + if vcpu_price_hr is not None: + self.vcpu_price_hr = vcpu_price_hr + if gpu_price_hr is not None: + self.gpu_price_hr = gpu_price_hr + if memory_gib_price_hr is not None: + self.memory_gib_price_hr = memory_gib_price_hr + + @property + def create_time(self): + """Gets the create_time of this DataCenterCommitment. # noqa: E501 + + + :return: The create_time of this DataCenterCommitment. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this DataCenterCommitment. + + + :param create_time: The create_time of this DataCenterCommitment. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def commitment_end_time(self): + """Gets the commitment_end_time of this DataCenterCommitment. # noqa: E501 + + + :return: The commitment_end_time of this DataCenterCommitment. # noqa: E501 + :rtype: datetime + """ + return self._commitment_end_time + + @commitment_end_time.setter + def commitment_end_time(self, commitment_end_time): + """Sets the commitment_end_time of this DataCenterCommitment. + + + :param commitment_end_time: The commitment_end_time of this DataCenterCommitment. # noqa: E501 + :type: datetime + """ + + self._commitment_end_time = commitment_end_time + + @property + def vcpus(self): + """Gets the vcpus of this DataCenterCommitment. # noqa: E501 + + + :return: The vcpus of this DataCenterCommitment. # noqa: E501 + :rtype: int + """ + return self._vcpus + + @vcpus.setter + def vcpus(self, vcpus): + """Sets the vcpus of this DataCenterCommitment. + + + :param vcpus: The vcpus of this DataCenterCommitment. # noqa: E501 + :type: int + """ + + self._vcpus = vcpus + + @property + def gpus(self): + """Gets the gpus of this DataCenterCommitment. # noqa: E501 + + + :return: The gpus of this DataCenterCommitment. # noqa: E501 + :rtype: int + """ + return self._gpus + + @gpus.setter + def gpus(self, gpus): + """Sets the gpus of this DataCenterCommitment. + + + :param gpus: The gpus of this DataCenterCommitment. # noqa: E501 + :type: int + """ + + self._gpus = gpus + + @property + def memory_gib(self): + """Gets the memory_gib of this DataCenterCommitment. # noqa: E501 + + + :return: The memory_gib of this DataCenterCommitment. # noqa: E501 + :rtype: int + """ + return self._memory_gib + + @memory_gib.setter + def memory_gib(self, memory_gib): + """Sets the memory_gib of this DataCenterCommitment. + + + :param memory_gib: The memory_gib of this DataCenterCommitment. # noqa: E501 + :type: int + """ + + self._memory_gib = memory_gib + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this DataCenterCommitment. # noqa: E501 + + + :return: The vcpu_price_hr of this DataCenterCommitment. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this DataCenterCommitment. + + + :param vcpu_price_hr: The vcpu_price_hr of this DataCenterCommitment. # noqa: E501 + :type: Decimal + """ + + self._vcpu_price_hr = vcpu_price_hr + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this DataCenterCommitment. # noqa: E501 + + + :return: The gpu_price_hr of this DataCenterCommitment. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this DataCenterCommitment. + + + :param gpu_price_hr: The gpu_price_hr of this DataCenterCommitment. # noqa: E501 + :type: Decimal + """ + + self._gpu_price_hr = gpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this DataCenterCommitment. # noqa: E501 + + + :return: The memory_gib_price_hr of this DataCenterCommitment. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this DataCenterCommitment. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this DataCenterCommitment. # noqa: E501 + :type: Decimal + """ + + self._memory_gib_price_hr = memory_gib_price_hr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DataCenterCommitment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataCenterCommitment): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DataCenterCommitment): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/data_center_commitment_interval.py b/docs/cudo_compute/models/data_center_commitment_interval.py new file mode 100644 index 0000000..e90593f --- /dev/null +++ b/docs/cudo_compute/models/data_center_commitment_interval.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DataCenterCommitmentInterval(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'time': 'datetime', + 'vcpus': 'float', + 'vcpu_revenue_usd': 'Decimal', + 'gpus': 'float', + 'gpu_revenue_usd': 'Decimal', + 'memory_gib': 'float', + 'memory_revenue_usd': 'Decimal' + } + + attribute_map = { + 'time': 'time', + 'vcpus': 'vcpus', + 'vcpu_revenue_usd': 'vcpuRevenueUsd', + 'gpus': 'gpus', + 'gpu_revenue_usd': 'gpuRevenueUsd', + 'memory_gib': 'memoryGib', + 'memory_revenue_usd': 'memoryRevenueUsd' + } + + def __init__(self, time=None, vcpus=None, vcpu_revenue_usd=None, gpus=None, gpu_revenue_usd=None, memory_gib=None, memory_revenue_usd=None, _configuration=None): # noqa: E501 + """DataCenterCommitmentInterval - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._time = None + self._vcpus = None + self._vcpu_revenue_usd = None + self._gpus = None + self._gpu_revenue_usd = None + self._memory_gib = None + self._memory_revenue_usd = None + self.discriminator = None + + if time is not None: + self.time = time + if vcpus is not None: + self.vcpus = vcpus + if vcpu_revenue_usd is not None: + self.vcpu_revenue_usd = vcpu_revenue_usd + if gpus is not None: + self.gpus = gpus + if gpu_revenue_usd is not None: + self.gpu_revenue_usd = gpu_revenue_usd + if memory_gib is not None: + self.memory_gib = memory_gib + if memory_revenue_usd is not None: + self.memory_revenue_usd = memory_revenue_usd + + @property + def time(self): + """Gets the time of this DataCenterCommitmentInterval. # noqa: E501 + + + :return: The time of this DataCenterCommitmentInterval. # noqa: E501 + :rtype: datetime + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this DataCenterCommitmentInterval. + + + :param time: The time of this DataCenterCommitmentInterval. # noqa: E501 + :type: datetime + """ + + self._time = time + + @property + def vcpus(self): + """Gets the vcpus of this DataCenterCommitmentInterval. # noqa: E501 + + + :return: The vcpus of this DataCenterCommitmentInterval. # noqa: E501 + :rtype: float + """ + return self._vcpus + + @vcpus.setter + def vcpus(self, vcpus): + """Sets the vcpus of this DataCenterCommitmentInterval. + + + :param vcpus: The vcpus of this DataCenterCommitmentInterval. # noqa: E501 + :type: float + """ + + self._vcpus = vcpus + + @property + def vcpu_revenue_usd(self): + """Gets the vcpu_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + + + :return: The vcpu_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_revenue_usd + + @vcpu_revenue_usd.setter + def vcpu_revenue_usd(self, vcpu_revenue_usd): + """Sets the vcpu_revenue_usd of this DataCenterCommitmentInterval. + + + :param vcpu_revenue_usd: The vcpu_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + :type: Decimal + """ + + self._vcpu_revenue_usd = vcpu_revenue_usd + + @property + def gpus(self): + """Gets the gpus of this DataCenterCommitmentInterval. # noqa: E501 + + + :return: The gpus of this DataCenterCommitmentInterval. # noqa: E501 + :rtype: float + """ + return self._gpus + + @gpus.setter + def gpus(self, gpus): + """Sets the gpus of this DataCenterCommitmentInterval. + + + :param gpus: The gpus of this DataCenterCommitmentInterval. # noqa: E501 + :type: float + """ + + self._gpus = gpus + + @property + def gpu_revenue_usd(self): + """Gets the gpu_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + + + :return: The gpu_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_revenue_usd + + @gpu_revenue_usd.setter + def gpu_revenue_usd(self, gpu_revenue_usd): + """Sets the gpu_revenue_usd of this DataCenterCommitmentInterval. + + + :param gpu_revenue_usd: The gpu_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + :type: Decimal + """ + + self._gpu_revenue_usd = gpu_revenue_usd + + @property + def memory_gib(self): + """Gets the memory_gib of this DataCenterCommitmentInterval. # noqa: E501 + + + :return: The memory_gib of this DataCenterCommitmentInterval. # noqa: E501 + :rtype: float + """ + return self._memory_gib + + @memory_gib.setter + def memory_gib(self, memory_gib): + """Sets the memory_gib of this DataCenterCommitmentInterval. + + + :param memory_gib: The memory_gib of this DataCenterCommitmentInterval. # noqa: E501 + :type: float + """ + + self._memory_gib = memory_gib + + @property + def memory_revenue_usd(self): + """Gets the memory_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + + + :return: The memory_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + :rtype: Decimal + """ + return self._memory_revenue_usd + + @memory_revenue_usd.setter + def memory_revenue_usd(self, memory_revenue_usd): + """Sets the memory_revenue_usd of this DataCenterCommitmentInterval. + + + :param memory_revenue_usd: The memory_revenue_usd of this DataCenterCommitmentInterval. # noqa: E501 + :type: Decimal + """ + + self._memory_revenue_usd = memory_revenue_usd + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DataCenterCommitmentInterval, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataCenterCommitmentInterval): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DataCenterCommitmentInterval): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/data_center_machine_type.py b/docs/cudo_compute/models/data_center_machine_type.py new file mode 100644 index 0000000..b91bfcf --- /dev/null +++ b/docs/cudo_compute/models/data_center_machine_type.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DataCenterMachineType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'machine_type': 'str', + 'count_clusters': 'int', + 'count_hosts': 'int', + 'count_hosts_active': 'int', + 'count_hosts_inactive': 'int' + } + + attribute_map = { + 'machine_type': 'machineType', + 'count_clusters': 'countClusters', + 'count_hosts': 'countHosts', + 'count_hosts_active': 'countHostsActive', + 'count_hosts_inactive': 'countHostsInactive' + } + + def __init__(self, machine_type=None, count_clusters=None, count_hosts=None, count_hosts_active=None, count_hosts_inactive=None, _configuration=None): # noqa: E501 + """DataCenterMachineType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._machine_type = None + self._count_clusters = None + self._count_hosts = None + self._count_hosts_active = None + self._count_hosts_inactive = None + self.discriminator = None + + self.machine_type = machine_type + self.count_clusters = count_clusters + self.count_hosts = count_hosts + self.count_hosts_active = count_hosts_active + self.count_hosts_inactive = count_hosts_inactive + + @property + def machine_type(self): + """Gets the machine_type of this DataCenterMachineType. # noqa: E501 + + + :return: The machine_type of this DataCenterMachineType. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this DataCenterMachineType. + + + :param machine_type: The machine_type of this DataCenterMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def count_clusters(self): + """Gets the count_clusters of this DataCenterMachineType. # noqa: E501 + + + :return: The count_clusters of this DataCenterMachineType. # noqa: E501 + :rtype: int + """ + return self._count_clusters + + @count_clusters.setter + def count_clusters(self, count_clusters): + """Sets the count_clusters of this DataCenterMachineType. + + + :param count_clusters: The count_clusters of this DataCenterMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_clusters is None: + raise ValueError("Invalid value for `count_clusters`, must not be `None`") # noqa: E501 + + self._count_clusters = count_clusters + + @property + def count_hosts(self): + """Gets the count_hosts of this DataCenterMachineType. # noqa: E501 + + + :return: The count_hosts of this DataCenterMachineType. # noqa: E501 + :rtype: int + """ + return self._count_hosts + + @count_hosts.setter + def count_hosts(self, count_hosts): + """Sets the count_hosts of this DataCenterMachineType. + + + :param count_hosts: The count_hosts of this DataCenterMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_hosts is None: + raise ValueError("Invalid value for `count_hosts`, must not be `None`") # noqa: E501 + + self._count_hosts = count_hosts + + @property + def count_hosts_active(self): + """Gets the count_hosts_active of this DataCenterMachineType. # noqa: E501 + + + :return: The count_hosts_active of this DataCenterMachineType. # noqa: E501 + :rtype: int + """ + return self._count_hosts_active + + @count_hosts_active.setter + def count_hosts_active(self, count_hosts_active): + """Sets the count_hosts_active of this DataCenterMachineType. + + + :param count_hosts_active: The count_hosts_active of this DataCenterMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_hosts_active is None: + raise ValueError("Invalid value for `count_hosts_active`, must not be `None`") # noqa: E501 + + self._count_hosts_active = count_hosts_active + + @property + def count_hosts_inactive(self): + """Gets the count_hosts_inactive of this DataCenterMachineType. # noqa: E501 + + + :return: The count_hosts_inactive of this DataCenterMachineType. # noqa: E501 + :rtype: int + """ + return self._count_hosts_inactive + + @count_hosts_inactive.setter + def count_hosts_inactive(self, count_hosts_inactive): + """Sets the count_hosts_inactive of this DataCenterMachineType. + + + :param count_hosts_inactive: The count_hosts_inactive of this DataCenterMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_hosts_inactive is None: + raise ValueError("Invalid value for `count_hosts_inactive`, must not be `None`") # noqa: E501 + + self._count_hosts_inactive = count_hosts_inactive + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DataCenterMachineType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataCenterMachineType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DataCenterMachineType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/data_center_revenue_resource.py b/docs/cudo_compute/models/data_center_revenue_resource.py new file mode 100644 index 0000000..2fb8661 --- /dev/null +++ b/docs/cudo_compute/models/data_center_revenue_resource.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DataCenterRevenueResource(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resource_type': 'str', + 'resource_id': 'str', + 'quantity': 'Decimal', + 'unit': 'str', + 'revenue_usd': 'Decimal' + } + + attribute_map = { + 'resource_type': 'resourceType', + 'resource_id': 'resourceId', + 'quantity': 'quantity', + 'unit': 'unit', + 'revenue_usd': 'revenueUsd' + } + + def __init__(self, resource_type=None, resource_id=None, quantity=None, unit=None, revenue_usd=None, _configuration=None): # noqa: E501 + """DataCenterRevenueResource - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._resource_type = None + self._resource_id = None + self._quantity = None + self._unit = None + self._revenue_usd = None + self.discriminator = None + + self.resource_type = resource_type + self.resource_id = resource_id + self.quantity = quantity + self.unit = unit + self.revenue_usd = revenue_usd + + @property + def resource_type(self): + """Gets the resource_type of this DataCenterRevenueResource. # noqa: E501 + + + :return: The resource_type of this DataCenterRevenueResource. # noqa: E501 + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """Sets the resource_type of this DataCenterRevenueResource. + + + :param resource_type: The resource_type of this DataCenterRevenueResource. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and resource_type is None: + raise ValueError("Invalid value for `resource_type`, must not be `None`") # noqa: E501 + + self._resource_type = resource_type + + @property + def resource_id(self): + """Gets the resource_id of this DataCenterRevenueResource. # noqa: E501 + + + :return: The resource_id of this DataCenterRevenueResource. # noqa: E501 + :rtype: str + """ + return self._resource_id + + @resource_id.setter + def resource_id(self, resource_id): + """Sets the resource_id of this DataCenterRevenueResource. + + + :param resource_id: The resource_id of this DataCenterRevenueResource. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and resource_id is None: + raise ValueError("Invalid value for `resource_id`, must not be `None`") # noqa: E501 + + self._resource_id = resource_id + + @property + def quantity(self): + """Gets the quantity of this DataCenterRevenueResource. # noqa: E501 + + + :return: The quantity of this DataCenterRevenueResource. # noqa: E501 + :rtype: Decimal + """ + return self._quantity + + @quantity.setter + def quantity(self, quantity): + """Sets the quantity of this DataCenterRevenueResource. + + + :param quantity: The quantity of this DataCenterRevenueResource. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and quantity is None: + raise ValueError("Invalid value for `quantity`, must not be `None`") # noqa: E501 + + self._quantity = quantity + + @property + def unit(self): + """Gets the unit of this DataCenterRevenueResource. # noqa: E501 + + + :return: The unit of this DataCenterRevenueResource. # noqa: E501 + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit): + """Sets the unit of this DataCenterRevenueResource. + + + :param unit: The unit of this DataCenterRevenueResource. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and unit is None: + raise ValueError("Invalid value for `unit`, must not be `None`") # noqa: E501 + + self._unit = unit + + @property + def revenue_usd(self): + """Gets the revenue_usd of this DataCenterRevenueResource. # noqa: E501 + + + :return: The revenue_usd of this DataCenterRevenueResource. # noqa: E501 + :rtype: Decimal + """ + return self._revenue_usd + + @revenue_usd.setter + def revenue_usd(self, revenue_usd): + """Sets the revenue_usd of this DataCenterRevenueResource. + + + :param revenue_usd: The revenue_usd of this DataCenterRevenueResource. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and revenue_usd is None: + raise ValueError("Invalid value for `revenue_usd`, must not be `None`") # noqa: E501 + + self._revenue_usd = revenue_usd + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DataCenterRevenueResource, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataCenterRevenueResource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DataCenterRevenueResource): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/data_center_time_revenue.py b/docs/cudo_compute/models/data_center_time_revenue.py new file mode 100644 index 0000000..36de30e --- /dev/null +++ b/docs/cudo_compute/models/data_center_time_revenue.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DataCenterTimeRevenue(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'time': 'datetime', + 'revenue_usd': 'Decimal' + } + + attribute_map = { + 'time': 'time', + 'revenue_usd': 'revenueUsd' + } + + def __init__(self, time=None, revenue_usd=None, _configuration=None): # noqa: E501 + """DataCenterTimeRevenue - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._time = None + self._revenue_usd = None + self.discriminator = None + + self.time = time + self.revenue_usd = revenue_usd + + @property + def time(self): + """Gets the time of this DataCenterTimeRevenue. # noqa: E501 + + + :return: The time of this DataCenterTimeRevenue. # noqa: E501 + :rtype: datetime + """ + return self._time + + @time.setter + def time(self, time): + """Sets the time of this DataCenterTimeRevenue. + + + :param time: The time of this DataCenterTimeRevenue. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and time is None: + raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 + + self._time = time + + @property + def revenue_usd(self): + """Gets the revenue_usd of this DataCenterTimeRevenue. # noqa: E501 + + + :return: The revenue_usd of this DataCenterTimeRevenue. # noqa: E501 + :rtype: Decimal + """ + return self._revenue_usd + + @revenue_usd.setter + def revenue_usd(self, revenue_usd): + """Sets the revenue_usd of this DataCenterTimeRevenue. + + + :param revenue_usd: The revenue_usd of this DataCenterTimeRevenue. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and revenue_usd is None: + raise ValueError("Invalid value for `revenue_usd`, must not be `None`") # noqa: E501 + + self._revenue_usd = revenue_usd + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DataCenterTimeRevenue, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataCenterTimeRevenue): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DataCenterTimeRevenue): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/decimal.py b/docs/cudo_compute/models/decimal.py new file mode 100644 index 0000000..103a893 --- /dev/null +++ b/docs/cudo_compute/models/decimal.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Decimal(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'value': 'str' + } + + attribute_map = { + 'value': 'value' + } + + def __init__(self, value=None, _configuration=None): # noqa: E501 + """Decimal - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._value = None + self.discriminator = None + + if value is not None: + self.value = value + + @property + def value(self): + """Gets the value of this Decimal. # noqa: E501 + + The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. # noqa: E501 + + :return: The value of this Decimal. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this Decimal. + + The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits ['.'] [Digits] | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. # noqa: E501 + + :param value: The value of this Decimal. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Decimal, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Decimal): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Decimal): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/delete_disk_snapshot_response.py b/docs/cudo_compute/models/delete_disk_snapshot_response.py new file mode 100644 index 0000000..be433c3 --- /dev/null +++ b/docs/cudo_compute/models/delete_disk_snapshot_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DeleteDiskSnapshotResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DeleteDiskSnapshotResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeleteDiskSnapshotResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteDiskSnapshotResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteDiskSnapshotResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/delete_network_response.py b/docs/cudo_compute/models/delete_network_response.py new file mode 100644 index 0000000..a3248d9 --- /dev/null +++ b/docs/cudo_compute/models/delete_network_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DeleteNetworkResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DeleteNetworkResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeleteNetworkResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteNetworkResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteNetworkResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/delete_private_vm_image_response.py b/docs/cudo_compute/models/delete_private_vm_image_response.py new file mode 100644 index 0000000..a597c90 --- /dev/null +++ b/docs/cudo_compute/models/delete_private_vm_image_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DeletePrivateVMImageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DeletePrivateVMImageResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeletePrivateVMImageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeletePrivateVMImageResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeletePrivateVMImageResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/delete_security_group_response.py b/docs/cudo_compute/models/delete_security_group_response.py new file mode 100644 index 0000000..0c908be --- /dev/null +++ b/docs/cudo_compute/models/delete_security_group_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DeleteSecurityGroupResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DeleteSecurityGroupResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeleteSecurityGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteSecurityGroupResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteSecurityGroupResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/delete_storage_disk_response.py b/docs/cudo_compute/models/delete_storage_disk_response.py new file mode 100644 index 0000000..a2b6f19 --- /dev/null +++ b/docs/cudo_compute/models/delete_storage_disk_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DeleteStorageDiskResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DeleteStorageDiskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DeleteStorageDiskResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteStorageDiskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeleteStorageDiskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/detach_security_group_response.py b/docs/cudo_compute/models/detach_security_group_response.py new file mode 100644 index 0000000..135cfc9 --- /dev/null +++ b/docs/cudo_compute/models/detach_security_group_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DetachSecurityGroupResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DetachSecurityGroupResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DetachSecurityGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DetachSecurityGroupResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DetachSecurityGroupResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/detach_storage_disk_response.py b/docs/cudo_compute/models/detach_storage_disk_response.py new file mode 100644 index 0000000..2a274bf --- /dev/null +++ b/docs/cudo_compute/models/detach_storage_disk_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DetachStorageDiskResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DetachStorageDiskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DetachStorageDiskResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DetachStorageDiskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DetachStorageDiskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/disk.py b/docs/cudo_compute/models/disk.py new file mode 100644 index 0000000..2e4dc1d --- /dev/null +++ b/docs/cudo_compute/models/disk.py @@ -0,0 +1,384 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Disk(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'project_id': 'str', + 'data_center_id': 'str', + 'vm_id': 'str', + 'size_gib': 'int', + 'storage_class': 'DiskStorageClass', + 'disk_type': 'DiskType', + 'public_image_id': 'str', + 'private_image_id': 'str', + 'create_time': 'datetime', + 'disk_state': 'DiskState' + } + + attribute_map = { + 'id': 'id', + 'project_id': 'projectId', + 'data_center_id': 'dataCenterId', + 'vm_id': 'vmId', + 'size_gib': 'sizeGib', + 'storage_class': 'storageClass', + 'disk_type': 'diskType', + 'public_image_id': 'publicImageId', + 'private_image_id': 'privateImageId', + 'create_time': 'createTime', + 'disk_state': 'diskState' + } + + def __init__(self, id=None, project_id=None, data_center_id=None, vm_id=None, size_gib=None, storage_class=None, disk_type=None, public_image_id=None, private_image_id=None, create_time=None, disk_state=None, _configuration=None): # noqa: E501 + """Disk - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._project_id = None + self._data_center_id = None + self._vm_id = None + self._size_gib = None + self._storage_class = None + self._disk_type = None + self._public_image_id = None + self._private_image_id = None + self._create_time = None + self._disk_state = None + self.discriminator = None + + if id is not None: + self.id = id + if project_id is not None: + self.project_id = project_id + if data_center_id is not None: + self.data_center_id = data_center_id + if vm_id is not None: + self.vm_id = vm_id + self.size_gib = size_gib + if storage_class is not None: + self.storage_class = storage_class + if disk_type is not None: + self.disk_type = disk_type + if public_image_id is not None: + self.public_image_id = public_image_id + if private_image_id is not None: + self.private_image_id = private_image_id + if create_time is not None: + self.create_time = create_time + if disk_state is not None: + self.disk_state = disk_state + + @property + def id(self): + """Gets the id of this Disk. # noqa: E501 + + + :return: The id of this Disk. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Disk. + + + :param id: The id of this Disk. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def project_id(self): + """Gets the project_id of this Disk. # noqa: E501 + + + :return: The project_id of this Disk. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this Disk. + + + :param project_id: The project_id of this Disk. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def data_center_id(self): + """Gets the data_center_id of this Disk. # noqa: E501 + + + :return: The data_center_id of this Disk. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this Disk. + + + :param data_center_id: The data_center_id of this Disk. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def vm_id(self): + """Gets the vm_id of this Disk. # noqa: E501 + + + :return: The vm_id of this Disk. # noqa: E501 + :rtype: str + """ + return self._vm_id + + @vm_id.setter + def vm_id(self, vm_id): + """Sets the vm_id of this Disk. + + + :param vm_id: The vm_id of this Disk. # noqa: E501 + :type: str + """ + + self._vm_id = vm_id + + @property + def size_gib(self): + """Gets the size_gib of this Disk. # noqa: E501 + + + :return: The size_gib of this Disk. # noqa: E501 + :rtype: int + """ + return self._size_gib + + @size_gib.setter + def size_gib(self, size_gib): + """Sets the size_gib of this Disk. + + + :param size_gib: The size_gib of this Disk. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and size_gib is None: + raise ValueError("Invalid value for `size_gib`, must not be `None`") # noqa: E501 + + self._size_gib = size_gib + + @property + def storage_class(self): + """Gets the storage_class of this Disk. # noqa: E501 + + + :return: The storage_class of this Disk. # noqa: E501 + :rtype: DiskStorageClass + """ + return self._storage_class + + @storage_class.setter + def storage_class(self, storage_class): + """Sets the storage_class of this Disk. + + + :param storage_class: The storage_class of this Disk. # noqa: E501 + :type: DiskStorageClass + """ + + self._storage_class = storage_class + + @property + def disk_type(self): + """Gets the disk_type of this Disk. # noqa: E501 + + + :return: The disk_type of this Disk. # noqa: E501 + :rtype: DiskType + """ + return self._disk_type + + @disk_type.setter + def disk_type(self, disk_type): + """Sets the disk_type of this Disk. + + + :param disk_type: The disk_type of this Disk. # noqa: E501 + :type: DiskType + """ + + self._disk_type = disk_type + + @property + def public_image_id(self): + """Gets the public_image_id of this Disk. # noqa: E501 + + + :return: The public_image_id of this Disk. # noqa: E501 + :rtype: str + """ + return self._public_image_id + + @public_image_id.setter + def public_image_id(self, public_image_id): + """Sets the public_image_id of this Disk. + + + :param public_image_id: The public_image_id of this Disk. # noqa: E501 + :type: str + """ + + self._public_image_id = public_image_id + + @property + def private_image_id(self): + """Gets the private_image_id of this Disk. # noqa: E501 + + + :return: The private_image_id of this Disk. # noqa: E501 + :rtype: str + """ + return self._private_image_id + + @private_image_id.setter + def private_image_id(self, private_image_id): + """Sets the private_image_id of this Disk. + + + :param private_image_id: The private_image_id of this Disk. # noqa: E501 + :type: str + """ + + self._private_image_id = private_image_id + + @property + def create_time(self): + """Gets the create_time of this Disk. # noqa: E501 + + + :return: The create_time of this Disk. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Disk. + + + :param create_time: The create_time of this Disk. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def disk_state(self): + """Gets the disk_state of this Disk. # noqa: E501 + + + :return: The disk_state of this Disk. # noqa: E501 + :rtype: DiskState + """ + return self._disk_state + + @disk_state.setter + def disk_state(self, disk_state): + """Sets the disk_state of this Disk. + + + :param disk_state: The disk_state of this Disk. # noqa: E501 + :type: DiskState + """ + + self._disk_state = disk_state + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Disk, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Disk): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Disk): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/disk_result.py b/docs/cudo_compute/models/disk_result.py new file mode 100644 index 0000000..9ef8ef7 --- /dev/null +++ b/docs/cudo_compute/models/disk_result.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DiskResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'id': 'str', + 'data_center_id': 'str', + 'size_gib': 'int', + 'public_image_id': 'str', + 'private_image_id': 'str', + 'type': 'DiskType', + 'state': 'DiskState', + 'create_time': 'datetime' + } + + attribute_map = { + 'project_id': 'projectId', + 'id': 'id', + 'data_center_id': 'dataCenterId', + 'size_gib': 'sizeGib', + 'public_image_id': 'publicImageId', + 'private_image_id': 'privateImageId', + 'type': 'type', + 'state': 'state', + 'create_time': 'createTime' + } + + def __init__(self, project_id=None, id=None, data_center_id=None, size_gib=None, public_image_id=None, private_image_id=None, type=None, state=None, create_time=None, _configuration=None): # noqa: E501 + """DiskResult - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._id = None + self._data_center_id = None + self._size_gib = None + self._public_image_id = None + self._private_image_id = None + self._type = None + self._state = None + self._create_time = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if id is not None: + self.id = id + if data_center_id is not None: + self.data_center_id = data_center_id + if size_gib is not None: + self.size_gib = size_gib + if public_image_id is not None: + self.public_image_id = public_image_id + if private_image_id is not None: + self.private_image_id = private_image_id + if type is not None: + self.type = type + if state is not None: + self.state = state + if create_time is not None: + self.create_time = create_time + + @property + def project_id(self): + """Gets the project_id of this DiskResult. # noqa: E501 + + + :return: The project_id of this DiskResult. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this DiskResult. + + + :param project_id: The project_id of this DiskResult. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def id(self): + """Gets the id of this DiskResult. # noqa: E501 + + + :return: The id of this DiskResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DiskResult. + + + :param id: The id of this DiskResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def data_center_id(self): + """Gets the data_center_id of this DiskResult. # noqa: E501 + + + :return: The data_center_id of this DiskResult. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this DiskResult. + + + :param data_center_id: The data_center_id of this DiskResult. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def size_gib(self): + """Gets the size_gib of this DiskResult. # noqa: E501 + + + :return: The size_gib of this DiskResult. # noqa: E501 + :rtype: int + """ + return self._size_gib + + @size_gib.setter + def size_gib(self, size_gib): + """Sets the size_gib of this DiskResult. + + + :param size_gib: The size_gib of this DiskResult. # noqa: E501 + :type: int + """ + + self._size_gib = size_gib + + @property + def public_image_id(self): + """Gets the public_image_id of this DiskResult. # noqa: E501 + + + :return: The public_image_id of this DiskResult. # noqa: E501 + :rtype: str + """ + return self._public_image_id + + @public_image_id.setter + def public_image_id(self, public_image_id): + """Sets the public_image_id of this DiskResult. + + + :param public_image_id: The public_image_id of this DiskResult. # noqa: E501 + :type: str + """ + + self._public_image_id = public_image_id + + @property + def private_image_id(self): + """Gets the private_image_id of this DiskResult. # noqa: E501 + + + :return: The private_image_id of this DiskResult. # noqa: E501 + :rtype: str + """ + return self._private_image_id + + @private_image_id.setter + def private_image_id(self, private_image_id): + """Sets the private_image_id of this DiskResult. + + + :param private_image_id: The private_image_id of this DiskResult. # noqa: E501 + :type: str + """ + + self._private_image_id = private_image_id + + @property + def type(self): + """Gets the type of this DiskResult. # noqa: E501 + + + :return: The type of this DiskResult. # noqa: E501 + :rtype: DiskType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this DiskResult. + + + :param type: The type of this DiskResult. # noqa: E501 + :type: DiskType + """ + + self._type = type + + @property + def state(self): + """Gets the state of this DiskResult. # noqa: E501 + + + :return: The state of this DiskResult. # noqa: E501 + :rtype: DiskState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this DiskResult. + + + :param state: The state of this DiskResult. # noqa: E501 + :type: DiskState + """ + + self._state = state + + @property + def create_time(self): + """Gets the create_time of this DiskResult. # noqa: E501 + + + :return: The create_time of this DiskResult. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this DiskResult. + + + :param create_time: The create_time of this DiskResult. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DiskResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DiskResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DiskResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/disk_state.py b/docs/cudo_compute/models/disk_state.py new file mode 100644 index 0000000..9ea707d --- /dev/null +++ b/docs/cudo_compute/models/disk_state.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DiskState(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + INIT = "DISK_STATE_INIT" + READY = "DISK_STATE_READY" + USED = "DISK_STATE_USED" + DISABLED = "DISK_STATE_DISABLED" + LOCKED = "DISK_STATE_LOCKED" + ERROR = "DISK_STATE_ERROR" + CLONE = "DISK_STATE_CLONE" + DELETE = "DISK_STATE_DELETE" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DiskState - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DiskState, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DiskState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DiskState): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/disk_storage_class.py b/docs/cudo_compute/models/disk_storage_class.py new file mode 100644 index 0000000..7124c92 --- /dev/null +++ b/docs/cudo_compute/models/disk_storage_class.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DiskStorageClass(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "STORAGE_CLASS_UNKNOWN" + LOCAL = "STORAGE_CLASS_LOCAL" + NETWORK = "STORAGE_CLASS_NETWORK" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DiskStorageClass - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DiskStorageClass, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DiskStorageClass): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DiskStorageClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/disk_storage_price_hr.py b/docs/cudo_compute/models/disk_storage_price_hr.py new file mode 100644 index 0000000..8af5b19 --- /dev/null +++ b/docs/cudo_compute/models/disk_storage_price_hr.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DiskStoragePriceHr(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'storage_class': 'VMDataCenterStorageClass', + 'disk_gib_price_hr': 'Decimal', + 'snapshot_gib_price_hr': 'Decimal' + } + + attribute_map = { + 'storage_class': 'storageClass', + 'disk_gib_price_hr': 'diskGibPriceHr', + 'snapshot_gib_price_hr': 'snapshotGibPriceHr' + } + + def __init__(self, storage_class=None, disk_gib_price_hr=None, snapshot_gib_price_hr=None, _configuration=None): # noqa: E501 + """DiskStoragePriceHr - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._storage_class = None + self._disk_gib_price_hr = None + self._snapshot_gib_price_hr = None + self.discriminator = None + + if storage_class is not None: + self.storage_class = storage_class + if disk_gib_price_hr is not None: + self.disk_gib_price_hr = disk_gib_price_hr + if snapshot_gib_price_hr is not None: + self.snapshot_gib_price_hr = snapshot_gib_price_hr + + @property + def storage_class(self): + """Gets the storage_class of this DiskStoragePriceHr. # noqa: E501 + + + :return: The storage_class of this DiskStoragePriceHr. # noqa: E501 + :rtype: VMDataCenterStorageClass + """ + return self._storage_class + + @storage_class.setter + def storage_class(self, storage_class): + """Sets the storage_class of this DiskStoragePriceHr. + + + :param storage_class: The storage_class of this DiskStoragePriceHr. # noqa: E501 + :type: VMDataCenterStorageClass + """ + + self._storage_class = storage_class + + @property + def disk_gib_price_hr(self): + """Gets the disk_gib_price_hr of this DiskStoragePriceHr. # noqa: E501 + + + :return: The disk_gib_price_hr of this DiskStoragePriceHr. # noqa: E501 + :rtype: Decimal + """ + return self._disk_gib_price_hr + + @disk_gib_price_hr.setter + def disk_gib_price_hr(self, disk_gib_price_hr): + """Sets the disk_gib_price_hr of this DiskStoragePriceHr. + + + :param disk_gib_price_hr: The disk_gib_price_hr of this DiskStoragePriceHr. # noqa: E501 + :type: Decimal + """ + + self._disk_gib_price_hr = disk_gib_price_hr + + @property + def snapshot_gib_price_hr(self): + """Gets the snapshot_gib_price_hr of this DiskStoragePriceHr. # noqa: E501 + + + :return: The snapshot_gib_price_hr of this DiskStoragePriceHr. # noqa: E501 + :rtype: Decimal + """ + return self._snapshot_gib_price_hr + + @snapshot_gib_price_hr.setter + def snapshot_gib_price_hr(self, snapshot_gib_price_hr): + """Sets the snapshot_gib_price_hr of this DiskStoragePriceHr. + + + :param snapshot_gib_price_hr: The snapshot_gib_price_hr of this DiskStoragePriceHr. # noqa: E501 + :type: Decimal + """ + + self._snapshot_gib_price_hr = snapshot_gib_price_hr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DiskStoragePriceHr, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DiskStoragePriceHr): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DiskStoragePriceHr): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/disk_type.py b/docs/cudo_compute/models/disk_type.py new file mode 100644 index 0000000..1fdacee --- /dev/null +++ b/docs/cudo_compute/models/disk_type.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class DiskType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "DISK_TYPE_UNKNOWN" + BOOT = "DISK_TYPE_BOOT" + STORAGE = "DISK_TYPE_STORAGE" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """DiskType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DiskType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DiskType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DiskType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/generate_api_key_request.py b/docs/cudo_compute/models/generate_api_key_request.py new file mode 100644 index 0000000..fbc552c --- /dev/null +++ b/docs/cudo_compute/models/generate_api_key_request.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GenerateApiKeyRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'apikey_id': 'str' + } + + attribute_map = { + 'apikey_id': 'apikeyId' + } + + def __init__(self, apikey_id=None, _configuration=None): # noqa: E501 + """GenerateApiKeyRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._apikey_id = None + self.discriminator = None + + self.apikey_id = apikey_id + + @property + def apikey_id(self): + """Gets the apikey_id of this GenerateApiKeyRequest. # noqa: E501 + + The identifier to use for the api key, which will become the final component of the api key's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. # noqa: E501 + + :return: The apikey_id of this GenerateApiKeyRequest. # noqa: E501 + :rtype: str + """ + return self._apikey_id + + @apikey_id.setter + def apikey_id(self, apikey_id): + """Sets the apikey_id of this GenerateApiKeyRequest. + + The identifier to use for the api key, which will become the final component of the api key's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. # noqa: E501 + + :param apikey_id: The apikey_id of this GenerateApiKeyRequest. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and apikey_id is None: + raise ValueError("Invalid value for `apikey_id`, must not be `None`") # noqa: E501 + + self._apikey_id = apikey_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GenerateApiKeyRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GenerateApiKeyRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GenerateApiKeyRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_billing_account_details_response.py b/docs/cudo_compute/models/get_billing_account_details_response.py new file mode 100644 index 0000000..d9f7bcd --- /dev/null +++ b/docs/cudo_compute/models/get_billing_account_details_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetBillingAccountDetailsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'billing_account': 'BillingAccount', + 'stripe_customer': 'StripeCustomer' + } + + attribute_map = { + 'billing_account': 'billingAccount', + 'stripe_customer': 'stripeCustomer' + } + + def __init__(self, billing_account=None, stripe_customer=None, _configuration=None): # noqa: E501 + """GetBillingAccountDetailsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._billing_account = None + self._stripe_customer = None + self.discriminator = None + + self.billing_account = billing_account + self.stripe_customer = stripe_customer + + @property + def billing_account(self): + """Gets the billing_account of this GetBillingAccountDetailsResponse. # noqa: E501 + + + :return: The billing_account of this GetBillingAccountDetailsResponse. # noqa: E501 + :rtype: BillingAccount + """ + return self._billing_account + + @billing_account.setter + def billing_account(self, billing_account): + """Sets the billing_account of this GetBillingAccountDetailsResponse. + + + :param billing_account: The billing_account of this GetBillingAccountDetailsResponse. # noqa: E501 + :type: BillingAccount + """ + if self._configuration.client_side_validation and billing_account is None: + raise ValueError("Invalid value for `billing_account`, must not be `None`") # noqa: E501 + + self._billing_account = billing_account + + @property + def stripe_customer(self): + """Gets the stripe_customer of this GetBillingAccountDetailsResponse. # noqa: E501 + + + :return: The stripe_customer of this GetBillingAccountDetailsResponse. # noqa: E501 + :rtype: StripeCustomer + """ + return self._stripe_customer + + @stripe_customer.setter + def stripe_customer(self, stripe_customer): + """Sets the stripe_customer of this GetBillingAccountDetailsResponse. + + + :param stripe_customer: The stripe_customer of this GetBillingAccountDetailsResponse. # noqa: E501 + :type: StripeCustomer + """ + if self._configuration.client_side_validation and stripe_customer is None: + raise ValueError("Invalid value for `stripe_customer`, must not be `None`") # noqa: E501 + + self._stripe_customer = stripe_customer + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetBillingAccountDetailsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetBillingAccountDetailsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetBillingAccountDetailsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_billing_account_spend_details_response.py b/docs/cudo_compute/models/get_billing_account_spend_details_response.py new file mode 100644 index 0000000..0ba954a --- /dev/null +++ b/docs/cudo_compute/models/get_billing_account_spend_details_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetBillingAccountSpendDetailsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'spend': 'list[BillingAccountSpendRow]' + } + + attribute_map = { + 'spend': 'spend' + } + + def __init__(self, spend=None, _configuration=None): # noqa: E501 + """GetBillingAccountSpendDetailsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._spend = None + self.discriminator = None + + self.spend = spend + + @property + def spend(self): + """Gets the spend of this GetBillingAccountSpendDetailsResponse. # noqa: E501 + + + :return: The spend of this GetBillingAccountSpendDetailsResponse. # noqa: E501 + :rtype: list[BillingAccountSpendRow] + """ + return self._spend + + @spend.setter + def spend(self, spend): + """Sets the spend of this GetBillingAccountSpendDetailsResponse. + + + :param spend: The spend of this GetBillingAccountSpendDetailsResponse. # noqa: E501 + :type: list[BillingAccountSpendRow] + """ + if self._configuration.client_side_validation and spend is None: + raise ValueError("Invalid value for `spend`, must not be `None`") # noqa: E501 + + self._spend = spend + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetBillingAccountSpendDetailsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetBillingAccountSpendDetailsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetBillingAccountSpendDetailsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_data_center_commitment_schedule_response.py b/docs/cudo_compute/models/get_data_center_commitment_schedule_response.py new file mode 100644 index 0000000..6421191 --- /dev/null +++ b/docs/cudo_compute/models/get_data_center_commitment_schedule_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDataCenterCommitmentScheduleResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'commitments': 'list[DataCenterCommitment]' + } + + attribute_map = { + 'commitments': 'commitments' + } + + def __init__(self, commitments=None, _configuration=None): # noqa: E501 + """GetDataCenterCommitmentScheduleResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._commitments = None + self.discriminator = None + + self.commitments = commitments + + @property + def commitments(self): + """Gets the commitments of this GetDataCenterCommitmentScheduleResponse. # noqa: E501 + + + :return: The commitments of this GetDataCenterCommitmentScheduleResponse. # noqa: E501 + :rtype: list[DataCenterCommitment] + """ + return self._commitments + + @commitments.setter + def commitments(self, commitments): + """Sets the commitments of this GetDataCenterCommitmentScheduleResponse. + + + :param commitments: The commitments of this GetDataCenterCommitmentScheduleResponse. # noqa: E501 + :type: list[DataCenterCommitment] + """ + if self._configuration.client_side_validation and commitments is None: + raise ValueError("Invalid value for `commitments`, must not be `None`") # noqa: E501 + + self._commitments = commitments + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDataCenterCommitmentScheduleResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDataCenterCommitmentScheduleResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDataCenterCommitmentScheduleResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_data_center_commitment_time_series_request_interval.py b/docs/cudo_compute/models/get_data_center_commitment_time_series_request_interval.py new file mode 100644 index 0000000..50a53c5 --- /dev/null +++ b/docs/cudo_compute/models/get_data_center_commitment_time_series_request_interval.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDataCenterCommitmentTimeSeriesRequestInterval(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "INTERVAL_UNKNOWN" + DAY = "INTERVAL_DAY" + WEEK = "INTERVAL_WEEK" + MONTH = "INTERVAL_MONTH" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """GetDataCenterCommitmentTimeSeriesRequestInterval - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDataCenterCommitmentTimeSeriesRequestInterval, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDataCenterCommitmentTimeSeriesRequestInterval): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDataCenterCommitmentTimeSeriesRequestInterval): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_data_center_commitment_time_series_response.py b/docs/cudo_compute/models/get_data_center_commitment_time_series_response.py new file mode 100644 index 0000000..ce560bf --- /dev/null +++ b/docs/cudo_compute/models/get_data_center_commitment_time_series_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDataCenterCommitmentTimeSeriesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'list[DataCenterCommitmentInterval]' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None, _configuration=None): # noqa: E501 + """GetDataCenterCommitmentTimeSeriesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this GetDataCenterCommitmentTimeSeriesResponse. # noqa: E501 + + + :return: The data of this GetDataCenterCommitmentTimeSeriesResponse. # noqa: E501 + :rtype: list[DataCenterCommitmentInterval] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this GetDataCenterCommitmentTimeSeriesResponse. + + + :param data: The data of this GetDataCenterCommitmentTimeSeriesResponse. # noqa: E501 + :type: list[DataCenterCommitmentInterval] + """ + if self._configuration.client_side_validation and data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDataCenterCommitmentTimeSeriesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDataCenterCommitmentTimeSeriesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDataCenterCommitmentTimeSeriesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_data_center_live_utilization_response.py b/docs/cudo_compute/models/get_data_center_live_utilization_response.py new file mode 100644 index 0000000..c5de7a7 --- /dev/null +++ b/docs/cudo_compute/models/get_data_center_live_utilization_response.py @@ -0,0 +1,664 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDataCenterLiveUtilizationResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'utilization': 'float', + 'vcpu_used': 'int', + 'vcpu_free': 'int', + 'vcpu_total': 'int', + 'cpu_utilization': 'float', + 'memory_gib_used': 'int', + 'memory_gib_free': 'int', + 'memory_gib_total': 'int', + 'memory_utilization': 'float', + 'gpu_used': 'int', + 'gpu_free': 'int', + 'gpu_total': 'int', + 'gpu_utilization': 'float', + 'ipv4_used': 'int', + 'ipv4_free': 'int', + 'ipv4_total': 'int', + 'ipv4_utilization': 'float', + 'storage_gib_used': 'int', + 'storage_gib_free': 'int', + 'storage_gib_total': 'int', + 'storage_utilization': 'float' + } + + attribute_map = { + 'utilization': 'utilization', + 'vcpu_used': 'vcpuUsed', + 'vcpu_free': 'vcpuFree', + 'vcpu_total': 'vcpuTotal', + 'cpu_utilization': 'cpuUtilization', + 'memory_gib_used': 'memoryGibUsed', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_total': 'memoryGibTotal', + 'memory_utilization': 'memoryUtilization', + 'gpu_used': 'gpuUsed', + 'gpu_free': 'gpuFree', + 'gpu_total': 'gpuTotal', + 'gpu_utilization': 'gpuUtilization', + 'ipv4_used': 'ipv4Used', + 'ipv4_free': 'ipv4Free', + 'ipv4_total': 'ipv4Total', + 'ipv4_utilization': 'ipv4Utilization', + 'storage_gib_used': 'storageGibUsed', + 'storage_gib_free': 'storageGibFree', + 'storage_gib_total': 'storageGibTotal', + 'storage_utilization': 'storageUtilization' + } + + def __init__(self, utilization=None, vcpu_used=None, vcpu_free=None, vcpu_total=None, cpu_utilization=None, memory_gib_used=None, memory_gib_free=None, memory_gib_total=None, memory_utilization=None, gpu_used=None, gpu_free=None, gpu_total=None, gpu_utilization=None, ipv4_used=None, ipv4_free=None, ipv4_total=None, ipv4_utilization=None, storage_gib_used=None, storage_gib_free=None, storage_gib_total=None, storage_utilization=None, _configuration=None): # noqa: E501 + """GetDataCenterLiveUtilizationResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._utilization = None + self._vcpu_used = None + self._vcpu_free = None + self._vcpu_total = None + self._cpu_utilization = None + self._memory_gib_used = None + self._memory_gib_free = None + self._memory_gib_total = None + self._memory_utilization = None + self._gpu_used = None + self._gpu_free = None + self._gpu_total = None + self._gpu_utilization = None + self._ipv4_used = None + self._ipv4_free = None + self._ipv4_total = None + self._ipv4_utilization = None + self._storage_gib_used = None + self._storage_gib_free = None + self._storage_gib_total = None + self._storage_utilization = None + self.discriminator = None + + self.utilization = utilization + self.vcpu_used = vcpu_used + self.vcpu_free = vcpu_free + self.vcpu_total = vcpu_total + self.cpu_utilization = cpu_utilization + self.memory_gib_used = memory_gib_used + self.memory_gib_free = memory_gib_free + self.memory_gib_total = memory_gib_total + self.memory_utilization = memory_utilization + self.gpu_used = gpu_used + self.gpu_free = gpu_free + self.gpu_total = gpu_total + self.gpu_utilization = gpu_utilization + self.ipv4_used = ipv4_used + self.ipv4_free = ipv4_free + self.ipv4_total = ipv4_total + self.ipv4_utilization = ipv4_utilization + self.storage_gib_used = storage_gib_used + self.storage_gib_free = storage_gib_free + self.storage_gib_total = storage_gib_total + self.storage_utilization = storage_utilization + + @property + def utilization(self): + """Gets the utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._utilization + + @utilization.setter + def utilization(self, utilization): + """Sets the utilization of this GetDataCenterLiveUtilizationResponse. + + + :param utilization: The utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and utilization is None: + raise ValueError("Invalid value for `utilization`, must not be `None`") # noqa: E501 + + self._utilization = utilization + + @property + def vcpu_used(self): + """Gets the vcpu_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The vcpu_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._vcpu_used + + @vcpu_used.setter + def vcpu_used(self, vcpu_used): + """Sets the vcpu_used of this GetDataCenterLiveUtilizationResponse. + + + :param vcpu_used: The vcpu_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_used is None: + raise ValueError("Invalid value for `vcpu_used`, must not be `None`") # noqa: E501 + + self._vcpu_used = vcpu_used + + @property + def vcpu_free(self): + """Gets the vcpu_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The vcpu_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._vcpu_free + + @vcpu_free.setter + def vcpu_free(self, vcpu_free): + """Sets the vcpu_free of this GetDataCenterLiveUtilizationResponse. + + + :param vcpu_free: The vcpu_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_free is None: + raise ValueError("Invalid value for `vcpu_free`, must not be `None`") # noqa: E501 + + self._vcpu_free = vcpu_free + + @property + def vcpu_total(self): + """Gets the vcpu_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The vcpu_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._vcpu_total + + @vcpu_total.setter + def vcpu_total(self, vcpu_total): + """Sets the vcpu_total of this GetDataCenterLiveUtilizationResponse. + + + :param vcpu_total: The vcpu_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_total is None: + raise ValueError("Invalid value for `vcpu_total`, must not be `None`") # noqa: E501 + + self._vcpu_total = vcpu_total + + @property + def cpu_utilization(self): + """Gets the cpu_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The cpu_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._cpu_utilization + + @cpu_utilization.setter + def cpu_utilization(self, cpu_utilization): + """Sets the cpu_utilization of this GetDataCenterLiveUtilizationResponse. + + + :param cpu_utilization: The cpu_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and cpu_utilization is None: + raise ValueError("Invalid value for `cpu_utilization`, must not be `None`") # noqa: E501 + + self._cpu_utilization = cpu_utilization + + @property + def memory_gib_used(self): + """Gets the memory_gib_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_gib_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._memory_gib_used + + @memory_gib_used.setter + def memory_gib_used(self, memory_gib_used): + """Sets the memory_gib_used of this GetDataCenterLiveUtilizationResponse. + + + :param memory_gib_used: The memory_gib_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_used is None: + raise ValueError("Invalid value for `memory_gib_used`, must not be `None`") # noqa: E501 + + self._memory_gib_used = memory_gib_used + + @property + def memory_gib_free(self): + """Gets the memory_gib_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_gib_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._memory_gib_free + + @memory_gib_free.setter + def memory_gib_free(self, memory_gib_free): + """Sets the memory_gib_free of this GetDataCenterLiveUtilizationResponse. + + + :param memory_gib_free: The memory_gib_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_free is None: + raise ValueError("Invalid value for `memory_gib_free`, must not be `None`") # noqa: E501 + + self._memory_gib_free = memory_gib_free + + @property + def memory_gib_total(self): + """Gets the memory_gib_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_gib_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._memory_gib_total + + @memory_gib_total.setter + def memory_gib_total(self, memory_gib_total): + """Sets the memory_gib_total of this GetDataCenterLiveUtilizationResponse. + + + :param memory_gib_total: The memory_gib_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_total is None: + raise ValueError("Invalid value for `memory_gib_total`, must not be `None`") # noqa: E501 + + self._memory_gib_total = memory_gib_total + + @property + def memory_utilization(self): + """Gets the memory_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._memory_utilization + + @memory_utilization.setter + def memory_utilization(self, memory_utilization): + """Sets the memory_utilization of this GetDataCenterLiveUtilizationResponse. + + + :param memory_utilization: The memory_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and memory_utilization is None: + raise ValueError("Invalid value for `memory_utilization`, must not be `None`") # noqa: E501 + + self._memory_utilization = memory_utilization + + @property + def gpu_used(self): + """Gets the gpu_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._gpu_used + + @gpu_used.setter + def gpu_used(self, gpu_used): + """Sets the gpu_used of this GetDataCenterLiveUtilizationResponse. + + + :param gpu_used: The gpu_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_used is None: + raise ValueError("Invalid value for `gpu_used`, must not be `None`") # noqa: E501 + + self._gpu_used = gpu_used + + @property + def gpu_free(self): + """Gets the gpu_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._gpu_free + + @gpu_free.setter + def gpu_free(self, gpu_free): + """Sets the gpu_free of this GetDataCenterLiveUtilizationResponse. + + + :param gpu_free: The gpu_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_free is None: + raise ValueError("Invalid value for `gpu_free`, must not be `None`") # noqa: E501 + + self._gpu_free = gpu_free + + @property + def gpu_total(self): + """Gets the gpu_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._gpu_total + + @gpu_total.setter + def gpu_total(self, gpu_total): + """Sets the gpu_total of this GetDataCenterLiveUtilizationResponse. + + + :param gpu_total: The gpu_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_total is None: + raise ValueError("Invalid value for `gpu_total`, must not be `None`") # noqa: E501 + + self._gpu_total = gpu_total + + @property + def gpu_utilization(self): + """Gets the gpu_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._gpu_utilization + + @gpu_utilization.setter + def gpu_utilization(self, gpu_utilization): + """Sets the gpu_utilization of this GetDataCenterLiveUtilizationResponse. + + + :param gpu_utilization: The gpu_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and gpu_utilization is None: + raise ValueError("Invalid value for `gpu_utilization`, must not be `None`") # noqa: E501 + + self._gpu_utilization = gpu_utilization + + @property + def ipv4_used(self): + """Gets the ipv4_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The ipv4_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._ipv4_used + + @ipv4_used.setter + def ipv4_used(self, ipv4_used): + """Sets the ipv4_used of this GetDataCenterLiveUtilizationResponse. + + + :param ipv4_used: The ipv4_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and ipv4_used is None: + raise ValueError("Invalid value for `ipv4_used`, must not be `None`") # noqa: E501 + + self._ipv4_used = ipv4_used + + @property + def ipv4_free(self): + """Gets the ipv4_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The ipv4_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._ipv4_free + + @ipv4_free.setter + def ipv4_free(self, ipv4_free): + """Sets the ipv4_free of this GetDataCenterLiveUtilizationResponse. + + + :param ipv4_free: The ipv4_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and ipv4_free is None: + raise ValueError("Invalid value for `ipv4_free`, must not be `None`") # noqa: E501 + + self._ipv4_free = ipv4_free + + @property + def ipv4_total(self): + """Gets the ipv4_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The ipv4_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._ipv4_total + + @ipv4_total.setter + def ipv4_total(self, ipv4_total): + """Sets the ipv4_total of this GetDataCenterLiveUtilizationResponse. + + + :param ipv4_total: The ipv4_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and ipv4_total is None: + raise ValueError("Invalid value for `ipv4_total`, must not be `None`") # noqa: E501 + + self._ipv4_total = ipv4_total + + @property + def ipv4_utilization(self): + """Gets the ipv4_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The ipv4_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._ipv4_utilization + + @ipv4_utilization.setter + def ipv4_utilization(self, ipv4_utilization): + """Sets the ipv4_utilization of this GetDataCenterLiveUtilizationResponse. + + + :param ipv4_utilization: The ipv4_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and ipv4_utilization is None: + raise ValueError("Invalid value for `ipv4_utilization`, must not be `None`") # noqa: E501 + + self._ipv4_utilization = ipv4_utilization + + @property + def storage_gib_used(self): + """Gets the storage_gib_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The storage_gib_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._storage_gib_used + + @storage_gib_used.setter + def storage_gib_used(self, storage_gib_used): + """Sets the storage_gib_used of this GetDataCenterLiveUtilizationResponse. + + + :param storage_gib_used: The storage_gib_used of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and storage_gib_used is None: + raise ValueError("Invalid value for `storage_gib_used`, must not be `None`") # noqa: E501 + + self._storage_gib_used = storage_gib_used + + @property + def storage_gib_free(self): + """Gets the storage_gib_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The storage_gib_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._storage_gib_free + + @storage_gib_free.setter + def storage_gib_free(self, storage_gib_free): + """Sets the storage_gib_free of this GetDataCenterLiveUtilizationResponse. + + + :param storage_gib_free: The storage_gib_free of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and storage_gib_free is None: + raise ValueError("Invalid value for `storage_gib_free`, must not be `None`") # noqa: E501 + + self._storage_gib_free = storage_gib_free + + @property + def storage_gib_total(self): + """Gets the storage_gib_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The storage_gib_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._storage_gib_total + + @storage_gib_total.setter + def storage_gib_total(self, storage_gib_total): + """Sets the storage_gib_total of this GetDataCenterLiveUtilizationResponse. + + + :param storage_gib_total: The storage_gib_total of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and storage_gib_total is None: + raise ValueError("Invalid value for `storage_gib_total`, must not be `None`") # noqa: E501 + + self._storage_gib_total = storage_gib_total + + @property + def storage_utilization(self): + """Gets the storage_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + + + :return: The storage_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._storage_utilization + + @storage_utilization.setter + def storage_utilization(self, storage_utilization): + """Sets the storage_utilization of this GetDataCenterLiveUtilizationResponse. + + + :param storage_utilization: The storage_utilization of this GetDataCenterLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and storage_utilization is None: + raise ValueError("Invalid value for `storage_utilization`, must not be `None`") # noqa: E501 + + self._storage_utilization = storage_utilization + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDataCenterLiveUtilizationResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDataCenterLiveUtilizationResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDataCenterLiveUtilizationResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_data_center_revenue_by_resource_response.py b/docs/cudo_compute/models/get_data_center_revenue_by_resource_response.py new file mode 100644 index 0000000..49c19cc --- /dev/null +++ b/docs/cudo_compute/models/get_data_center_revenue_by_resource_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDataCenterRevenueByResourceResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resources': 'list[DataCenterRevenueResource]' + } + + attribute_map = { + 'resources': 'resources' + } + + def __init__(self, resources=None, _configuration=None): # noqa: E501 + """GetDataCenterRevenueByResourceResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._resources = None + self.discriminator = None + + self.resources = resources + + @property + def resources(self): + """Gets the resources of this GetDataCenterRevenueByResourceResponse. # noqa: E501 + + + :return: The resources of this GetDataCenterRevenueByResourceResponse. # noqa: E501 + :rtype: list[DataCenterRevenueResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this GetDataCenterRevenueByResourceResponse. + + + :param resources: The resources of this GetDataCenterRevenueByResourceResponse. # noqa: E501 + :type: list[DataCenterRevenueResource] + """ + if self._configuration.client_side_validation and resources is None: + raise ValueError("Invalid value for `resources`, must not be `None`") # noqa: E501 + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDataCenterRevenueByResourceResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDataCenterRevenueByResourceResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDataCenterRevenueByResourceResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_data_center_revenue_time_series_request_interval.py b/docs/cudo_compute/models/get_data_center_revenue_time_series_request_interval.py new file mode 100644 index 0000000..cc3e2d6 --- /dev/null +++ b/docs/cudo_compute/models/get_data_center_revenue_time_series_request_interval.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDataCenterRevenueTimeSeriesRequestInterval(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "INTERVAL_UNKNOWN" + DAY = "INTERVAL_DAY" + WEEK = "INTERVAL_WEEK" + MONTH = "INTERVAL_MONTH" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """GetDataCenterRevenueTimeSeriesRequestInterval - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDataCenterRevenueTimeSeriesRequestInterval, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDataCenterRevenueTimeSeriesRequestInterval): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDataCenterRevenueTimeSeriesRequestInterval): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_data_center_revenue_time_series_response.py b/docs/cudo_compute/models/get_data_center_revenue_time_series_response.py new file mode 100644 index 0000000..a9dca0d --- /dev/null +++ b/docs/cudo_compute/models/get_data_center_revenue_time_series_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDataCenterRevenueTimeSeriesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'time_revenue': 'list[DataCenterTimeRevenue]' + } + + attribute_map = { + 'time_revenue': 'timeRevenue' + } + + def __init__(self, time_revenue=None, _configuration=None): # noqa: E501 + """GetDataCenterRevenueTimeSeriesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._time_revenue = None + self.discriminator = None + + self.time_revenue = time_revenue + + @property + def time_revenue(self): + """Gets the time_revenue of this GetDataCenterRevenueTimeSeriesResponse. # noqa: E501 + + + :return: The time_revenue of this GetDataCenterRevenueTimeSeriesResponse. # noqa: E501 + :rtype: list[DataCenterTimeRevenue] + """ + return self._time_revenue + + @time_revenue.setter + def time_revenue(self, time_revenue): + """Sets the time_revenue of this GetDataCenterRevenueTimeSeriesResponse. + + + :param time_revenue: The time_revenue of this GetDataCenterRevenueTimeSeriesResponse. # noqa: E501 + :type: list[DataCenterTimeRevenue] + """ + if self._configuration.client_side_validation and time_revenue is None: + raise ValueError("Invalid value for `time_revenue`, must not be `None`") # noqa: E501 + + self._time_revenue = time_revenue + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDataCenterRevenueTimeSeriesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDataCenterRevenueTimeSeriesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDataCenterRevenueTimeSeriesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_disk_response.py b/docs/cudo_compute/models/get_disk_response.py new file mode 100644 index 0000000..ed6339a --- /dev/null +++ b/docs/cudo_compute/models/get_disk_response.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetDiskResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'disk': 'Disk', + 'snapshots': 'list[Snapshot]' + } + + attribute_map = { + 'disk': 'disk', + 'snapshots': 'snapshots' + } + + def __init__(self, disk=None, snapshots=None, _configuration=None): # noqa: E501 + """GetDiskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._disk = None + self._snapshots = None + self.discriminator = None + + if disk is not None: + self.disk = disk + if snapshots is not None: + self.snapshots = snapshots + + @property + def disk(self): + """Gets the disk of this GetDiskResponse. # noqa: E501 + + + :return: The disk of this GetDiskResponse. # noqa: E501 + :rtype: Disk + """ + return self._disk + + @disk.setter + def disk(self, disk): + """Sets the disk of this GetDiskResponse. + + + :param disk: The disk of this GetDiskResponse. # noqa: E501 + :type: Disk + """ + + self._disk = disk + + @property + def snapshots(self): + """Gets the snapshots of this GetDiskResponse. # noqa: E501 + + + :return: The snapshots of this GetDiskResponse. # noqa: E501 + :rtype: list[Snapshot] + """ + return self._snapshots + + @snapshots.setter + def snapshots(self, snapshots): + """Sets the snapshots of this GetDiskResponse. + + + :param snapshots: The snapshots of this GetDiskResponse. # noqa: E501 + :type: list[Snapshot] + """ + + self._snapshots = snapshots + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetDiskResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetDiskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetDiskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_machine_type_live_utilization_response.py b/docs/cudo_compute/models/get_machine_type_live_utilization_response.py new file mode 100644 index 0000000..4ceaffd --- /dev/null +++ b/docs/cudo_compute/models/get_machine_type_live_utilization_response.py @@ -0,0 +1,448 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetMachineTypeLiveUtilizationResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'utilization': 'float', + 'vcpu_used': 'int', + 'vcpu_free': 'int', + 'vcpu_total': 'int', + 'cpu_utilization': 'float', + 'memory_gib_used': 'int', + 'memory_gib_free': 'int', + 'memory_gib_total': 'int', + 'memory_utilization': 'float', + 'gpu_used': 'int', + 'gpu_free': 'int', + 'gpu_total': 'int', + 'gpu_utilization': 'float' + } + + attribute_map = { + 'utilization': 'utilization', + 'vcpu_used': 'vcpuUsed', + 'vcpu_free': 'vcpuFree', + 'vcpu_total': 'vcpuTotal', + 'cpu_utilization': 'cpuUtilization', + 'memory_gib_used': 'memoryGibUsed', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_total': 'memoryGibTotal', + 'memory_utilization': 'memoryUtilization', + 'gpu_used': 'gpuUsed', + 'gpu_free': 'gpuFree', + 'gpu_total': 'gpuTotal', + 'gpu_utilization': 'gpuUtilization' + } + + def __init__(self, utilization=None, vcpu_used=None, vcpu_free=None, vcpu_total=None, cpu_utilization=None, memory_gib_used=None, memory_gib_free=None, memory_gib_total=None, memory_utilization=None, gpu_used=None, gpu_free=None, gpu_total=None, gpu_utilization=None, _configuration=None): # noqa: E501 + """GetMachineTypeLiveUtilizationResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._utilization = None + self._vcpu_used = None + self._vcpu_free = None + self._vcpu_total = None + self._cpu_utilization = None + self._memory_gib_used = None + self._memory_gib_free = None + self._memory_gib_total = None + self._memory_utilization = None + self._gpu_used = None + self._gpu_free = None + self._gpu_total = None + self._gpu_utilization = None + self.discriminator = None + + self.utilization = utilization + self.vcpu_used = vcpu_used + self.vcpu_free = vcpu_free + self.vcpu_total = vcpu_total + self.cpu_utilization = cpu_utilization + self.memory_gib_used = memory_gib_used + self.memory_gib_free = memory_gib_free + self.memory_gib_total = memory_gib_total + self.memory_utilization = memory_utilization + self.gpu_used = gpu_used + self.gpu_free = gpu_free + self.gpu_total = gpu_total + self.gpu_utilization = gpu_utilization + + @property + def utilization(self): + """Gets the utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._utilization + + @utilization.setter + def utilization(self, utilization): + """Sets the utilization of this GetMachineTypeLiveUtilizationResponse. + + + :param utilization: The utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and utilization is None: + raise ValueError("Invalid value for `utilization`, must not be `None`") # noqa: E501 + + self._utilization = utilization + + @property + def vcpu_used(self): + """Gets the vcpu_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The vcpu_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._vcpu_used + + @vcpu_used.setter + def vcpu_used(self, vcpu_used): + """Sets the vcpu_used of this GetMachineTypeLiveUtilizationResponse. + + + :param vcpu_used: The vcpu_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_used is None: + raise ValueError("Invalid value for `vcpu_used`, must not be `None`") # noqa: E501 + + self._vcpu_used = vcpu_used + + @property + def vcpu_free(self): + """Gets the vcpu_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The vcpu_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._vcpu_free + + @vcpu_free.setter + def vcpu_free(self, vcpu_free): + """Sets the vcpu_free of this GetMachineTypeLiveUtilizationResponse. + + + :param vcpu_free: The vcpu_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_free is None: + raise ValueError("Invalid value for `vcpu_free`, must not be `None`") # noqa: E501 + + self._vcpu_free = vcpu_free + + @property + def vcpu_total(self): + """Gets the vcpu_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The vcpu_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._vcpu_total + + @vcpu_total.setter + def vcpu_total(self, vcpu_total): + """Sets the vcpu_total of this GetMachineTypeLiveUtilizationResponse. + + + :param vcpu_total: The vcpu_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_total is None: + raise ValueError("Invalid value for `vcpu_total`, must not be `None`") # noqa: E501 + + self._vcpu_total = vcpu_total + + @property + def cpu_utilization(self): + """Gets the cpu_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The cpu_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._cpu_utilization + + @cpu_utilization.setter + def cpu_utilization(self, cpu_utilization): + """Sets the cpu_utilization of this GetMachineTypeLiveUtilizationResponse. + + + :param cpu_utilization: The cpu_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and cpu_utilization is None: + raise ValueError("Invalid value for `cpu_utilization`, must not be `None`") # noqa: E501 + + self._cpu_utilization = cpu_utilization + + @property + def memory_gib_used(self): + """Gets the memory_gib_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_gib_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._memory_gib_used + + @memory_gib_used.setter + def memory_gib_used(self, memory_gib_used): + """Sets the memory_gib_used of this GetMachineTypeLiveUtilizationResponse. + + + :param memory_gib_used: The memory_gib_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_used is None: + raise ValueError("Invalid value for `memory_gib_used`, must not be `None`") # noqa: E501 + + self._memory_gib_used = memory_gib_used + + @property + def memory_gib_free(self): + """Gets the memory_gib_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_gib_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._memory_gib_free + + @memory_gib_free.setter + def memory_gib_free(self, memory_gib_free): + """Sets the memory_gib_free of this GetMachineTypeLiveUtilizationResponse. + + + :param memory_gib_free: The memory_gib_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_free is None: + raise ValueError("Invalid value for `memory_gib_free`, must not be `None`") # noqa: E501 + + self._memory_gib_free = memory_gib_free + + @property + def memory_gib_total(self): + """Gets the memory_gib_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_gib_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._memory_gib_total + + @memory_gib_total.setter + def memory_gib_total(self, memory_gib_total): + """Sets the memory_gib_total of this GetMachineTypeLiveUtilizationResponse. + + + :param memory_gib_total: The memory_gib_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_total is None: + raise ValueError("Invalid value for `memory_gib_total`, must not be `None`") # noqa: E501 + + self._memory_gib_total = memory_gib_total + + @property + def memory_utilization(self): + """Gets the memory_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The memory_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._memory_utilization + + @memory_utilization.setter + def memory_utilization(self, memory_utilization): + """Sets the memory_utilization of this GetMachineTypeLiveUtilizationResponse. + + + :param memory_utilization: The memory_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and memory_utilization is None: + raise ValueError("Invalid value for `memory_utilization`, must not be `None`") # noqa: E501 + + self._memory_utilization = memory_utilization + + @property + def gpu_used(self): + """Gets the gpu_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._gpu_used + + @gpu_used.setter + def gpu_used(self, gpu_used): + """Sets the gpu_used of this GetMachineTypeLiveUtilizationResponse. + + + :param gpu_used: The gpu_used of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_used is None: + raise ValueError("Invalid value for `gpu_used`, must not be `None`") # noqa: E501 + + self._gpu_used = gpu_used + + @property + def gpu_free(self): + """Gets the gpu_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._gpu_free + + @gpu_free.setter + def gpu_free(self, gpu_free): + """Sets the gpu_free of this GetMachineTypeLiveUtilizationResponse. + + + :param gpu_free: The gpu_free of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_free is None: + raise ValueError("Invalid value for `gpu_free`, must not be `None`") # noqa: E501 + + self._gpu_free = gpu_free + + @property + def gpu_total(self): + """Gets the gpu_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: int + """ + return self._gpu_total + + @gpu_total.setter + def gpu_total(self, gpu_total): + """Sets the gpu_total of this GetMachineTypeLiveUtilizationResponse. + + + :param gpu_total: The gpu_total of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_total is None: + raise ValueError("Invalid value for `gpu_total`, must not be `None`") # noqa: E501 + + self._gpu_total = gpu_total + + @property + def gpu_utilization(self): + """Gets the gpu_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + + + :return: The gpu_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :rtype: float + """ + return self._gpu_utilization + + @gpu_utilization.setter + def gpu_utilization(self, gpu_utilization): + """Sets the gpu_utilization of this GetMachineTypeLiveUtilizationResponse. + + + :param gpu_utilization: The gpu_utilization of this GetMachineTypeLiveUtilizationResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and gpu_utilization is None: + raise ValueError("Invalid value for `gpu_utilization`, must not be `None`") # noqa: E501 + + self._gpu_utilization = gpu_utilization + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetMachineTypeLiveUtilizationResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetMachineTypeLiveUtilizationResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetMachineTypeLiveUtilizationResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_machine_type_response.py b/docs/cudo_compute/models/get_machine_type_response.py new file mode 100644 index 0000000..a0fb0d3 --- /dev/null +++ b/docs/cudo_compute/models/get_machine_type_response.py @@ -0,0 +1,637 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetMachineTypeResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'machine_type': 'str', + 'cpu_models': 'list[str]', + 'gpu_models': 'list[str]', + 'min_vcpu_price_hr': 'Decimal', + 'max_vcpu_price_hr': 'Decimal', + 'min_memory_gib_price_hr': 'Decimal', + 'max_memory_gib_price_hr': 'Decimal', + 'min_gpu_price_hr': 'Decimal', + 'max_gpu_price_hr': 'Decimal', + 'min_vcpu_per_memory_gib': 'float', + 'max_vcpu_per_memory_gib': 'float', + 'min_vcpu_per_gpu': 'float', + 'max_vcpu_per_gpu': 'float', + 'count_clusters': 'int', + 'count_hosts': 'int', + 'count_hosts_active': 'int', + 'count_hosts_inactive': 'int', + 'min_vcpu': 'float', + 'min_memory_gib': 'float' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'machine_type': 'machineType', + 'cpu_models': 'cpuModels', + 'gpu_models': 'gpuModels', + 'min_vcpu_price_hr': 'minVcpuPriceHr', + 'max_vcpu_price_hr': 'maxVcpuPriceHr', + 'min_memory_gib_price_hr': 'minMemoryGibPriceHr', + 'max_memory_gib_price_hr': 'maxMemoryGibPriceHr', + 'min_gpu_price_hr': 'minGpuPriceHr', + 'max_gpu_price_hr': 'maxGpuPriceHr', + 'min_vcpu_per_memory_gib': 'minVcpuPerMemoryGib', + 'max_vcpu_per_memory_gib': 'maxVcpuPerMemoryGib', + 'min_vcpu_per_gpu': 'minVcpuPerGpu', + 'max_vcpu_per_gpu': 'maxVcpuPerGpu', + 'count_clusters': 'countClusters', + 'count_hosts': 'countHosts', + 'count_hosts_active': 'countHostsActive', + 'count_hosts_inactive': 'countHostsInactive', + 'min_vcpu': 'minVcpu', + 'min_memory_gib': 'minMemoryGib' + } + + def __init__(self, data_center_id=None, machine_type=None, cpu_models=None, gpu_models=None, min_vcpu_price_hr=None, max_vcpu_price_hr=None, min_memory_gib_price_hr=None, max_memory_gib_price_hr=None, min_gpu_price_hr=None, max_gpu_price_hr=None, min_vcpu_per_memory_gib=None, max_vcpu_per_memory_gib=None, min_vcpu_per_gpu=None, max_vcpu_per_gpu=None, count_clusters=None, count_hosts=None, count_hosts_active=None, count_hosts_inactive=None, min_vcpu=None, min_memory_gib=None, _configuration=None): # noqa: E501 + """GetMachineTypeResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._machine_type = None + self._cpu_models = None + self._gpu_models = None + self._min_vcpu_price_hr = None + self._max_vcpu_price_hr = None + self._min_memory_gib_price_hr = None + self._max_memory_gib_price_hr = None + self._min_gpu_price_hr = None + self._max_gpu_price_hr = None + self._min_vcpu_per_memory_gib = None + self._max_vcpu_per_memory_gib = None + self._min_vcpu_per_gpu = None + self._max_vcpu_per_gpu = None + self._count_clusters = None + self._count_hosts = None + self._count_hosts_active = None + self._count_hosts_inactive = None + self._min_vcpu = None + self._min_memory_gib = None + self.discriminator = None + + self.data_center_id = data_center_id + self.machine_type = machine_type + self.cpu_models = cpu_models + self.gpu_models = gpu_models + self.min_vcpu_price_hr = min_vcpu_price_hr + self.max_vcpu_price_hr = max_vcpu_price_hr + self.min_memory_gib_price_hr = min_memory_gib_price_hr + self.max_memory_gib_price_hr = max_memory_gib_price_hr + self.min_gpu_price_hr = min_gpu_price_hr + self.max_gpu_price_hr = max_gpu_price_hr + self.min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + self.max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + self.min_vcpu_per_gpu = min_vcpu_per_gpu + self.max_vcpu_per_gpu = max_vcpu_per_gpu + self.count_clusters = count_clusters + self.count_hosts = count_hosts + self.count_hosts_active = count_hosts_active + self.count_hosts_inactive = count_hosts_inactive + self.min_vcpu = min_vcpu + self.min_memory_gib = min_memory_gib + + @property + def data_center_id(self): + """Gets the data_center_id of this GetMachineTypeResponse. # noqa: E501 + + + :return: The data_center_id of this GetMachineTypeResponse. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this GetMachineTypeResponse. + + + :param data_center_id: The data_center_id of this GetMachineTypeResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def machine_type(self): + """Gets the machine_type of this GetMachineTypeResponse. # noqa: E501 + + + :return: The machine_type of this GetMachineTypeResponse. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this GetMachineTypeResponse. + + + :param machine_type: The machine_type of this GetMachineTypeResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def cpu_models(self): + """Gets the cpu_models of this GetMachineTypeResponse. # noqa: E501 + + + :return: The cpu_models of this GetMachineTypeResponse. # noqa: E501 + :rtype: list[str] + """ + return self._cpu_models + + @cpu_models.setter + def cpu_models(self, cpu_models): + """Sets the cpu_models of this GetMachineTypeResponse. + + + :param cpu_models: The cpu_models of this GetMachineTypeResponse. # noqa: E501 + :type: list[str] + """ + if self._configuration.client_side_validation and cpu_models is None: + raise ValueError("Invalid value for `cpu_models`, must not be `None`") # noqa: E501 + + self._cpu_models = cpu_models + + @property + def gpu_models(self): + """Gets the gpu_models of this GetMachineTypeResponse. # noqa: E501 + + + :return: The gpu_models of this GetMachineTypeResponse. # noqa: E501 + :rtype: list[str] + """ + return self._gpu_models + + @gpu_models.setter + def gpu_models(self, gpu_models): + """Sets the gpu_models of this GetMachineTypeResponse. + + + :param gpu_models: The gpu_models of this GetMachineTypeResponse. # noqa: E501 + :type: list[str] + """ + if self._configuration.client_side_validation and gpu_models is None: + raise ValueError("Invalid value for `gpu_models`, must not be `None`") # noqa: E501 + + self._gpu_models = gpu_models + + @property + def min_vcpu_price_hr(self): + """Gets the min_vcpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + + + :return: The min_vcpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :rtype: Decimal + """ + return self._min_vcpu_price_hr + + @min_vcpu_price_hr.setter + def min_vcpu_price_hr(self, min_vcpu_price_hr): + """Sets the min_vcpu_price_hr of this GetMachineTypeResponse. + + + :param min_vcpu_price_hr: The min_vcpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and min_vcpu_price_hr is None: + raise ValueError("Invalid value for `min_vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._min_vcpu_price_hr = min_vcpu_price_hr + + @property + def max_vcpu_price_hr(self): + """Gets the max_vcpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + + + :return: The max_vcpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :rtype: Decimal + """ + return self._max_vcpu_price_hr + + @max_vcpu_price_hr.setter + def max_vcpu_price_hr(self, max_vcpu_price_hr): + """Sets the max_vcpu_price_hr of this GetMachineTypeResponse. + + + :param max_vcpu_price_hr: The max_vcpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and max_vcpu_price_hr is None: + raise ValueError("Invalid value for `max_vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._max_vcpu_price_hr = max_vcpu_price_hr + + @property + def min_memory_gib_price_hr(self): + """Gets the min_memory_gib_price_hr of this GetMachineTypeResponse. # noqa: E501 + + + :return: The min_memory_gib_price_hr of this GetMachineTypeResponse. # noqa: E501 + :rtype: Decimal + """ + return self._min_memory_gib_price_hr + + @min_memory_gib_price_hr.setter + def min_memory_gib_price_hr(self, min_memory_gib_price_hr): + """Sets the min_memory_gib_price_hr of this GetMachineTypeResponse. + + + :param min_memory_gib_price_hr: The min_memory_gib_price_hr of this GetMachineTypeResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and min_memory_gib_price_hr is None: + raise ValueError("Invalid value for `min_memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._min_memory_gib_price_hr = min_memory_gib_price_hr + + @property + def max_memory_gib_price_hr(self): + """Gets the max_memory_gib_price_hr of this GetMachineTypeResponse. # noqa: E501 + + + :return: The max_memory_gib_price_hr of this GetMachineTypeResponse. # noqa: E501 + :rtype: Decimal + """ + return self._max_memory_gib_price_hr + + @max_memory_gib_price_hr.setter + def max_memory_gib_price_hr(self, max_memory_gib_price_hr): + """Sets the max_memory_gib_price_hr of this GetMachineTypeResponse. + + + :param max_memory_gib_price_hr: The max_memory_gib_price_hr of this GetMachineTypeResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and max_memory_gib_price_hr is None: + raise ValueError("Invalid value for `max_memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._max_memory_gib_price_hr = max_memory_gib_price_hr + + @property + def min_gpu_price_hr(self): + """Gets the min_gpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + + + :return: The min_gpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :rtype: Decimal + """ + return self._min_gpu_price_hr + + @min_gpu_price_hr.setter + def min_gpu_price_hr(self, min_gpu_price_hr): + """Sets the min_gpu_price_hr of this GetMachineTypeResponse. + + + :param min_gpu_price_hr: The min_gpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and min_gpu_price_hr is None: + raise ValueError("Invalid value for `min_gpu_price_hr`, must not be `None`") # noqa: E501 + + self._min_gpu_price_hr = min_gpu_price_hr + + @property + def max_gpu_price_hr(self): + """Gets the max_gpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + + + :return: The max_gpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :rtype: Decimal + """ + return self._max_gpu_price_hr + + @max_gpu_price_hr.setter + def max_gpu_price_hr(self, max_gpu_price_hr): + """Sets the max_gpu_price_hr of this GetMachineTypeResponse. + + + :param max_gpu_price_hr: The max_gpu_price_hr of this GetMachineTypeResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and max_gpu_price_hr is None: + raise ValueError("Invalid value for `max_gpu_price_hr`, must not be `None`") # noqa: E501 + + self._max_gpu_price_hr = max_gpu_price_hr + + @property + def min_vcpu_per_memory_gib(self): + """Gets the min_vcpu_per_memory_gib of this GetMachineTypeResponse. # noqa: E501 + + + :return: The min_vcpu_per_memory_gib of this GetMachineTypeResponse. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_memory_gib + + @min_vcpu_per_memory_gib.setter + def min_vcpu_per_memory_gib(self, min_vcpu_per_memory_gib): + """Sets the min_vcpu_per_memory_gib of this GetMachineTypeResponse. + + + :param min_vcpu_per_memory_gib: The min_vcpu_per_memory_gib of this GetMachineTypeResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `min_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + + @property + def max_vcpu_per_memory_gib(self): + """Gets the max_vcpu_per_memory_gib of this GetMachineTypeResponse. # noqa: E501 + + + :return: The max_vcpu_per_memory_gib of this GetMachineTypeResponse. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_memory_gib + + @max_vcpu_per_memory_gib.setter + def max_vcpu_per_memory_gib(self, max_vcpu_per_memory_gib): + """Sets the max_vcpu_per_memory_gib of this GetMachineTypeResponse. + + + :param max_vcpu_per_memory_gib: The max_vcpu_per_memory_gib of this GetMachineTypeResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `max_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + + @property + def min_vcpu_per_gpu(self): + """Gets the min_vcpu_per_gpu of this GetMachineTypeResponse. # noqa: E501 + + + :return: The min_vcpu_per_gpu of this GetMachineTypeResponse. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_gpu + + @min_vcpu_per_gpu.setter + def min_vcpu_per_gpu(self, min_vcpu_per_gpu): + """Sets the min_vcpu_per_gpu of this GetMachineTypeResponse. + + + :param min_vcpu_per_gpu: The min_vcpu_per_gpu of this GetMachineTypeResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_gpu is None: + raise ValueError("Invalid value for `min_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_gpu = min_vcpu_per_gpu + + @property + def max_vcpu_per_gpu(self): + """Gets the max_vcpu_per_gpu of this GetMachineTypeResponse. # noqa: E501 + + + :return: The max_vcpu_per_gpu of this GetMachineTypeResponse. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_gpu + + @max_vcpu_per_gpu.setter + def max_vcpu_per_gpu(self, max_vcpu_per_gpu): + """Sets the max_vcpu_per_gpu of this GetMachineTypeResponse. + + + :param max_vcpu_per_gpu: The max_vcpu_per_gpu of this GetMachineTypeResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_gpu is None: + raise ValueError("Invalid value for `max_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_gpu = max_vcpu_per_gpu + + @property + def count_clusters(self): + """Gets the count_clusters of this GetMachineTypeResponse. # noqa: E501 + + + :return: The count_clusters of this GetMachineTypeResponse. # noqa: E501 + :rtype: int + """ + return self._count_clusters + + @count_clusters.setter + def count_clusters(self, count_clusters): + """Sets the count_clusters of this GetMachineTypeResponse. + + + :param count_clusters: The count_clusters of this GetMachineTypeResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_clusters is None: + raise ValueError("Invalid value for `count_clusters`, must not be `None`") # noqa: E501 + + self._count_clusters = count_clusters + + @property + def count_hosts(self): + """Gets the count_hosts of this GetMachineTypeResponse. # noqa: E501 + + + :return: The count_hosts of this GetMachineTypeResponse. # noqa: E501 + :rtype: int + """ + return self._count_hosts + + @count_hosts.setter + def count_hosts(self, count_hosts): + """Sets the count_hosts of this GetMachineTypeResponse. + + + :param count_hosts: The count_hosts of this GetMachineTypeResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_hosts is None: + raise ValueError("Invalid value for `count_hosts`, must not be `None`") # noqa: E501 + + self._count_hosts = count_hosts + + @property + def count_hosts_active(self): + """Gets the count_hosts_active of this GetMachineTypeResponse. # noqa: E501 + + + :return: The count_hosts_active of this GetMachineTypeResponse. # noqa: E501 + :rtype: int + """ + return self._count_hosts_active + + @count_hosts_active.setter + def count_hosts_active(self, count_hosts_active): + """Sets the count_hosts_active of this GetMachineTypeResponse. + + + :param count_hosts_active: The count_hosts_active of this GetMachineTypeResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_hosts_active is None: + raise ValueError("Invalid value for `count_hosts_active`, must not be `None`") # noqa: E501 + + self._count_hosts_active = count_hosts_active + + @property + def count_hosts_inactive(self): + """Gets the count_hosts_inactive of this GetMachineTypeResponse. # noqa: E501 + + + :return: The count_hosts_inactive of this GetMachineTypeResponse. # noqa: E501 + :rtype: int + """ + return self._count_hosts_inactive + + @count_hosts_inactive.setter + def count_hosts_inactive(self, count_hosts_inactive): + """Sets the count_hosts_inactive of this GetMachineTypeResponse. + + + :param count_hosts_inactive: The count_hosts_inactive of this GetMachineTypeResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and count_hosts_inactive is None: + raise ValueError("Invalid value for `count_hosts_inactive`, must not be `None`") # noqa: E501 + + self._count_hosts_inactive = count_hosts_inactive + + @property + def min_vcpu(self): + """Gets the min_vcpu of this GetMachineTypeResponse. # noqa: E501 + + + :return: The min_vcpu of this GetMachineTypeResponse. # noqa: E501 + :rtype: float + """ + return self._min_vcpu + + @min_vcpu.setter + def min_vcpu(self, min_vcpu): + """Sets the min_vcpu of this GetMachineTypeResponse. + + + :param min_vcpu: The min_vcpu of this GetMachineTypeResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu is None: + raise ValueError("Invalid value for `min_vcpu`, must not be `None`") # noqa: E501 + + self._min_vcpu = min_vcpu + + @property + def min_memory_gib(self): + """Gets the min_memory_gib of this GetMachineTypeResponse. # noqa: E501 + + + :return: The min_memory_gib of this GetMachineTypeResponse. # noqa: E501 + :rtype: float + """ + return self._min_memory_gib + + @min_memory_gib.setter + def min_memory_gib(self, min_memory_gib): + """Sets the min_memory_gib of this GetMachineTypeResponse. + + + :param min_memory_gib: The min_memory_gib of this GetMachineTypeResponse. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_memory_gib is None: + raise ValueError("Invalid value for `min_memory_gib`, must not be `None`") # noqa: E501 + + self._min_memory_gib = min_memory_gib + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetMachineTypeResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetMachineTypeResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetMachineTypeResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_network_response.py b/docs/cudo_compute/models/get_network_response.py new file mode 100644 index 0000000..56c4d0b --- /dev/null +++ b/docs/cudo_compute/models/get_network_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetNetworkResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'network': 'Network' + } + + attribute_map = { + 'network': 'network' + } + + def __init__(self, network=None, _configuration=None): # noqa: E501 + """GetNetworkResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._network = None + self.discriminator = None + + self.network = network + + @property + def network(self): + """Gets the network of this GetNetworkResponse. # noqa: E501 + + + :return: The network of this GetNetworkResponse. # noqa: E501 + :rtype: Network + """ + return self._network + + @network.setter + def network(self, network): + """Sets the network of this GetNetworkResponse. + + + :param network: The network of this GetNetworkResponse. # noqa: E501 + :type: Network + """ + if self._configuration.client_side_validation and network is None: + raise ValueError("Invalid value for `network`, must not be `None`") # noqa: E501 + + self._network = network + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetNetworkResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetNetworkResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetNetworkResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_object_storage_session_key_response.py b/docs/cudo_compute/models/get_object_storage_session_key_response.py new file mode 100644 index 0000000..1139690 --- /dev/null +++ b/docs/cudo_compute/models/get_object_storage_session_key_response.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetObjectStorageSessionKeyResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'session_name': 'str', + 'access_key': 'str', + 'secret_key': 'str', + 'session_token': 'str', + 'endpoint': 'str' + } + + attribute_map = { + 'session_name': 'sessionName', + 'access_key': 'accessKey', + 'secret_key': 'secretKey', + 'session_token': 'sessionToken', + 'endpoint': 'endpoint' + } + + def __init__(self, session_name=None, access_key=None, secret_key=None, session_token=None, endpoint=None, _configuration=None): # noqa: E501 + """GetObjectStorageSessionKeyResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._session_name = None + self._access_key = None + self._secret_key = None + self._session_token = None + self._endpoint = None + self.discriminator = None + + if session_name is not None: + self.session_name = session_name + if access_key is not None: + self.access_key = access_key + if secret_key is not None: + self.secret_key = secret_key + if session_token is not None: + self.session_token = session_token + if endpoint is not None: + self.endpoint = endpoint + + @property + def session_name(self): + """Gets the session_name of this GetObjectStorageSessionKeyResponse. # noqa: E501 + + + :return: The session_name of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :rtype: str + """ + return self._session_name + + @session_name.setter + def session_name(self, session_name): + """Sets the session_name of this GetObjectStorageSessionKeyResponse. + + + :param session_name: The session_name of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :type: str + """ + + self._session_name = session_name + + @property + def access_key(self): + """Gets the access_key of this GetObjectStorageSessionKeyResponse. # noqa: E501 + + + :return: The access_key of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :rtype: str + """ + return self._access_key + + @access_key.setter + def access_key(self, access_key): + """Sets the access_key of this GetObjectStorageSessionKeyResponse. + + + :param access_key: The access_key of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :type: str + """ + + self._access_key = access_key + + @property + def secret_key(self): + """Gets the secret_key of this GetObjectStorageSessionKeyResponse. # noqa: E501 + + + :return: The secret_key of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :rtype: str + """ + return self._secret_key + + @secret_key.setter + def secret_key(self, secret_key): + """Sets the secret_key of this GetObjectStorageSessionKeyResponse. + + + :param secret_key: The secret_key of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :type: str + """ + + self._secret_key = secret_key + + @property + def session_token(self): + """Gets the session_token of this GetObjectStorageSessionKeyResponse. # noqa: E501 + + + :return: The session_token of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :rtype: str + """ + return self._session_token + + @session_token.setter + def session_token(self, session_token): + """Sets the session_token of this GetObjectStorageSessionKeyResponse. + + + :param session_token: The session_token of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :type: str + """ + + self._session_token = session_token + + @property + def endpoint(self): + """Gets the endpoint of this GetObjectStorageSessionKeyResponse. # noqa: E501 + + + :return: The endpoint of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :rtype: str + """ + return self._endpoint + + @endpoint.setter + def endpoint(self, endpoint): + """Sets the endpoint of this GetObjectStorageSessionKeyResponse. + + + :param endpoint: The endpoint of this GetObjectStorageSessionKeyResponse. # noqa: E501 + :type: str + """ + + self._endpoint = endpoint + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetObjectStorageSessionKeyResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetObjectStorageSessionKeyResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetObjectStorageSessionKeyResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_private_vm_image_response.py b/docs/cudo_compute/models/get_private_vm_image_response.py new file mode 100644 index 0000000..66fff26 --- /dev/null +++ b/docs/cudo_compute/models/get_private_vm_image_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetPrivateVMImageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'image': 'PrivateImage' + } + + attribute_map = { + 'image': 'image' + } + + def __init__(self, image=None, _configuration=None): # noqa: E501 + """GetPrivateVMImageResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._image = None + self.discriminator = None + + if image is not None: + self.image = image + + @property + def image(self): + """Gets the image of this GetPrivateVMImageResponse. # noqa: E501 + + + :return: The image of this GetPrivateVMImageResponse. # noqa: E501 + :rtype: PrivateImage + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this GetPrivateVMImageResponse. + + + :param image: The image of this GetPrivateVMImageResponse. # noqa: E501 + :type: PrivateImage + """ + + self._image = image + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetPrivateVMImageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetPrivateVMImageResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetPrivateVMImageResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_response.py b/docs/cudo_compute/models/get_response.py new file mode 100644 index 0000000..4a1e48e --- /dev/null +++ b/docs/cudo_compute/models/get_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'task': 'list[Task]' + } + + attribute_map = { + 'task': 'task' + } + + def __init__(self, task=None, _configuration=None): # noqa: E501 + """GetResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._task = None + self.discriminator = None + + self.task = task + + @property + def task(self): + """Gets the task of this GetResponse. # noqa: E501 + + + :return: The task of this GetResponse. # noqa: E501 + :rtype: list[Task] + """ + return self._task + + @task.setter + def task(self, task): + """Sets the task of this GetResponse. + + + :param task: The task of this GetResponse. # noqa: E501 + :type: list[Task] + """ + if self._configuration.client_side_validation and task is None: + raise ValueError("Invalid value for `task`, must not be `None`") # noqa: E501 + + self._task = task + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_security_group_response.py b/docs/cudo_compute/models/get_security_group_response.py new file mode 100644 index 0000000..c1b9c94 --- /dev/null +++ b/docs/cudo_compute/models/get_security_group_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetSecurityGroupResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'security_group': 'SecurityGroup' + } + + attribute_map = { + 'security_group': 'securityGroup' + } + + def __init__(self, security_group=None, _configuration=None): # noqa: E501 + """GetSecurityGroupResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._security_group = None + self.discriminator = None + + self.security_group = security_group + + @property + def security_group(self): + """Gets the security_group of this GetSecurityGroupResponse. # noqa: E501 + + + :return: The security_group of this GetSecurityGroupResponse. # noqa: E501 + :rtype: SecurityGroup + """ + return self._security_group + + @security_group.setter + def security_group(self, security_group): + """Sets the security_group of this GetSecurityGroupResponse. + + + :param security_group: The security_group of this GetSecurityGroupResponse. # noqa: E501 + :type: SecurityGroup + """ + if self._configuration.client_side_validation and security_group is None: + raise ValueError("Invalid value for `security_group`, must not be `None`") # noqa: E501 + + self._security_group = security_group + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetSecurityGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetSecurityGroupResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetSecurityGroupResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/get_vm_response.py b/docs/cudo_compute/models/get_vm_response.py new file mode 100644 index 0000000..ce14f55 --- /dev/null +++ b/docs/cudo_compute/models/get_vm_response.py @@ -0,0 +1,394 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GetVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'vm': 'VM', + 'vcpu_price_hr': 'Decimal', + 'total_vcpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal', + 'total_memory_price_hr': 'Decimal', + 'gpu_price_hr': 'Decimal', + 'total_gpu_price_hr': 'Decimal', + 'storage_gib_price_hr': 'Decimal', + 'total_storage_price_hr': 'Decimal', + 'ipv4_price_hr': 'Decimal', + 'total_price_hr': 'Decimal' + } + + attribute_map = { + 'vm': 'VM', + 'vcpu_price_hr': 'vcpuPriceHr', + 'total_vcpu_price_hr': 'totalVcpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr', + 'total_memory_price_hr': 'totalMemoryPriceHr', + 'gpu_price_hr': 'gpuPriceHr', + 'total_gpu_price_hr': 'totalGpuPriceHr', + 'storage_gib_price_hr': 'storageGibPriceHr', + 'total_storage_price_hr': 'totalStoragePriceHr', + 'ipv4_price_hr': 'ipv4PriceHr', + 'total_price_hr': 'totalPriceHr' + } + + def __init__(self, vm=None, vcpu_price_hr=None, total_vcpu_price_hr=None, memory_gib_price_hr=None, total_memory_price_hr=None, gpu_price_hr=None, total_gpu_price_hr=None, storage_gib_price_hr=None, total_storage_price_hr=None, ipv4_price_hr=None, total_price_hr=None, _configuration=None): # noqa: E501 + """GetVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._vm = None + self._vcpu_price_hr = None + self._total_vcpu_price_hr = None + self._memory_gib_price_hr = None + self._total_memory_price_hr = None + self._gpu_price_hr = None + self._total_gpu_price_hr = None + self._storage_gib_price_hr = None + self._total_storage_price_hr = None + self._ipv4_price_hr = None + self._total_price_hr = None + self.discriminator = None + + self.vm = vm + self.vcpu_price_hr = vcpu_price_hr + self.total_vcpu_price_hr = total_vcpu_price_hr + self.memory_gib_price_hr = memory_gib_price_hr + self.total_memory_price_hr = total_memory_price_hr + self.gpu_price_hr = gpu_price_hr + self.total_gpu_price_hr = total_gpu_price_hr + self.storage_gib_price_hr = storage_gib_price_hr + self.total_storage_price_hr = total_storage_price_hr + self.ipv4_price_hr = ipv4_price_hr + self.total_price_hr = total_price_hr + + @property + def vm(self): + """Gets the vm of this GetVMResponse. # noqa: E501 + + + :return: The vm of this GetVMResponse. # noqa: E501 + :rtype: VM + """ + return self._vm + + @vm.setter + def vm(self, vm): + """Sets the vm of this GetVMResponse. + + + :param vm: The vm of this GetVMResponse. # noqa: E501 + :type: VM + """ + if self._configuration.client_side_validation and vm is None: + raise ValueError("Invalid value for `vm`, must not be `None`") # noqa: E501 + + self._vm = vm + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The vcpu_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this GetVMResponse. + + + :param vcpu_price_hr: The vcpu_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and vcpu_price_hr is None: + raise ValueError("Invalid value for `vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._vcpu_price_hr = vcpu_price_hr + + @property + def total_vcpu_price_hr(self): + """Gets the total_vcpu_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The total_vcpu_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._total_vcpu_price_hr + + @total_vcpu_price_hr.setter + def total_vcpu_price_hr(self, total_vcpu_price_hr): + """Sets the total_vcpu_price_hr of this GetVMResponse. + + + :param total_vcpu_price_hr: The total_vcpu_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_vcpu_price_hr is None: + raise ValueError("Invalid value for `total_vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._total_vcpu_price_hr = total_vcpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The memory_gib_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this GetVMResponse. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and memory_gib_price_hr is None: + raise ValueError("Invalid value for `memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._memory_gib_price_hr = memory_gib_price_hr + + @property + def total_memory_price_hr(self): + """Gets the total_memory_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The total_memory_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._total_memory_price_hr + + @total_memory_price_hr.setter + def total_memory_price_hr(self, total_memory_price_hr): + """Sets the total_memory_price_hr of this GetVMResponse. + + + :param total_memory_price_hr: The total_memory_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_memory_price_hr is None: + raise ValueError("Invalid value for `total_memory_price_hr`, must not be `None`") # noqa: E501 + + self._total_memory_price_hr = total_memory_price_hr + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The gpu_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this GetVMResponse. + + + :param gpu_price_hr: The gpu_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and gpu_price_hr is None: + raise ValueError("Invalid value for `gpu_price_hr`, must not be `None`") # noqa: E501 + + self._gpu_price_hr = gpu_price_hr + + @property + def total_gpu_price_hr(self): + """Gets the total_gpu_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The total_gpu_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._total_gpu_price_hr + + @total_gpu_price_hr.setter + def total_gpu_price_hr(self, total_gpu_price_hr): + """Sets the total_gpu_price_hr of this GetVMResponse. + + + :param total_gpu_price_hr: The total_gpu_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_gpu_price_hr is None: + raise ValueError("Invalid value for `total_gpu_price_hr`, must not be `None`") # noqa: E501 + + self._total_gpu_price_hr = total_gpu_price_hr + + @property + def storage_gib_price_hr(self): + """Gets the storage_gib_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The storage_gib_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._storage_gib_price_hr + + @storage_gib_price_hr.setter + def storage_gib_price_hr(self, storage_gib_price_hr): + """Sets the storage_gib_price_hr of this GetVMResponse. + + + :param storage_gib_price_hr: The storage_gib_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and storage_gib_price_hr is None: + raise ValueError("Invalid value for `storage_gib_price_hr`, must not be `None`") # noqa: E501 + + self._storage_gib_price_hr = storage_gib_price_hr + + @property + def total_storage_price_hr(self): + """Gets the total_storage_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The total_storage_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._total_storage_price_hr + + @total_storage_price_hr.setter + def total_storage_price_hr(self, total_storage_price_hr): + """Sets the total_storage_price_hr of this GetVMResponse. + + + :param total_storage_price_hr: The total_storage_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_storage_price_hr is None: + raise ValueError("Invalid value for `total_storage_price_hr`, must not be `None`") # noqa: E501 + + self._total_storage_price_hr = total_storage_price_hr + + @property + def ipv4_price_hr(self): + """Gets the ipv4_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The ipv4_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._ipv4_price_hr + + @ipv4_price_hr.setter + def ipv4_price_hr(self, ipv4_price_hr): + """Sets the ipv4_price_hr of this GetVMResponse. + + + :param ipv4_price_hr: The ipv4_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and ipv4_price_hr is None: + raise ValueError("Invalid value for `ipv4_price_hr`, must not be `None`") # noqa: E501 + + self._ipv4_price_hr = ipv4_price_hr + + @property + def total_price_hr(self): + """Gets the total_price_hr of this GetVMResponse. # noqa: E501 + + + :return: The total_price_hr of this GetVMResponse. # noqa: E501 + :rtype: Decimal + """ + return self._total_price_hr + + @total_price_hr.setter + def total_price_hr(self, total_price_hr): + """Sets the total_price_hr of this GetVMResponse. + + + :param total_price_hr: The total_price_hr of this GetVMResponse. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_price_hr is None: + raise ValueError("Invalid value for `total_price_hr`, must not be `None`") # noqa: E501 + + self._total_price_hr = total_price_hr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GetVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GetVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GetVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/gpu_model.py b/docs/cudo_compute/models/gpu_model.py new file mode 100644 index 0000000..d8d54a6 --- /dev/null +++ b/docs/cudo_compute/models/gpu_model.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class GpuModel(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'vendor_name': 'str', + 'model_name': 'str', + 'memory_gib': 'int' + } + + attribute_map = { + 'id': 'id', + 'vendor_name': 'vendorName', + 'model_name': 'modelName', + 'memory_gib': 'memoryGib' + } + + def __init__(self, id=None, vendor_name=None, model_name=None, memory_gib=None, _configuration=None): # noqa: E501 + """GpuModel - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._vendor_name = None + self._model_name = None + self._memory_gib = None + self.discriminator = None + + self.id = id + self.vendor_name = vendor_name + self.model_name = model_name + self.memory_gib = memory_gib + + @property + def id(self): + """Gets the id of this GpuModel. # noqa: E501 + + + :return: The id of this GpuModel. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GpuModel. + + + :param id: The id of this GpuModel. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def vendor_name(self): + """Gets the vendor_name of this GpuModel. # noqa: E501 + + + :return: The vendor_name of this GpuModel. # noqa: E501 + :rtype: str + """ + return self._vendor_name + + @vendor_name.setter + def vendor_name(self, vendor_name): + """Sets the vendor_name of this GpuModel. + + + :param vendor_name: The vendor_name of this GpuModel. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and vendor_name is None: + raise ValueError("Invalid value for `vendor_name`, must not be `None`") # noqa: E501 + + self._vendor_name = vendor_name + + @property + def model_name(self): + """Gets the model_name of this GpuModel. # noqa: E501 + + + :return: The model_name of this GpuModel. # noqa: E501 + :rtype: str + """ + return self._model_name + + @model_name.setter + def model_name(self, model_name): + """Sets the model_name of this GpuModel. + + + :param model_name: The model_name of this GpuModel. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and model_name is None: + raise ValueError("Invalid value for `model_name`, must not be `None`") # noqa: E501 + + self._model_name = model_name + + @property + def memory_gib(self): + """Gets the memory_gib of this GpuModel. # noqa: E501 + + + :return: The memory_gib of this GpuModel. # noqa: E501 + :rtype: int + """ + return self._memory_gib + + @memory_gib.setter + def memory_gib(self, memory_gib): + """Sets the memory_gib of this GpuModel. + + + :param memory_gib: The memory_gib of this GpuModel. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib is None: + raise ValueError("Invalid value for `memory_gib`, must not be `None`") # noqa: E501 + + self._memory_gib = memory_gib + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GpuModel, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GpuModel): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GpuModel): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/host.py b/docs/cudo_compute/models/host.py new file mode 100644 index 0000000..cd32d11 --- /dev/null +++ b/docs/cudo_compute/models/host.py @@ -0,0 +1,529 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Host(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'machine_type': 'str', + 'cpu_model': 'str', + 'vcpu_per_cpu_thread': 'int', + 'gpu_model': 'str', + 'gpu_model_id': 'str', + 'create_time': 'datetime', + 'update_time': 'datetime', + 'vm_count': 'int', + 'vcpu_free': 'int', + 'vcpu_used': 'int', + 'memory_gib_free': 'int', + 'memory_gib_used': 'int', + 'gpu_free': 'int', + 'gpu_used': 'int', + 'online': 'bool', + 'name': 'str' + } + + attribute_map = { + 'machine_type': 'machineType', + 'cpu_model': 'cpuModel', + 'vcpu_per_cpu_thread': 'vcpuPerCpuThread', + 'gpu_model': 'gpuModel', + 'gpu_model_id': 'gpuModelId', + 'create_time': 'createTime', + 'update_time': 'updateTime', + 'vm_count': 'vmCount', + 'vcpu_free': 'vcpuFree', + 'vcpu_used': 'vcpuUsed', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_used': 'memoryGibUsed', + 'gpu_free': 'gpuFree', + 'gpu_used': 'gpuUsed', + 'online': 'online', + 'name': 'name' + } + + def __init__(self, machine_type=None, cpu_model=None, vcpu_per_cpu_thread=None, gpu_model=None, gpu_model_id=None, create_time=None, update_time=None, vm_count=None, vcpu_free=None, vcpu_used=None, memory_gib_free=None, memory_gib_used=None, gpu_free=None, gpu_used=None, online=None, name=None, _configuration=None): # noqa: E501 + """Host - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._machine_type = None + self._cpu_model = None + self._vcpu_per_cpu_thread = None + self._gpu_model = None + self._gpu_model_id = None + self._create_time = None + self._update_time = None + self._vm_count = None + self._vcpu_free = None + self._vcpu_used = None + self._memory_gib_free = None + self._memory_gib_used = None + self._gpu_free = None + self._gpu_used = None + self._online = None + self._name = None + self.discriminator = None + + self.machine_type = machine_type + self.cpu_model = cpu_model + self.vcpu_per_cpu_thread = vcpu_per_cpu_thread + self.gpu_model = gpu_model + self.gpu_model_id = gpu_model_id + self.create_time = create_time + self.update_time = update_time + self.vm_count = vm_count + self.vcpu_free = vcpu_free + self.vcpu_used = vcpu_used + self.memory_gib_free = memory_gib_free + self.memory_gib_used = memory_gib_used + self.gpu_free = gpu_free + self.gpu_used = gpu_used + self.online = online + self.name = name + + @property + def machine_type(self): + """Gets the machine_type of this Host. # noqa: E501 + + + :return: The machine_type of this Host. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this Host. + + + :param machine_type: The machine_type of this Host. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def cpu_model(self): + """Gets the cpu_model of this Host. # noqa: E501 + + + :return: The cpu_model of this Host. # noqa: E501 + :rtype: str + """ + return self._cpu_model + + @cpu_model.setter + def cpu_model(self, cpu_model): + """Sets the cpu_model of this Host. + + + :param cpu_model: The cpu_model of this Host. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and cpu_model is None: + raise ValueError("Invalid value for `cpu_model`, must not be `None`") # noqa: E501 + + self._cpu_model = cpu_model + + @property + def vcpu_per_cpu_thread(self): + """Gets the vcpu_per_cpu_thread of this Host. # noqa: E501 + + + :return: The vcpu_per_cpu_thread of this Host. # noqa: E501 + :rtype: int + """ + return self._vcpu_per_cpu_thread + + @vcpu_per_cpu_thread.setter + def vcpu_per_cpu_thread(self, vcpu_per_cpu_thread): + """Sets the vcpu_per_cpu_thread of this Host. + + + :param vcpu_per_cpu_thread: The vcpu_per_cpu_thread of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_per_cpu_thread is None: + raise ValueError("Invalid value for `vcpu_per_cpu_thread`, must not be `None`") # noqa: E501 + + self._vcpu_per_cpu_thread = vcpu_per_cpu_thread + + @property + def gpu_model(self): + """Gets the gpu_model of this Host. # noqa: E501 + + + :return: The gpu_model of this Host. # noqa: E501 + :rtype: str + """ + return self._gpu_model + + @gpu_model.setter + def gpu_model(self, gpu_model): + """Sets the gpu_model of this Host. + + + :param gpu_model: The gpu_model of this Host. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model is None: + raise ValueError("Invalid value for `gpu_model`, must not be `None`") # noqa: E501 + + self._gpu_model = gpu_model + + @property + def gpu_model_id(self): + """Gets the gpu_model_id of this Host. # noqa: E501 + + + :return: The gpu_model_id of this Host. # noqa: E501 + :rtype: str + """ + return self._gpu_model_id + + @gpu_model_id.setter + def gpu_model_id(self, gpu_model_id): + """Sets the gpu_model_id of this Host. + + + :param gpu_model_id: The gpu_model_id of this Host. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model_id is None: + raise ValueError("Invalid value for `gpu_model_id`, must not be `None`") # noqa: E501 + + self._gpu_model_id = gpu_model_id + + @property + def create_time(self): + """Gets the create_time of this Host. # noqa: E501 + + + :return: The create_time of this Host. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Host. + + + :param create_time: The create_time of this Host. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and create_time is None: + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def update_time(self): + """Gets the update_time of this Host. # noqa: E501 + + + :return: The update_time of this Host. # noqa: E501 + :rtype: datetime + """ + return self._update_time + + @update_time.setter + def update_time(self, update_time): + """Sets the update_time of this Host. + + + :param update_time: The update_time of this Host. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and update_time is None: + raise ValueError("Invalid value for `update_time`, must not be `None`") # noqa: E501 + + self._update_time = update_time + + @property + def vm_count(self): + """Gets the vm_count of this Host. # noqa: E501 + + + :return: The vm_count of this Host. # noqa: E501 + :rtype: int + """ + return self._vm_count + + @vm_count.setter + def vm_count(self, vm_count): + """Sets the vm_count of this Host. + + + :param vm_count: The vm_count of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vm_count is None: + raise ValueError("Invalid value for `vm_count`, must not be `None`") # noqa: E501 + + self._vm_count = vm_count + + @property + def vcpu_free(self): + """Gets the vcpu_free of this Host. # noqa: E501 + + + :return: The vcpu_free of this Host. # noqa: E501 + :rtype: int + """ + return self._vcpu_free + + @vcpu_free.setter + def vcpu_free(self, vcpu_free): + """Sets the vcpu_free of this Host. + + + :param vcpu_free: The vcpu_free of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_free is None: + raise ValueError("Invalid value for `vcpu_free`, must not be `None`") # noqa: E501 + + self._vcpu_free = vcpu_free + + @property + def vcpu_used(self): + """Gets the vcpu_used of this Host. # noqa: E501 + + + :return: The vcpu_used of this Host. # noqa: E501 + :rtype: int + """ + return self._vcpu_used + + @vcpu_used.setter + def vcpu_used(self, vcpu_used): + """Sets the vcpu_used of this Host. + + + :param vcpu_used: The vcpu_used of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and vcpu_used is None: + raise ValueError("Invalid value for `vcpu_used`, must not be `None`") # noqa: E501 + + self._vcpu_used = vcpu_used + + @property + def memory_gib_free(self): + """Gets the memory_gib_free of this Host. # noqa: E501 + + + :return: The memory_gib_free of this Host. # noqa: E501 + :rtype: int + """ + return self._memory_gib_free + + @memory_gib_free.setter + def memory_gib_free(self, memory_gib_free): + """Sets the memory_gib_free of this Host. + + + :param memory_gib_free: The memory_gib_free of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_free is None: + raise ValueError("Invalid value for `memory_gib_free`, must not be `None`") # noqa: E501 + + self._memory_gib_free = memory_gib_free + + @property + def memory_gib_used(self): + """Gets the memory_gib_used of this Host. # noqa: E501 + + + :return: The memory_gib_used of this Host. # noqa: E501 + :rtype: int + """ + return self._memory_gib_used + + @memory_gib_used.setter + def memory_gib_used(self, memory_gib_used): + """Sets the memory_gib_used of this Host. + + + :param memory_gib_used: The memory_gib_used of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and memory_gib_used is None: + raise ValueError("Invalid value for `memory_gib_used`, must not be `None`") # noqa: E501 + + self._memory_gib_used = memory_gib_used + + @property + def gpu_free(self): + """Gets the gpu_free of this Host. # noqa: E501 + + + :return: The gpu_free of this Host. # noqa: E501 + :rtype: int + """ + return self._gpu_free + + @gpu_free.setter + def gpu_free(self, gpu_free): + """Sets the gpu_free of this Host. + + + :param gpu_free: The gpu_free of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_free is None: + raise ValueError("Invalid value for `gpu_free`, must not be `None`") # noqa: E501 + + self._gpu_free = gpu_free + + @property + def gpu_used(self): + """Gets the gpu_used of this Host. # noqa: E501 + + + :return: The gpu_used of this Host. # noqa: E501 + :rtype: int + """ + return self._gpu_used + + @gpu_used.setter + def gpu_used(self, gpu_used): + """Sets the gpu_used of this Host. + + + :param gpu_used: The gpu_used of this Host. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and gpu_used is None: + raise ValueError("Invalid value for `gpu_used`, must not be `None`") # noqa: E501 + + self._gpu_used = gpu_used + + @property + def online(self): + """Gets the online of this Host. # noqa: E501 + + + :return: The online of this Host. # noqa: E501 + :rtype: bool + """ + return self._online + + @online.setter + def online(self, online): + """Sets the online of this Host. + + + :param online: The online of this Host. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and online is None: + raise ValueError("Invalid value for `online`, must not be `None`") # noqa: E501 + + self._online = online + + @property + def name(self): + """Gets the name of this Host. # noqa: E501 + + + :return: The name of this Host. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Host. + + + :param name: The name of this Host. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Host, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Host): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Host): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/identity_verification_session.py b/docs/cudo_compute/models/identity_verification_session.py new file mode 100644 index 0000000..4657580 --- /dev/null +++ b/docs/cudo_compute/models/identity_verification_session.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class IdentityVerificationSession(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'client_secret': 'str' + } + + attribute_map = { + 'id': 'id', + 'client_secret': 'clientSecret' + } + + def __init__(self, id=None, client_secret=None, _configuration=None): # noqa: E501 + """IdentityVerificationSession - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._client_secret = None + self.discriminator = None + + if id is not None: + self.id = id + if client_secret is not None: + self.client_secret = client_secret + + @property + def id(self): + """Gets the id of this IdentityVerificationSession. # noqa: E501 + + + :return: The id of this IdentityVerificationSession. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this IdentityVerificationSession. + + + :param id: The id of this IdentityVerificationSession. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def client_secret(self): + """Gets the client_secret of this IdentityVerificationSession. # noqa: E501 + + + :return: The client_secret of this IdentityVerificationSession. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this IdentityVerificationSession. + + + :param client_secret: The client_secret of this IdentityVerificationSession. # noqa: E501 + :type: str + """ + + self._client_secret = client_secret + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IdentityVerificationSession, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IdentityVerificationSession): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IdentityVerificationSession): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/image.py b/docs/cudo_compute/models/image.py new file mode 100644 index 0000000..98c2244 --- /dev/null +++ b/docs/cudo_compute/models/image.py @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Image(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'description': 'str', + 'display_name': 'str', + 'platform': 'str', + 'size_gib': 'int', + 'installed_packages': 'list[Package]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'description': 'description', + 'display_name': 'displayName', + 'platform': 'platform', + 'size_gib': 'sizeGib', + 'installed_packages': 'installedPackages' + } + + def __init__(self, id=None, name=None, description=None, display_name=None, platform=None, size_gib=None, installed_packages=None, _configuration=None): # noqa: E501 + """Image - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._name = None + self._description = None + self._display_name = None + self._platform = None + self._size_gib = None + self._installed_packages = None + self.discriminator = None + + self.id = id + self.name = name + self.description = description + self.display_name = display_name + self.platform = platform + self.size_gib = size_gib + self.installed_packages = installed_packages + + @property + def id(self): + """Gets the id of this Image. # noqa: E501 + + + :return: The id of this Image. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Image. + + + :param id: The id of this Image. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this Image. # noqa: E501 + + + :return: The name of this Image. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Image. + + + :param name: The name of this Image. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def description(self): + """Gets the description of this Image. # noqa: E501 + + + :return: The description of this Image. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Image. + + + :param description: The description of this Image. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and description is None: + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + @property + def display_name(self): + """Gets the display_name of this Image. # noqa: E501 + + + :return: The display_name of this Image. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this Image. + + + :param display_name: The display_name of this Image. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and display_name is None: + raise ValueError("Invalid value for `display_name`, must not be `None`") # noqa: E501 + + self._display_name = display_name + + @property + def platform(self): + """Gets the platform of this Image. # noqa: E501 + + + :return: The platform of this Image. # noqa: E501 + :rtype: str + """ + return self._platform + + @platform.setter + def platform(self, platform): + """Sets the platform of this Image. + + + :param platform: The platform of this Image. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and platform is None: + raise ValueError("Invalid value for `platform`, must not be `None`") # noqa: E501 + + self._platform = platform + + @property + def size_gib(self): + """Gets the size_gib of this Image. # noqa: E501 + + + :return: The size_gib of this Image. # noqa: E501 + :rtype: int + """ + return self._size_gib + + @size_gib.setter + def size_gib(self, size_gib): + """Sets the size_gib of this Image. + + + :param size_gib: The size_gib of this Image. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and size_gib is None: + raise ValueError("Invalid value for `size_gib`, must not be `None`") # noqa: E501 + + self._size_gib = size_gib + + @property + def installed_packages(self): + """Gets the installed_packages of this Image. # noqa: E501 + + + :return: The installed_packages of this Image. # noqa: E501 + :rtype: list[Package] + """ + return self._installed_packages + + @installed_packages.setter + def installed_packages(self, installed_packages): + """Sets the installed_packages of this Image. + + + :param installed_packages: The installed_packages of this Image. # noqa: E501 + :type: list[Package] + """ + if self._configuration.client_side_validation and installed_packages is None: + raise ValueError("Invalid value for `installed_packages`, must not be `None`") # noqa: E501 + + self._installed_packages = installed_packages + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Image, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Image): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Image): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/image_result.py b/docs/cudo_compute/models/image_result.py new file mode 100644 index 0000000..378148b --- /dev/null +++ b/docs/cudo_compute/models/image_result.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ImageResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'id': 'str', + 'data_center_id': 'str', + 'size_gib': 'int', + 'create_time': 'datetime' + } + + attribute_map = { + 'project_id': 'projectId', + 'id': 'id', + 'data_center_id': 'dataCenterId', + 'size_gib': 'sizeGib', + 'create_time': 'createTime' + } + + def __init__(self, project_id=None, id=None, data_center_id=None, size_gib=None, create_time=None, _configuration=None): # noqa: E501 + """ImageResult - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._id = None + self._data_center_id = None + self._size_gib = None + self._create_time = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if id is not None: + self.id = id + if data_center_id is not None: + self.data_center_id = data_center_id + if size_gib is not None: + self.size_gib = size_gib + if create_time is not None: + self.create_time = create_time + + @property + def project_id(self): + """Gets the project_id of this ImageResult. # noqa: E501 + + + :return: The project_id of this ImageResult. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ImageResult. + + + :param project_id: The project_id of this ImageResult. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def id(self): + """Gets the id of this ImageResult. # noqa: E501 + + + :return: The id of this ImageResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ImageResult. + + + :param id: The id of this ImageResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def data_center_id(self): + """Gets the data_center_id of this ImageResult. # noqa: E501 + + + :return: The data_center_id of this ImageResult. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this ImageResult. + + + :param data_center_id: The data_center_id of this ImageResult. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def size_gib(self): + """Gets the size_gib of this ImageResult. # noqa: E501 + + + :return: The size_gib of this ImageResult. # noqa: E501 + :rtype: int + """ + return self._size_gib + + @size_gib.setter + def size_gib(self, size_gib): + """Sets the size_gib of this ImageResult. + + + :param size_gib: The size_gib of this ImageResult. # noqa: E501 + :type: int + """ + + self._size_gib = size_gib + + @property + def create_time(self): + """Gets the create_time of this ImageResult. # noqa: E501 + + + :return: The create_time of this ImageResult. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ImageResult. + + + :param create_time: The create_time of this ImageResult. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ImageResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ImageResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ImageResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/invoice.py b/docs/cudo_compute/models/invoice.py new file mode 100644 index 0000000..0a27faa --- /dev/null +++ b/docs/cudo_compute/models/invoice.py @@ -0,0 +1,643 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Invoice(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'amount_due': 'str', + 'amount_paid': 'str', + 'amount_remaining': 'str', + 'created': 'str', + 'description': 'str', + 'currency': 'str', + 'hosted_invoice_url': 'str', + 'status': 'str', + 'due_date': 'str', + 'paid_date': 'str', + 'billing_reason': 'str', + 'auto_advance': 'bool', + 'period_start': 'str', + 'period_end': 'str', + 'number': 'str', + 'subtotal_excluding_tax': 'str', + 'subtotal': 'str', + 'total_excluding_tax': 'str', + 'tax': 'str', + 'total': 'str' + } + + attribute_map = { + 'id': 'id', + 'amount_due': 'amountDue', + 'amount_paid': 'amountPaid', + 'amount_remaining': 'amountRemaining', + 'created': 'created', + 'description': 'description', + 'currency': 'currency', + 'hosted_invoice_url': 'hostedInvoiceUrl', + 'status': 'status', + 'due_date': 'dueDate', + 'paid_date': 'paidDate', + 'billing_reason': 'billingReason', + 'auto_advance': 'autoAdvance', + 'period_start': 'periodStart', + 'period_end': 'periodEnd', + 'number': 'number', + 'subtotal_excluding_tax': 'subtotalExcludingTax', + 'subtotal': 'subtotal', + 'total_excluding_tax': 'totalExcludingTax', + 'tax': 'tax', + 'total': 'total' + } + + def __init__(self, id=None, amount_due=None, amount_paid=None, amount_remaining=None, created=None, description=None, currency=None, hosted_invoice_url=None, status=None, due_date=None, paid_date=None, billing_reason=None, auto_advance=None, period_start=None, period_end=None, number=None, subtotal_excluding_tax=None, subtotal=None, total_excluding_tax=None, tax=None, total=None, _configuration=None): # noqa: E501 + """Invoice - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._amount_due = None + self._amount_paid = None + self._amount_remaining = None + self._created = None + self._description = None + self._currency = None + self._hosted_invoice_url = None + self._status = None + self._due_date = None + self._paid_date = None + self._billing_reason = None + self._auto_advance = None + self._period_start = None + self._period_end = None + self._number = None + self._subtotal_excluding_tax = None + self._subtotal = None + self._total_excluding_tax = None + self._tax = None + self._total = None + self.discriminator = None + + if id is not None: + self.id = id + if amount_due is not None: + self.amount_due = amount_due + if amount_paid is not None: + self.amount_paid = amount_paid + if amount_remaining is not None: + self.amount_remaining = amount_remaining + if created is not None: + self.created = created + if description is not None: + self.description = description + if currency is not None: + self.currency = currency + if hosted_invoice_url is not None: + self.hosted_invoice_url = hosted_invoice_url + if status is not None: + self.status = status + if due_date is not None: + self.due_date = due_date + if paid_date is not None: + self.paid_date = paid_date + if billing_reason is not None: + self.billing_reason = billing_reason + if auto_advance is not None: + self.auto_advance = auto_advance + if period_start is not None: + self.period_start = period_start + if period_end is not None: + self.period_end = period_end + if number is not None: + self.number = number + if subtotal_excluding_tax is not None: + self.subtotal_excluding_tax = subtotal_excluding_tax + if subtotal is not None: + self.subtotal = subtotal + if total_excluding_tax is not None: + self.total_excluding_tax = total_excluding_tax + if tax is not None: + self.tax = tax + if total is not None: + self.total = total + + @property + def id(self): + """Gets the id of this Invoice. # noqa: E501 + + + :return: The id of this Invoice. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Invoice. + + + :param id: The id of this Invoice. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def amount_due(self): + """Gets the amount_due of this Invoice. # noqa: E501 + + + :return: The amount_due of this Invoice. # noqa: E501 + :rtype: str + """ + return self._amount_due + + @amount_due.setter + def amount_due(self, amount_due): + """Sets the amount_due of this Invoice. + + + :param amount_due: The amount_due of this Invoice. # noqa: E501 + :type: str + """ + + self._amount_due = amount_due + + @property + def amount_paid(self): + """Gets the amount_paid of this Invoice. # noqa: E501 + + + :return: The amount_paid of this Invoice. # noqa: E501 + :rtype: str + """ + return self._amount_paid + + @amount_paid.setter + def amount_paid(self, amount_paid): + """Sets the amount_paid of this Invoice. + + + :param amount_paid: The amount_paid of this Invoice. # noqa: E501 + :type: str + """ + + self._amount_paid = amount_paid + + @property + def amount_remaining(self): + """Gets the amount_remaining of this Invoice. # noqa: E501 + + + :return: The amount_remaining of this Invoice. # noqa: E501 + :rtype: str + """ + return self._amount_remaining + + @amount_remaining.setter + def amount_remaining(self, amount_remaining): + """Sets the amount_remaining of this Invoice. + + + :param amount_remaining: The amount_remaining of this Invoice. # noqa: E501 + :type: str + """ + + self._amount_remaining = amount_remaining + + @property + def created(self): + """Gets the created of this Invoice. # noqa: E501 + + + :return: The created of this Invoice. # noqa: E501 + :rtype: str + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this Invoice. + + + :param created: The created of this Invoice. # noqa: E501 + :type: str + """ + + self._created = created + + @property + def description(self): + """Gets the description of this Invoice. # noqa: E501 + + + :return: The description of this Invoice. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Invoice. + + + :param description: The description of this Invoice. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def currency(self): + """Gets the currency of this Invoice. # noqa: E501 + + + :return: The currency of this Invoice. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Invoice. + + + :param currency: The currency of this Invoice. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def hosted_invoice_url(self): + """Gets the hosted_invoice_url of this Invoice. # noqa: E501 + + + :return: The hosted_invoice_url of this Invoice. # noqa: E501 + :rtype: str + """ + return self._hosted_invoice_url + + @hosted_invoice_url.setter + def hosted_invoice_url(self, hosted_invoice_url): + """Sets the hosted_invoice_url of this Invoice. + + + :param hosted_invoice_url: The hosted_invoice_url of this Invoice. # noqa: E501 + :type: str + """ + + self._hosted_invoice_url = hosted_invoice_url + + @property + def status(self): + """Gets the status of this Invoice. # noqa: E501 + + + :return: The status of this Invoice. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Invoice. + + + :param status: The status of this Invoice. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def due_date(self): + """Gets the due_date of this Invoice. # noqa: E501 + + + :return: The due_date of this Invoice. # noqa: E501 + :rtype: str + """ + return self._due_date + + @due_date.setter + def due_date(self, due_date): + """Sets the due_date of this Invoice. + + + :param due_date: The due_date of this Invoice. # noqa: E501 + :type: str + """ + + self._due_date = due_date + + @property + def paid_date(self): + """Gets the paid_date of this Invoice. # noqa: E501 + + + :return: The paid_date of this Invoice. # noqa: E501 + :rtype: str + """ + return self._paid_date + + @paid_date.setter + def paid_date(self, paid_date): + """Sets the paid_date of this Invoice. + + + :param paid_date: The paid_date of this Invoice. # noqa: E501 + :type: str + """ + + self._paid_date = paid_date + + @property + def billing_reason(self): + """Gets the billing_reason of this Invoice. # noqa: E501 + + + :return: The billing_reason of this Invoice. # noqa: E501 + :rtype: str + """ + return self._billing_reason + + @billing_reason.setter + def billing_reason(self, billing_reason): + """Sets the billing_reason of this Invoice. + + + :param billing_reason: The billing_reason of this Invoice. # noqa: E501 + :type: str + """ + + self._billing_reason = billing_reason + + @property + def auto_advance(self): + """Gets the auto_advance of this Invoice. # noqa: E501 + + + :return: The auto_advance of this Invoice. # noqa: E501 + :rtype: bool + """ + return self._auto_advance + + @auto_advance.setter + def auto_advance(self, auto_advance): + """Sets the auto_advance of this Invoice. + + + :param auto_advance: The auto_advance of this Invoice. # noqa: E501 + :type: bool + """ + + self._auto_advance = auto_advance + + @property + def period_start(self): + """Gets the period_start of this Invoice. # noqa: E501 + + + :return: The period_start of this Invoice. # noqa: E501 + :rtype: str + """ + return self._period_start + + @period_start.setter + def period_start(self, period_start): + """Sets the period_start of this Invoice. + + + :param period_start: The period_start of this Invoice. # noqa: E501 + :type: str + """ + + self._period_start = period_start + + @property + def period_end(self): + """Gets the period_end of this Invoice. # noqa: E501 + + + :return: The period_end of this Invoice. # noqa: E501 + :rtype: str + """ + return self._period_end + + @period_end.setter + def period_end(self, period_end): + """Sets the period_end of this Invoice. + + + :param period_end: The period_end of this Invoice. # noqa: E501 + :type: str + """ + + self._period_end = period_end + + @property + def number(self): + """Gets the number of this Invoice. # noqa: E501 + + + :return: The number of this Invoice. # noqa: E501 + :rtype: str + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this Invoice. + + + :param number: The number of this Invoice. # noqa: E501 + :type: str + """ + + self._number = number + + @property + def subtotal_excluding_tax(self): + """Gets the subtotal_excluding_tax of this Invoice. # noqa: E501 + + + :return: The subtotal_excluding_tax of this Invoice. # noqa: E501 + :rtype: str + """ + return self._subtotal_excluding_tax + + @subtotal_excluding_tax.setter + def subtotal_excluding_tax(self, subtotal_excluding_tax): + """Sets the subtotal_excluding_tax of this Invoice. + + + :param subtotal_excluding_tax: The subtotal_excluding_tax of this Invoice. # noqa: E501 + :type: str + """ + + self._subtotal_excluding_tax = subtotal_excluding_tax + + @property + def subtotal(self): + """Gets the subtotal of this Invoice. # noqa: E501 + + + :return: The subtotal of this Invoice. # noqa: E501 + :rtype: str + """ + return self._subtotal + + @subtotal.setter + def subtotal(self, subtotal): + """Sets the subtotal of this Invoice. + + + :param subtotal: The subtotal of this Invoice. # noqa: E501 + :type: str + """ + + self._subtotal = subtotal + + @property + def total_excluding_tax(self): + """Gets the total_excluding_tax of this Invoice. # noqa: E501 + + + :return: The total_excluding_tax of this Invoice. # noqa: E501 + :rtype: str + """ + return self._total_excluding_tax + + @total_excluding_tax.setter + def total_excluding_tax(self, total_excluding_tax): + """Sets the total_excluding_tax of this Invoice. + + + :param total_excluding_tax: The total_excluding_tax of this Invoice. # noqa: E501 + :type: str + """ + + self._total_excluding_tax = total_excluding_tax + + @property + def tax(self): + """Gets the tax of this Invoice. # noqa: E501 + + + :return: The tax of this Invoice. # noqa: E501 + :rtype: str + """ + return self._tax + + @tax.setter + def tax(self, tax): + """Sets the tax of this Invoice. + + + :param tax: The tax of this Invoice. # noqa: E501 + :type: str + """ + + self._tax = tax + + @property + def total(self): + """Gets the total of this Invoice. # noqa: E501 + + + :return: The total of this Invoice. # noqa: E501 + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this Invoice. + + + :param total: The total of this Invoice. # noqa: E501 + :type: str + """ + + self._total = total + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Invoice, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Invoice): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Invoice): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/last_payment_error.py b/docs/cudo_compute/models/last_payment_error.py new file mode 100644 index 0000000..42392bc --- /dev/null +++ b/docs/cudo_compute/models/last_payment_error.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class LastPaymentError(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'code': 'str', + 'decline_code': 'str' + } + + attribute_map = { + 'code': 'code', + 'decline_code': 'declineCode' + } + + def __init__(self, code=None, decline_code=None, _configuration=None): # noqa: E501 + """LastPaymentError - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._code = None + self._decline_code = None + self.discriminator = None + + self.code = code + self.decline_code = decline_code + + @property + def code(self): + """Gets the code of this LastPaymentError. # noqa: E501 + + + :return: The code of this LastPaymentError. # noqa: E501 + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this LastPaymentError. + + + :param code: The code of this LastPaymentError. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and code is None: + raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 + + self._code = code + + @property + def decline_code(self): + """Gets the decline_code of this LastPaymentError. # noqa: E501 + + + :return: The decline_code of this LastPaymentError. # noqa: E501 + :rtype: str + """ + return self._decline_code + + @decline_code.setter + def decline_code(self, decline_code): + """Sets the decline_code of this LastPaymentError. + + + :param decline_code: The decline_code of this LastPaymentError. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and decline_code is None: + raise ValueError("Invalid value for `decline_code`, must not be `None`") # noqa: E501 + + self._decline_code = decline_code + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LastPaymentError, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LastPaymentError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, LastPaymentError): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_api_keys_response.py b/docs/cudo_compute/models/list_api_keys_response.py new file mode 100644 index 0000000..2b9b17b --- /dev/null +++ b/docs/cudo_compute/models/list_api_keys_response.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListApiKeysResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_keys': 'list[ApiKey]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'api_keys': 'apiKeys', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, api_keys=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListApiKeysResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._api_keys = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + self.api_keys = api_keys + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def api_keys(self): + """Gets the api_keys of this ListApiKeysResponse. # noqa: E501 + + + :return: The api_keys of this ListApiKeysResponse. # noqa: E501 + :rtype: list[ApiKey] + """ + return self._api_keys + + @api_keys.setter + def api_keys(self, api_keys): + """Sets the api_keys of this ListApiKeysResponse. + + + :param api_keys: The api_keys of this ListApiKeysResponse. # noqa: E501 + :type: list[ApiKey] + """ + if self._configuration.client_side_validation and api_keys is None: + raise ValueError("Invalid value for `api_keys`, must not be `None`") # noqa: E501 + + self._api_keys = api_keys + + @property + def total_count(self): + """Gets the total_count of this ListApiKeysResponse. # noqa: E501 + + + :return: The total_count of this ListApiKeysResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListApiKeysResponse. + + + :param total_count: The total_count of this ListApiKeysResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListApiKeysResponse. # noqa: E501 + + + :return: The page_number of this ListApiKeysResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListApiKeysResponse. + + + :param page_number: The page_number of this ListApiKeysResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListApiKeysResponse. # noqa: E501 + + + :return: The page_size of this ListApiKeysResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListApiKeysResponse. + + + :param page_size: The page_size of this ListApiKeysResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListApiKeysResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListApiKeysResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListApiKeysResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_billing_account_credit_balance_transactions_response.py b/docs/cudo_compute/models/list_billing_account_credit_balance_transactions_response.py new file mode 100644 index 0000000..b4afb7d --- /dev/null +++ b/docs/cudo_compute/models/list_billing_account_credit_balance_transactions_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListBillingAccountCreditBalanceTransactionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'credit_balance_transactions': 'list[CreditBalanceTransaction]', + 'has_more': 'bool' + } + + attribute_map = { + 'credit_balance_transactions': 'creditBalanceTransactions', + 'has_more': 'hasMore' + } + + def __init__(self, credit_balance_transactions=None, has_more=None, _configuration=None): # noqa: E501 + """ListBillingAccountCreditBalanceTransactionsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._credit_balance_transactions = None + self._has_more = None + self.discriminator = None + + self.credit_balance_transactions = credit_balance_transactions + self.has_more = has_more + + @property + def credit_balance_transactions(self): + """Gets the credit_balance_transactions of this ListBillingAccountCreditBalanceTransactionsResponse. # noqa: E501 + + + :return: The credit_balance_transactions of this ListBillingAccountCreditBalanceTransactionsResponse. # noqa: E501 + :rtype: list[CreditBalanceTransaction] + """ + return self._credit_balance_transactions + + @credit_balance_transactions.setter + def credit_balance_transactions(self, credit_balance_transactions): + """Sets the credit_balance_transactions of this ListBillingAccountCreditBalanceTransactionsResponse. + + + :param credit_balance_transactions: The credit_balance_transactions of this ListBillingAccountCreditBalanceTransactionsResponse. # noqa: E501 + :type: list[CreditBalanceTransaction] + """ + if self._configuration.client_side_validation and credit_balance_transactions is None: + raise ValueError("Invalid value for `credit_balance_transactions`, must not be `None`") # noqa: E501 + + self._credit_balance_transactions = credit_balance_transactions + + @property + def has_more(self): + """Gets the has_more of this ListBillingAccountCreditBalanceTransactionsResponse. # noqa: E501 + + + :return: The has_more of this ListBillingAccountCreditBalanceTransactionsResponse. # noqa: E501 + :rtype: bool + """ + return self._has_more + + @has_more.setter + def has_more(self, has_more): + """Sets the has_more of this ListBillingAccountCreditBalanceTransactionsResponse. + + + :param has_more: The has_more of this ListBillingAccountCreditBalanceTransactionsResponse. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and has_more is None: + raise ValueError("Invalid value for `has_more`, must not be `None`") # noqa: E501 + + self._has_more = has_more + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListBillingAccountCreditBalanceTransactionsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBillingAccountCreditBalanceTransactionsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListBillingAccountCreditBalanceTransactionsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_billing_account_invoices_response.py b/docs/cudo_compute/models/list_billing_account_invoices_response.py new file mode 100644 index 0000000..6b4659a --- /dev/null +++ b/docs/cudo_compute/models/list_billing_account_invoices_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListBillingAccountInvoicesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'invoices': 'list[Invoice]', + 'has_more': 'bool' + } + + attribute_map = { + 'invoices': 'invoices', + 'has_more': 'hasMore' + } + + def __init__(self, invoices=None, has_more=None, _configuration=None): # noqa: E501 + """ListBillingAccountInvoicesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._invoices = None + self._has_more = None + self.discriminator = None + + self.invoices = invoices + self.has_more = has_more + + @property + def invoices(self): + """Gets the invoices of this ListBillingAccountInvoicesResponse. # noqa: E501 + + + :return: The invoices of this ListBillingAccountInvoicesResponse. # noqa: E501 + :rtype: list[Invoice] + """ + return self._invoices + + @invoices.setter + def invoices(self, invoices): + """Sets the invoices of this ListBillingAccountInvoicesResponse. + + + :param invoices: The invoices of this ListBillingAccountInvoicesResponse. # noqa: E501 + :type: list[Invoice] + """ + if self._configuration.client_side_validation and invoices is None: + raise ValueError("Invalid value for `invoices`, must not be `None`") # noqa: E501 + + self._invoices = invoices + + @property + def has_more(self): + """Gets the has_more of this ListBillingAccountInvoicesResponse. # noqa: E501 + + + :return: The has_more of this ListBillingAccountInvoicesResponse. # noqa: E501 + :rtype: bool + """ + return self._has_more + + @has_more.setter + def has_more(self, has_more): + """Sets the has_more of this ListBillingAccountInvoicesResponse. + + + :param has_more: The has_more of this ListBillingAccountInvoicesResponse. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and has_more is None: + raise ValueError("Invalid value for `has_more`, must not be `None`") # noqa: E501 + + self._has_more = has_more + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListBillingAccountInvoicesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBillingAccountInvoicesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListBillingAccountInvoicesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_billing_account_projects_response.py b/docs/cudo_compute/models/list_billing_account_projects_response.py new file mode 100644 index 0000000..d5dceb3 --- /dev/null +++ b/docs/cudo_compute/models/list_billing_account_projects_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListBillingAccountProjectsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'projects': 'list[BillingAccountProject]' + } + + attribute_map = { + 'projects': 'projects' + } + + def __init__(self, projects=None, _configuration=None): # noqa: E501 + """ListBillingAccountProjectsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._projects = None + self.discriminator = None + + self.projects = projects + + @property + def projects(self): + """Gets the projects of this ListBillingAccountProjectsResponse. # noqa: E501 + + + :return: The projects of this ListBillingAccountProjectsResponse. # noqa: E501 + :rtype: list[BillingAccountProject] + """ + return self._projects + + @projects.setter + def projects(self, projects): + """Sets the projects of this ListBillingAccountProjectsResponse. + + + :param projects: The projects of this ListBillingAccountProjectsResponse. # noqa: E501 + :type: list[BillingAccountProject] + """ + if self._configuration.client_side_validation and projects is None: + raise ValueError("Invalid value for `projects`, must not be `None`") # noqa: E501 + + self._projects = projects + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListBillingAccountProjectsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBillingAccountProjectsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListBillingAccountProjectsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_billing_account_transactions_response.py b/docs/cudo_compute/models/list_billing_account_transactions_response.py new file mode 100644 index 0000000..201e9ff --- /dev/null +++ b/docs/cudo_compute/models/list_billing_account_transactions_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListBillingAccountTransactionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transactions': 'list[Transaction]', + 'has_more': 'bool' + } + + attribute_map = { + 'transactions': 'transactions', + 'has_more': 'hasMore' + } + + def __init__(self, transactions=None, has_more=None, _configuration=None): # noqa: E501 + """ListBillingAccountTransactionsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._transactions = None + self._has_more = None + self.discriminator = None + + self.transactions = transactions + self.has_more = has_more + + @property + def transactions(self): + """Gets the transactions of this ListBillingAccountTransactionsResponse. # noqa: E501 + + + :return: The transactions of this ListBillingAccountTransactionsResponse. # noqa: E501 + :rtype: list[Transaction] + """ + return self._transactions + + @transactions.setter + def transactions(self, transactions): + """Sets the transactions of this ListBillingAccountTransactionsResponse. + + + :param transactions: The transactions of this ListBillingAccountTransactionsResponse. # noqa: E501 + :type: list[Transaction] + """ + if self._configuration.client_side_validation and transactions is None: + raise ValueError("Invalid value for `transactions`, must not be `None`") # noqa: E501 + + self._transactions = transactions + + @property + def has_more(self): + """Gets the has_more of this ListBillingAccountTransactionsResponse. # noqa: E501 + + + :return: The has_more of this ListBillingAccountTransactionsResponse. # noqa: E501 + :rtype: bool + """ + return self._has_more + + @has_more.setter + def has_more(self, has_more): + """Sets the has_more of this ListBillingAccountTransactionsResponse. + + + :param has_more: The has_more of this ListBillingAccountTransactionsResponse. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and has_more is None: + raise ValueError("Invalid value for `has_more`, must not be `None`") # noqa: E501 + + self._has_more = has_more + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListBillingAccountTransactionsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBillingAccountTransactionsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListBillingAccountTransactionsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_billing_accounts_response.py b/docs/cudo_compute/models/list_billing_accounts_response.py new file mode 100644 index 0000000..ce27991 --- /dev/null +++ b/docs/cudo_compute/models/list_billing_accounts_response.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListBillingAccountsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'billing_accounts': 'list[BillingAccount]', + 'page_token': 'str', + 'page_size': 'int' + } + + attribute_map = { + 'billing_accounts': 'billingAccounts', + 'page_token': 'pageToken', + 'page_size': 'pageSize' + } + + def __init__(self, billing_accounts=None, page_token=None, page_size=None, _configuration=None): # noqa: E501 + """ListBillingAccountsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._billing_accounts = None + self._page_token = None + self._page_size = None + self.discriminator = None + + self.billing_accounts = billing_accounts + self.page_token = page_token + self.page_size = page_size + + @property + def billing_accounts(self): + """Gets the billing_accounts of this ListBillingAccountsResponse. # noqa: E501 + + + :return: The billing_accounts of this ListBillingAccountsResponse. # noqa: E501 + :rtype: list[BillingAccount] + """ + return self._billing_accounts + + @billing_accounts.setter + def billing_accounts(self, billing_accounts): + """Sets the billing_accounts of this ListBillingAccountsResponse. + + + :param billing_accounts: The billing_accounts of this ListBillingAccountsResponse. # noqa: E501 + :type: list[BillingAccount] + """ + if self._configuration.client_side_validation and billing_accounts is None: + raise ValueError("Invalid value for `billing_accounts`, must not be `None`") # noqa: E501 + + self._billing_accounts = billing_accounts + + @property + def page_token(self): + """Gets the page_token of this ListBillingAccountsResponse. # noqa: E501 + + + :return: The page_token of this ListBillingAccountsResponse. # noqa: E501 + :rtype: str + """ + return self._page_token + + @page_token.setter + def page_token(self, page_token): + """Sets the page_token of this ListBillingAccountsResponse. + + + :param page_token: The page_token of this ListBillingAccountsResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and page_token is None: + raise ValueError("Invalid value for `page_token`, must not be `None`") # noqa: E501 + + self._page_token = page_token + + @property + def page_size(self): + """Gets the page_size of this ListBillingAccountsResponse. # noqa: E501 + + + :return: The page_size of this ListBillingAccountsResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListBillingAccountsResponse. + + + :param page_size: The page_size of this ListBillingAccountsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListBillingAccountsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListBillingAccountsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListBillingAccountsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_clusters_response.py b/docs/cudo_compute/models/list_clusters_response.py new file mode 100644 index 0000000..dc6dc36 --- /dev/null +++ b/docs/cudo_compute/models/list_clusters_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListClustersResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'clusters': 'list[Cluster]' + } + + attribute_map = { + 'clusters': 'clusters' + } + + def __init__(self, clusters=None, _configuration=None): # noqa: E501 + """ListClustersResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._clusters = None + self.discriminator = None + + self.clusters = clusters + + @property + def clusters(self): + """Gets the clusters of this ListClustersResponse. # noqa: E501 + + + :return: The clusters of this ListClustersResponse. # noqa: E501 + :rtype: list[Cluster] + """ + return self._clusters + + @clusters.setter + def clusters(self, clusters): + """Sets the clusters of this ListClustersResponse. + + + :param clusters: The clusters of this ListClustersResponse. # noqa: E501 + :type: list[Cluster] + """ + if self._configuration.client_side_validation and clusters is None: + raise ValueError("Invalid value for `clusters`, must not be `None`") # noqa: E501 + + self._clusters = clusters + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListClustersResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListClustersResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListClustersResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_data_center_machine_type_prices_response.py b/docs/cudo_compute/models/list_data_center_machine_type_prices_response.py new file mode 100644 index 0000000..1737bb3 --- /dev/null +++ b/docs/cudo_compute/models/list_data_center_machine_type_prices_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListDataCenterMachineTypePricesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'prices': 'list[ListDataCenterMachineTypePricesResponseMachineTypePrice]' + } + + attribute_map = { + 'prices': 'prices' + } + + def __init__(self, prices=None, _configuration=None): # noqa: E501 + """ListDataCenterMachineTypePricesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._prices = None + self.discriminator = None + + self.prices = prices + + @property + def prices(self): + """Gets the prices of this ListDataCenterMachineTypePricesResponse. # noqa: E501 + + + :return: The prices of this ListDataCenterMachineTypePricesResponse. # noqa: E501 + :rtype: list[ListDataCenterMachineTypePricesResponseMachineTypePrice] + """ + return self._prices + + @prices.setter + def prices(self, prices): + """Sets the prices of this ListDataCenterMachineTypePricesResponse. + + + :param prices: The prices of this ListDataCenterMachineTypePricesResponse. # noqa: E501 + :type: list[ListDataCenterMachineTypePricesResponseMachineTypePrice] + """ + if self._configuration.client_side_validation and prices is None: + raise ValueError("Invalid value for `prices`, must not be `None`") # noqa: E501 + + self._prices = prices + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListDataCenterMachineTypePricesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListDataCenterMachineTypePricesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListDataCenterMachineTypePricesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_data_center_machine_type_prices_response_machine_type_price.py b/docs/cudo_compute/models/list_data_center_machine_type_prices_response_machine_type_price.py new file mode 100644 index 0000000..508c492 --- /dev/null +++ b/docs/cudo_compute/models/list_data_center_machine_type_prices_response_machine_type_price.py @@ -0,0 +1,259 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListDataCenterMachineTypePricesResponseMachineTypePrice(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'uid': 'str', + 'machine_type': 'str', + 'commitment_term': 'str', + 'gpu_price_hr': 'Decimal', + 'vcpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal' + } + + attribute_map = { + 'uid': 'uid', + 'machine_type': 'machineType', + 'commitment_term': 'commitmentTerm', + 'gpu_price_hr': 'gpuPriceHr', + 'vcpu_price_hr': 'vcpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr' + } + + def __init__(self, uid=None, machine_type=None, commitment_term=None, gpu_price_hr=None, vcpu_price_hr=None, memory_gib_price_hr=None, _configuration=None): # noqa: E501 + """ListDataCenterMachineTypePricesResponseMachineTypePrice - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._uid = None + self._machine_type = None + self._commitment_term = None + self._gpu_price_hr = None + self._vcpu_price_hr = None + self._memory_gib_price_hr = None + self.discriminator = None + + self.uid = uid + self.machine_type = machine_type + self.commitment_term = commitment_term + self.gpu_price_hr = gpu_price_hr + self.vcpu_price_hr = vcpu_price_hr + self.memory_gib_price_hr = memory_gib_price_hr + + @property + def uid(self): + """Gets the uid of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + + + :return: The uid of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this ListDataCenterMachineTypePricesResponseMachineTypePrice. + + + :param uid: The uid of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and uid is None: + raise ValueError("Invalid value for `uid`, must not be `None`") # noqa: E501 + + self._uid = uid + + @property + def machine_type(self): + """Gets the machine_type of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + + + :return: The machine_type of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this ListDataCenterMachineTypePricesResponseMachineTypePrice. + + + :param machine_type: The machine_type of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def commitment_term(self): + """Gets the commitment_term of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + + + :return: The commitment_term of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :rtype: str + """ + return self._commitment_term + + @commitment_term.setter + def commitment_term(self, commitment_term): + """Sets the commitment_term of this ListDataCenterMachineTypePricesResponseMachineTypePrice. + + + :param commitment_term: The commitment_term of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and commitment_term is None: + raise ValueError("Invalid value for `commitment_term`, must not be `None`") # noqa: E501 + + self._commitment_term = commitment_term + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + + + :return: The gpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. + + + :param gpu_price_hr: The gpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and gpu_price_hr is None: + raise ValueError("Invalid value for `gpu_price_hr`, must not be `None`") # noqa: E501 + + self._gpu_price_hr = gpu_price_hr + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + + + :return: The vcpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. + + + :param vcpu_price_hr: The vcpu_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and vcpu_price_hr is None: + raise ValueError("Invalid value for `vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._vcpu_price_hr = vcpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + + + :return: The memory_gib_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this ListDataCenterMachineTypePricesResponseMachineTypePrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and memory_gib_price_hr is None: + raise ValueError("Invalid value for `memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._memory_gib_price_hr = memory_gib_price_hr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListDataCenterMachineTypePricesResponseMachineTypePrice, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListDataCenterMachineTypePricesResponseMachineTypePrice): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListDataCenterMachineTypePricesResponseMachineTypePrice): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_data_centers_response.py b/docs/cudo_compute/models/list_data_centers_response.py new file mode 100644 index 0000000..3fd2720 --- /dev/null +++ b/docs/cudo_compute/models/list_data_centers_response.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListDataCentersResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_centers': 'list[V1DataCenter]', + 'page_token': 'str', + 'page_size': 'int' + } + + attribute_map = { + 'data_centers': 'dataCenters', + 'page_token': 'pageToken', + 'page_size': 'pageSize' + } + + def __init__(self, data_centers=None, page_token=None, page_size=None, _configuration=None): # noqa: E501 + """ListDataCentersResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_centers = None + self._page_token = None + self._page_size = None + self.discriminator = None + + self.data_centers = data_centers + self.page_token = page_token + self.page_size = page_size + + @property + def data_centers(self): + """Gets the data_centers of this ListDataCentersResponse. # noqa: E501 + + + :return: The data_centers of this ListDataCentersResponse. # noqa: E501 + :rtype: list[V1DataCenter] + """ + return self._data_centers + + @data_centers.setter + def data_centers(self, data_centers): + """Sets the data_centers of this ListDataCentersResponse. + + + :param data_centers: The data_centers of this ListDataCentersResponse. # noqa: E501 + :type: list[V1DataCenter] + """ + if self._configuration.client_side_validation and data_centers is None: + raise ValueError("Invalid value for `data_centers`, must not be `None`") # noqa: E501 + + self._data_centers = data_centers + + @property + def page_token(self): + """Gets the page_token of this ListDataCentersResponse. # noqa: E501 + + + :return: The page_token of this ListDataCentersResponse. # noqa: E501 + :rtype: str + """ + return self._page_token + + @page_token.setter + def page_token(self, page_token): + """Sets the page_token of this ListDataCentersResponse. + + + :param page_token: The page_token of this ListDataCentersResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and page_token is None: + raise ValueError("Invalid value for `page_token`, must not be `None`") # noqa: E501 + + self._page_token = page_token + + @property + def page_size(self): + """Gets the page_size of this ListDataCentersResponse. # noqa: E501 + + + :return: The page_size of this ListDataCentersResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListDataCentersResponse. + + + :param page_size: The page_size of this ListDataCentersResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListDataCentersResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListDataCentersResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListDataCentersResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_disk_snapshots_response.py b/docs/cudo_compute/models/list_disk_snapshots_response.py new file mode 100644 index 0000000..97553ea --- /dev/null +++ b/docs/cudo_compute/models/list_disk_snapshots_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListDiskSnapshotsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'snapshots': 'list[Snapshot]' + } + + attribute_map = { + 'snapshots': 'snapshots' + } + + def __init__(self, snapshots=None, _configuration=None): # noqa: E501 + """ListDiskSnapshotsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._snapshots = None + self.discriminator = None + + self.snapshots = snapshots + + @property + def snapshots(self): + """Gets the snapshots of this ListDiskSnapshotsResponse. # noqa: E501 + + + :return: The snapshots of this ListDiskSnapshotsResponse. # noqa: E501 + :rtype: list[Snapshot] + """ + return self._snapshots + + @snapshots.setter + def snapshots(self, snapshots): + """Sets the snapshots of this ListDiskSnapshotsResponse. + + + :param snapshots: The snapshots of this ListDiskSnapshotsResponse. # noqa: E501 + :type: list[Snapshot] + """ + if self._configuration.client_side_validation and snapshots is None: + raise ValueError("Invalid value for `snapshots`, must not be `None`") # noqa: E501 + + self._snapshots = snapshots + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListDiskSnapshotsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListDiskSnapshotsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListDiskSnapshotsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_disks_response.py b/docs/cudo_compute/models/list_disks_response.py new file mode 100644 index 0000000..c277ab9 --- /dev/null +++ b/docs/cudo_compute/models/list_disks_response.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListDisksResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'disks': 'list[Disk]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'disks': 'disks', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, disks=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListDisksResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._disks = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + if disks is not None: + self.disks = disks + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def disks(self): + """Gets the disks of this ListDisksResponse. # noqa: E501 + + + :return: The disks of this ListDisksResponse. # noqa: E501 + :rtype: list[Disk] + """ + return self._disks + + @disks.setter + def disks(self, disks): + """Sets the disks of this ListDisksResponse. + + + :param disks: The disks of this ListDisksResponse. # noqa: E501 + :type: list[Disk] + """ + + self._disks = disks + + @property + def total_count(self): + """Gets the total_count of this ListDisksResponse. # noqa: E501 + + + :return: The total_count of this ListDisksResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListDisksResponse. + + + :param total_count: The total_count of this ListDisksResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListDisksResponse. # noqa: E501 + + + :return: The page_number of this ListDisksResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListDisksResponse. + + + :param page_number: The page_number of this ListDisksResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListDisksResponse. # noqa: E501 + + + :return: The page_size of this ListDisksResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListDisksResponse. + + + :param page_size: The page_size of this ListDisksResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListDisksResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListDisksResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListDisksResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_hosts_response.py b/docs/cudo_compute/models/list_hosts_response.py new file mode 100644 index 0000000..151a405 --- /dev/null +++ b/docs/cudo_compute/models/list_hosts_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListHostsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'hosts': 'list[Host]' + } + + attribute_map = { + 'hosts': 'hosts' + } + + def __init__(self, hosts=None, _configuration=None): # noqa: E501 + """ListHostsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._hosts = None + self.discriminator = None + + self.hosts = hosts + + @property + def hosts(self): + """Gets the hosts of this ListHostsResponse. # noqa: E501 + + + :return: The hosts of this ListHostsResponse. # noqa: E501 + :rtype: list[Host] + """ + return self._hosts + + @hosts.setter + def hosts(self, hosts): + """Sets the hosts of this ListHostsResponse. + + + :param hosts: The hosts of this ListHostsResponse. # noqa: E501 + :type: list[Host] + """ + if self._configuration.client_side_validation and hosts is None: + raise ValueError("Invalid value for `hosts`, must not be `None`") # noqa: E501 + + self._hosts = hosts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListHostsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListHostsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListHostsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_machine_types_response.py b/docs/cudo_compute/models/list_machine_types_response.py new file mode 100644 index 0000000..6ed3191 --- /dev/null +++ b/docs/cudo_compute/models/list_machine_types_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListMachineTypesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'machine_types': 'list[DataCenterMachineType]' + } + + attribute_map = { + 'machine_types': 'machineTypes' + } + + def __init__(self, machine_types=None, _configuration=None): # noqa: E501 + """ListMachineTypesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._machine_types = None + self.discriminator = None + + self.machine_types = machine_types + + @property + def machine_types(self): + """Gets the machine_types of this ListMachineTypesResponse. # noqa: E501 + + + :return: The machine_types of this ListMachineTypesResponse. # noqa: E501 + :rtype: list[DataCenterMachineType] + """ + return self._machine_types + + @machine_types.setter + def machine_types(self, machine_types): + """Sets the machine_types of this ListMachineTypesResponse. + + + :param machine_types: The machine_types of this ListMachineTypesResponse. # noqa: E501 + :type: list[DataCenterMachineType] + """ + if self._configuration.client_side_validation and machine_types is None: + raise ValueError("Invalid value for `machine_types`, must not be `None`") # noqa: E501 + + self._machine_types = machine_types + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListMachineTypesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListMachineTypesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListMachineTypesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_networks_response.py b/docs/cudo_compute/models/list_networks_response.py new file mode 100644 index 0000000..dda9619 --- /dev/null +++ b/docs/cudo_compute/models/list_networks_response.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListNetworksResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'networks': 'list[Network]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'networks': 'networks', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, networks=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListNetworksResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._networks = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + self.networks = networks + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def networks(self): + """Gets the networks of this ListNetworksResponse. # noqa: E501 + + + :return: The networks of this ListNetworksResponse. # noqa: E501 + :rtype: list[Network] + """ + return self._networks + + @networks.setter + def networks(self, networks): + """Sets the networks of this ListNetworksResponse. + + + :param networks: The networks of this ListNetworksResponse. # noqa: E501 + :type: list[Network] + """ + if self._configuration.client_side_validation and networks is None: + raise ValueError("Invalid value for `networks`, must not be `None`") # noqa: E501 + + self._networks = networks + + @property + def total_count(self): + """Gets the total_count of this ListNetworksResponse. # noqa: E501 + + + :return: The total_count of this ListNetworksResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListNetworksResponse. + + + :param total_count: The total_count of this ListNetworksResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListNetworksResponse. # noqa: E501 + + + :return: The page_number of this ListNetworksResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListNetworksResponse. + + + :param page_number: The page_number of this ListNetworksResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListNetworksResponse. # noqa: E501 + + + :return: The page_size of this ListNetworksResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListNetworksResponse. + + + :param page_size: The page_size of this ListNetworksResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListNetworksResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListNetworksResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListNetworksResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_object_storage_buckets_response.py b/docs/cudo_compute/models/list_object_storage_buckets_response.py new file mode 100644 index 0000000..d43ef04 --- /dev/null +++ b/docs/cudo_compute/models/list_object_storage_buckets_response.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListObjectStorageBucketsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'buckets': 'list[ObjectStorageBucket]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'buckets': 'buckets', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, buckets=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListObjectStorageBucketsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._buckets = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + self.buckets = buckets + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def buckets(self): + """Gets the buckets of this ListObjectStorageBucketsResponse. # noqa: E501 + + + :return: The buckets of this ListObjectStorageBucketsResponse. # noqa: E501 + :rtype: list[ObjectStorageBucket] + """ + return self._buckets + + @buckets.setter + def buckets(self, buckets): + """Sets the buckets of this ListObjectStorageBucketsResponse. + + + :param buckets: The buckets of this ListObjectStorageBucketsResponse. # noqa: E501 + :type: list[ObjectStorageBucket] + """ + if self._configuration.client_side_validation and buckets is None: + raise ValueError("Invalid value for `buckets`, must not be `None`") # noqa: E501 + + self._buckets = buckets + + @property + def total_count(self): + """Gets the total_count of this ListObjectStorageBucketsResponse. # noqa: E501 + + + :return: The total_count of this ListObjectStorageBucketsResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListObjectStorageBucketsResponse. + + + :param total_count: The total_count of this ListObjectStorageBucketsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListObjectStorageBucketsResponse. # noqa: E501 + + + :return: The page_number of this ListObjectStorageBucketsResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListObjectStorageBucketsResponse. + + + :param page_number: The page_number of this ListObjectStorageBucketsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListObjectStorageBucketsResponse. # noqa: E501 + + + :return: The page_size of this ListObjectStorageBucketsResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListObjectStorageBucketsResponse. + + + :param page_size: The page_size of this ListObjectStorageBucketsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListObjectStorageBucketsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListObjectStorageBucketsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListObjectStorageBucketsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_object_storage_users_response.py b/docs/cudo_compute/models/list_object_storage_users_response.py new file mode 100644 index 0000000..be485c0 --- /dev/null +++ b/docs/cudo_compute/models/list_object_storage_users_response.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListObjectStorageUsersResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'users': 'list[ObjectStorageUser]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'users': 'users', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, users=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListObjectStorageUsersResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._users = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + self.users = users + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def users(self): + """Gets the users of this ListObjectStorageUsersResponse. # noqa: E501 + + + :return: The users of this ListObjectStorageUsersResponse. # noqa: E501 + :rtype: list[ObjectStorageUser] + """ + return self._users + + @users.setter + def users(self, users): + """Sets the users of this ListObjectStorageUsersResponse. + + + :param users: The users of this ListObjectStorageUsersResponse. # noqa: E501 + :type: list[ObjectStorageUser] + """ + if self._configuration.client_side_validation and users is None: + raise ValueError("Invalid value for `users`, must not be `None`") # noqa: E501 + + self._users = users + + @property + def total_count(self): + """Gets the total_count of this ListObjectStorageUsersResponse. # noqa: E501 + + + :return: The total_count of this ListObjectStorageUsersResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListObjectStorageUsersResponse. + + + :param total_count: The total_count of this ListObjectStorageUsersResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListObjectStorageUsersResponse. # noqa: E501 + + + :return: The page_number of this ListObjectStorageUsersResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListObjectStorageUsersResponse. + + + :param page_number: The page_number of this ListObjectStorageUsersResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListObjectStorageUsersResponse. # noqa: E501 + + + :return: The page_size of this ListObjectStorageUsersResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListObjectStorageUsersResponse. + + + :param page_size: The page_size of this ListObjectStorageUsersResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListObjectStorageUsersResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListObjectStorageUsersResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListObjectStorageUsersResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_outstanding_invoices_response.py b/docs/cudo_compute/models/list_outstanding_invoices_response.py new file mode 100644 index 0000000..4113aaa --- /dev/null +++ b/docs/cudo_compute/models/list_outstanding_invoices_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListOutstandingInvoicesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'invoices': 'list[Invoice]' + } + + attribute_map = { + 'invoices': 'invoices' + } + + def __init__(self, invoices=None, _configuration=None): # noqa: E501 + """ListOutstandingInvoicesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._invoices = None + self.discriminator = None + + self.invoices = invoices + + @property + def invoices(self): + """Gets the invoices of this ListOutstandingInvoicesResponse. # noqa: E501 + + + :return: The invoices of this ListOutstandingInvoicesResponse. # noqa: E501 + :rtype: list[Invoice] + """ + return self._invoices + + @invoices.setter + def invoices(self, invoices): + """Sets the invoices of this ListOutstandingInvoicesResponse. + + + :param invoices: The invoices of this ListOutstandingInvoicesResponse. # noqa: E501 + :type: list[Invoice] + """ + if self._configuration.client_side_validation and invoices is None: + raise ValueError("Invalid value for `invoices`, must not be `None`") # noqa: E501 + + self._invoices = invoices + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListOutstandingInvoicesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListOutstandingInvoicesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListOutstandingInvoicesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_private_vm_images_response.py b/docs/cudo_compute/models/list_private_vm_images_response.py new file mode 100644 index 0000000..04fbf3d --- /dev/null +++ b/docs/cudo_compute/models/list_private_vm_images_response.py @@ -0,0 +1,204 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListPrivateVMImagesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'images': 'list[PrivateImage]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'images': 'images', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, images=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListPrivateVMImagesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._images = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + if images is not None: + self.images = images + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def images(self): + """Gets the images of this ListPrivateVMImagesResponse. # noqa: E501 + + + :return: The images of this ListPrivateVMImagesResponse. # noqa: E501 + :rtype: list[PrivateImage] + """ + return self._images + + @images.setter + def images(self, images): + """Sets the images of this ListPrivateVMImagesResponse. + + + :param images: The images of this ListPrivateVMImagesResponse. # noqa: E501 + :type: list[PrivateImage] + """ + + self._images = images + + @property + def total_count(self): + """Gets the total_count of this ListPrivateVMImagesResponse. # noqa: E501 + + + :return: The total_count of this ListPrivateVMImagesResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListPrivateVMImagesResponse. + + + :param total_count: The total_count of this ListPrivateVMImagesResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListPrivateVMImagesResponse. # noqa: E501 + + + :return: The page_number of this ListPrivateVMImagesResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListPrivateVMImagesResponse. + + + :param page_number: The page_number of this ListPrivateVMImagesResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListPrivateVMImagesResponse. # noqa: E501 + + + :return: The page_size of this ListPrivateVMImagesResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListPrivateVMImagesResponse. + + + :param page_size: The page_size of this ListPrivateVMImagesResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListPrivateVMImagesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListPrivateVMImagesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListPrivateVMImagesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_project_ssh_keys_response.py b/docs/cudo_compute/models/list_project_ssh_keys_response.py new file mode 100644 index 0000000..c8408a4 --- /dev/null +++ b/docs/cudo_compute/models/list_project_ssh_keys_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListProjectSshKeysResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'ssh_keys': 'list[SshKey]' + } + + attribute_map = { + 'ssh_keys': 'sshKeys' + } + + def __init__(self, ssh_keys=None, _configuration=None): # noqa: E501 + """ListProjectSshKeysResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._ssh_keys = None + self.discriminator = None + + self.ssh_keys = ssh_keys + + @property + def ssh_keys(self): + """Gets the ssh_keys of this ListProjectSshKeysResponse. # noqa: E501 + + + :return: The ssh_keys of this ListProjectSshKeysResponse. # noqa: E501 + :rtype: list[SshKey] + """ + return self._ssh_keys + + @ssh_keys.setter + def ssh_keys(self, ssh_keys): + """Sets the ssh_keys of this ListProjectSshKeysResponse. + + + :param ssh_keys: The ssh_keys of this ListProjectSshKeysResponse. # noqa: E501 + :type: list[SshKey] + """ + if self._configuration.client_side_validation and ssh_keys is None: + raise ValueError("Invalid value for `ssh_keys`, must not be `None`") # noqa: E501 + + self._ssh_keys = ssh_keys + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListProjectSshKeysResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProjectSshKeysResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListProjectSshKeysResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_projects_response.py b/docs/cudo_compute/models/list_projects_response.py new file mode 100644 index 0000000..3faac76 --- /dev/null +++ b/docs/cudo_compute/models/list_projects_response.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListProjectsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'projects': 'list[Project]', + 'page_token': 'str', + 'page_size': 'int' + } + + attribute_map = { + 'projects': 'projects', + 'page_token': 'pageToken', + 'page_size': 'pageSize' + } + + def __init__(self, projects=None, page_token=None, page_size=None, _configuration=None): # noqa: E501 + """ListProjectsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._projects = None + self._page_token = None + self._page_size = None + self.discriminator = None + + self.projects = projects + self.page_token = page_token + self.page_size = page_size + + @property + def projects(self): + """Gets the projects of this ListProjectsResponse. # noqa: E501 + + + :return: The projects of this ListProjectsResponse. # noqa: E501 + :rtype: list[Project] + """ + return self._projects + + @projects.setter + def projects(self, projects): + """Sets the projects of this ListProjectsResponse. + + + :param projects: The projects of this ListProjectsResponse. # noqa: E501 + :type: list[Project] + """ + if self._configuration.client_side_validation and projects is None: + raise ValueError("Invalid value for `projects`, must not be `None`") # noqa: E501 + + self._projects = projects + + @property + def page_token(self): + """Gets the page_token of this ListProjectsResponse. # noqa: E501 + + + :return: The page_token of this ListProjectsResponse. # noqa: E501 + :rtype: str + """ + return self._page_token + + @page_token.setter + def page_token(self, page_token): + """Sets the page_token of this ListProjectsResponse. + + + :param page_token: The page_token of this ListProjectsResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and page_token is None: + raise ValueError("Invalid value for `page_token`, must not be `None`") # noqa: E501 + + self._page_token = page_token + + @property + def page_size(self): + """Gets the page_size of this ListProjectsResponse. # noqa: E501 + + + :return: The page_size of this ListProjectsResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListProjectsResponse. + + + :param page_size: The page_size of this ListProjectsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListProjectsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListProjectsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListProjectsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_public_vm_images_response.py b/docs/cudo_compute/models/list_public_vm_images_response.py new file mode 100644 index 0000000..ffcb617 --- /dev/null +++ b/docs/cudo_compute/models/list_public_vm_images_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListPublicVMImagesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'images': 'list[Image]' + } + + attribute_map = { + 'images': 'images' + } + + def __init__(self, images=None, _configuration=None): # noqa: E501 + """ListPublicVMImagesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._images = None + self.discriminator = None + + self.images = images + + @property + def images(self): + """Gets the images of this ListPublicVMImagesResponse. # noqa: E501 + + + :return: The images of this ListPublicVMImagesResponse. # noqa: E501 + :rtype: list[Image] + """ + return self._images + + @images.setter + def images(self, images): + """Sets the images of this ListPublicVMImagesResponse. + + + :param images: The images of this ListPublicVMImagesResponse. # noqa: E501 + :type: list[Image] + """ + if self._configuration.client_side_validation and images is None: + raise ValueError("Invalid value for `images`, must not be `None`") # noqa: E501 + + self._images = images + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListPublicVMImagesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListPublicVMImagesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListPublicVMImagesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_regions_response.py b/docs/cudo_compute/models/list_regions_response.py new file mode 100644 index 0000000..c7d8503 --- /dev/null +++ b/docs/cudo_compute/models/list_regions_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListRegionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'regions': 'list[Region]' + } + + attribute_map = { + 'regions': 'regions' + } + + def __init__(self, regions=None, _configuration=None): # noqa: E501 + """ListRegionsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._regions = None + self.discriminator = None + + self.regions = regions + + @property + def regions(self): + """Gets the regions of this ListRegionsResponse. # noqa: E501 + + + :return: The regions of this ListRegionsResponse. # noqa: E501 + :rtype: list[Region] + """ + return self._regions + + @regions.setter + def regions(self, regions): + """Sets the regions of this ListRegionsResponse. + + + :param regions: The regions of this ListRegionsResponse. # noqa: E501 + :type: list[Region] + """ + if self._configuration.client_side_validation and regions is None: + raise ValueError("Invalid value for `regions`, must not be `None`") # noqa: E501 + + self._regions = regions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListRegionsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListRegionsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListRegionsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_security_groups_response.py b/docs/cudo_compute/models/list_security_groups_response.py new file mode 100644 index 0000000..6067e05 --- /dev/null +++ b/docs/cudo_compute/models/list_security_groups_response.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListSecurityGroupsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'security_groups': 'list[SecurityGroup]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'security_groups': 'securityGroups', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, security_groups=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListSecurityGroupsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._security_groups = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + self.security_groups = security_groups + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def security_groups(self): + """Gets the security_groups of this ListSecurityGroupsResponse. # noqa: E501 + + + :return: The security_groups of this ListSecurityGroupsResponse. # noqa: E501 + :rtype: list[SecurityGroup] + """ + return self._security_groups + + @security_groups.setter + def security_groups(self, security_groups): + """Sets the security_groups of this ListSecurityGroupsResponse. + + + :param security_groups: The security_groups of this ListSecurityGroupsResponse. # noqa: E501 + :type: list[SecurityGroup] + """ + if self._configuration.client_side_validation and security_groups is None: + raise ValueError("Invalid value for `security_groups`, must not be `None`") # noqa: E501 + + self._security_groups = security_groups + + @property + def total_count(self): + """Gets the total_count of this ListSecurityGroupsResponse. # noqa: E501 + + + :return: The total_count of this ListSecurityGroupsResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListSecurityGroupsResponse. + + + :param total_count: The total_count of this ListSecurityGroupsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListSecurityGroupsResponse. # noqa: E501 + + + :return: The page_number of this ListSecurityGroupsResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListSecurityGroupsResponse. + + + :param page_number: The page_number of this ListSecurityGroupsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListSecurityGroupsResponse. # noqa: E501 + + + :return: The page_size of this ListSecurityGroupsResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListSecurityGroupsResponse. + + + :param page_size: The page_size of this ListSecurityGroupsResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListSecurityGroupsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListSecurityGroupsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListSecurityGroupsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_ssh_keys_response.py b/docs/cudo_compute/models/list_ssh_keys_response.py new file mode 100644 index 0000000..09343ed --- /dev/null +++ b/docs/cudo_compute/models/list_ssh_keys_response.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListSshKeysResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'ssh_keys': 'list[SshKey]', + 'total_count': 'int', + 'page_number': 'int', + 'page_size': 'int' + } + + attribute_map = { + 'ssh_keys': 'sshKeys', + 'total_count': 'totalCount', + 'page_number': 'pageNumber', + 'page_size': 'pageSize' + } + + def __init__(self, ssh_keys=None, total_count=None, page_number=None, page_size=None, _configuration=None): # noqa: E501 + """ListSshKeysResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._ssh_keys = None + self._total_count = None + self._page_number = None + self._page_size = None + self.discriminator = None + + self.ssh_keys = ssh_keys + self.total_count = total_count + self.page_number = page_number + self.page_size = page_size + + @property + def ssh_keys(self): + """Gets the ssh_keys of this ListSshKeysResponse. # noqa: E501 + + + :return: The ssh_keys of this ListSshKeysResponse. # noqa: E501 + :rtype: list[SshKey] + """ + return self._ssh_keys + + @ssh_keys.setter + def ssh_keys(self, ssh_keys): + """Sets the ssh_keys of this ListSshKeysResponse. + + + :param ssh_keys: The ssh_keys of this ListSshKeysResponse. # noqa: E501 + :type: list[SshKey] + """ + if self._configuration.client_side_validation and ssh_keys is None: + raise ValueError("Invalid value for `ssh_keys`, must not be `None`") # noqa: E501 + + self._ssh_keys = ssh_keys + + @property + def total_count(self): + """Gets the total_count of this ListSshKeysResponse. # noqa: E501 + + + :return: The total_count of this ListSshKeysResponse. # noqa: E501 + :rtype: int + """ + return self._total_count + + @total_count.setter + def total_count(self, total_count): + """Sets the total_count of this ListSshKeysResponse. + + + :param total_count: The total_count of this ListSshKeysResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_count is None: + raise ValueError("Invalid value for `total_count`, must not be `None`") # noqa: E501 + + self._total_count = total_count + + @property + def page_number(self): + """Gets the page_number of this ListSshKeysResponse. # noqa: E501 + + + :return: The page_number of this ListSshKeysResponse. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this ListSshKeysResponse. + + + :param page_number: The page_number of this ListSshKeysResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_number is None: + raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501 + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this ListSshKeysResponse. # noqa: E501 + + + :return: The page_size of this ListSshKeysResponse. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this ListSshKeysResponse. + + + :param page_size: The page_size of this ListSshKeysResponse. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and page_size is None: + raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501 + + self._page_size = page_size + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListSshKeysResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListSshKeysResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListSshKeysResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_user_permissions_response.py b/docs/cudo_compute/models/list_user_permissions_response.py new file mode 100644 index 0000000..881d68a --- /dev/null +++ b/docs/cudo_compute/models/list_user_permissions_response.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListUserPermissionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_permissions': 'list[UserPermission]', + 'data_center_permissions': 'list[UserPermission]', + 'billing_account_permissions': 'list[UserPermission]' + } + + attribute_map = { + 'project_permissions': 'projectPermissions', + 'data_center_permissions': 'dataCenterPermissions', + 'billing_account_permissions': 'billingAccountPermissions' + } + + def __init__(self, project_permissions=None, data_center_permissions=None, billing_account_permissions=None, _configuration=None): # noqa: E501 + """ListUserPermissionsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_permissions = None + self._data_center_permissions = None + self._billing_account_permissions = None + self.discriminator = None + + self.project_permissions = project_permissions + self.data_center_permissions = data_center_permissions + self.billing_account_permissions = billing_account_permissions + + @property + def project_permissions(self): + """Gets the project_permissions of this ListUserPermissionsResponse. # noqa: E501 + + + :return: The project_permissions of this ListUserPermissionsResponse. # noqa: E501 + :rtype: list[UserPermission] + """ + return self._project_permissions + + @project_permissions.setter + def project_permissions(self, project_permissions): + """Sets the project_permissions of this ListUserPermissionsResponse. + + + :param project_permissions: The project_permissions of this ListUserPermissionsResponse. # noqa: E501 + :type: list[UserPermission] + """ + if self._configuration.client_side_validation and project_permissions is None: + raise ValueError("Invalid value for `project_permissions`, must not be `None`") # noqa: E501 + + self._project_permissions = project_permissions + + @property + def data_center_permissions(self): + """Gets the data_center_permissions of this ListUserPermissionsResponse. # noqa: E501 + + + :return: The data_center_permissions of this ListUserPermissionsResponse. # noqa: E501 + :rtype: list[UserPermission] + """ + return self._data_center_permissions + + @data_center_permissions.setter + def data_center_permissions(self, data_center_permissions): + """Sets the data_center_permissions of this ListUserPermissionsResponse. + + + :param data_center_permissions: The data_center_permissions of this ListUserPermissionsResponse. # noqa: E501 + :type: list[UserPermission] + """ + if self._configuration.client_side_validation and data_center_permissions is None: + raise ValueError("Invalid value for `data_center_permissions`, must not be `None`") # noqa: E501 + + self._data_center_permissions = data_center_permissions + + @property + def billing_account_permissions(self): + """Gets the billing_account_permissions of this ListUserPermissionsResponse. # noqa: E501 + + + :return: The billing_account_permissions of this ListUserPermissionsResponse. # noqa: E501 + :rtype: list[UserPermission] + """ + return self._billing_account_permissions + + @billing_account_permissions.setter + def billing_account_permissions(self, billing_account_permissions): + """Sets the billing_account_permissions of this ListUserPermissionsResponse. + + + :param billing_account_permissions: The billing_account_permissions of this ListUserPermissionsResponse. # noqa: E501 + :type: list[UserPermission] + """ + if self._configuration.client_side_validation and billing_account_permissions is None: + raise ValueError("Invalid value for `billing_account_permissions`, must not be `None`") # noqa: E501 + + self._billing_account_permissions = billing_account_permissions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListUserPermissionsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListUserPermissionsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListUserPermissionsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vm_data_centers_response.py b/docs/cudo_compute/models/list_vm_data_centers_response.py new file mode 100644 index 0000000..6ca5ab2 --- /dev/null +++ b/docs/cudo_compute/models/list_vm_data_centers_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMDataCentersResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_centers': 'list[VMDataCenter]' + } + + attribute_map = { + 'data_centers': 'dataCenters' + } + + def __init__(self, data_centers=None, _configuration=None): # noqa: E501 + """ListVMDataCentersResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_centers = None + self.discriminator = None + + self.data_centers = data_centers + + @property + def data_centers(self): + """Gets the data_centers of this ListVMDataCentersResponse. # noqa: E501 + + + :return: The data_centers of this ListVMDataCentersResponse. # noqa: E501 + :rtype: list[VMDataCenter] + """ + return self._data_centers + + @data_centers.setter + def data_centers(self, data_centers): + """Sets the data_centers of this ListVMDataCentersResponse. + + + :param data_centers: The data_centers of this ListVMDataCentersResponse. # noqa: E501 + :type: list[VMDataCenter] + """ + if self._configuration.client_side_validation and data_centers is None: + raise ValueError("Invalid value for `data_centers`, must not be `None`") # noqa: E501 + + self._data_centers = data_centers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMDataCentersResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMDataCentersResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMDataCentersResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vm_disks_response.py b/docs/cudo_compute/models/list_vm_disks_response.py new file mode 100644 index 0000000..16ab589 --- /dev/null +++ b/docs/cudo_compute/models/list_vm_disks_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMDisksResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'disks': 'list[Disk]' + } + + attribute_map = { + 'disks': 'disks' + } + + def __init__(self, disks=None, _configuration=None): # noqa: E501 + """ListVMDisksResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._disks = None + self.discriminator = None + + if disks is not None: + self.disks = disks + + @property + def disks(self): + """Gets the disks of this ListVMDisksResponse. # noqa: E501 + + + :return: The disks of this ListVMDisksResponse. # noqa: E501 + :rtype: list[Disk] + """ + return self._disks + + @disks.setter + def disks(self, disks): + """Sets the disks of this ListVMDisksResponse. + + + :param disks: The disks of this ListVMDisksResponse. # noqa: E501 + :type: list[Disk] + """ + + self._disks = disks + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMDisksResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMDisksResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMDisksResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vm_gpu_models_response.py b/docs/cudo_compute/models/list_vm_gpu_models_response.py new file mode 100644 index 0000000..9dcc163 --- /dev/null +++ b/docs/cudo_compute/models/list_vm_gpu_models_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMGpuModelsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'gpu_models': 'list[GpuModel]' + } + + attribute_map = { + 'gpu_models': 'gpuModels' + } + + def __init__(self, gpu_models=None, _configuration=None): # noqa: E501 + """ListVMGpuModelsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._gpu_models = None + self.discriminator = None + + if gpu_models is not None: + self.gpu_models = gpu_models + + @property + def gpu_models(self): + """Gets the gpu_models of this ListVMGpuModelsResponse. # noqa: E501 + + + :return: The gpu_models of this ListVMGpuModelsResponse. # noqa: E501 + :rtype: list[GpuModel] + """ + return self._gpu_models + + @gpu_models.setter + def gpu_models(self, gpu_models): + """Sets the gpu_models of this ListVMGpuModelsResponse. + + + :param gpu_models: The gpu_models of this ListVMGpuModelsResponse. # noqa: E501 + :type: list[GpuModel] + """ + + self._gpu_models = gpu_models + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMGpuModelsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMGpuModelsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMGpuModelsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vm_machine_types2_response.py b/docs/cudo_compute/models/list_vm_machine_types2_response.py new file mode 100644 index 0000000..829058a --- /dev/null +++ b/docs/cudo_compute/models/list_vm_machine_types2_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMMachineTypes2Response(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'machine_types': 'list[ListVMMachineTypes2ResponseVMMachineType]' + } + + attribute_map = { + 'machine_types': 'machineTypes' + } + + def __init__(self, machine_types=None, _configuration=None): # noqa: E501 + """ListVMMachineTypes2Response - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._machine_types = None + self.discriminator = None + + self.machine_types = machine_types + + @property + def machine_types(self): + """Gets the machine_types of this ListVMMachineTypes2Response. # noqa: E501 + + + :return: The machine_types of this ListVMMachineTypes2Response. # noqa: E501 + :rtype: list[ListVMMachineTypes2ResponseVMMachineType] + """ + return self._machine_types + + @machine_types.setter + def machine_types(self, machine_types): + """Sets the machine_types of this ListVMMachineTypes2Response. + + + :param machine_types: The machine_types of this ListVMMachineTypes2Response. # noqa: E501 + :type: list[ListVMMachineTypes2ResponseVMMachineType] + """ + if self._configuration.client_side_validation and machine_types is None: + raise ValueError("Invalid value for `machine_types`, must not be `None`") # noqa: E501 + + self._machine_types = machine_types + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMMachineTypes2Response, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMMachineTypes2Response): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMMachineTypes2Response): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vm_machine_types2_response_vm_machine_type.py b/docs/cudo_compute/models/list_vm_machine_types2_response_vm_machine_type.py new file mode 100644 index 0000000..e41ddc6 --- /dev/null +++ b/docs/cudo_compute/models/list_vm_machine_types2_response_vm_machine_type.py @@ -0,0 +1,772 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMMachineTypes2ResponseVMMachineType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'machine_type': 'str', + 'cpu_model': 'str', + 'gpu_model': 'str', + 'gpu_model_id': 'str', + 'min_vcpu_per_memory_gib': 'float', + 'max_vcpu_per_memory_gib': 'float', + 'min_vcpu_per_gpu': 'float', + 'max_vcpu_per_gpu': 'float', + 'vcpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal', + 'gpu_price_hr': 'Decimal', + 'min_storage_gib_price_hr': 'Decimal', + 'ipv4_price_hr': 'Decimal', + 'renewable_energy': 'bool', + 'max_vcpu_free': 'int', + 'total_vcpu_free': 'int', + 'max_memory_gib_free': 'int', + 'total_memory_gib_free': 'int', + 'max_gpu_free': 'int', + 'total_gpu_free': 'int', + 'max_storage_gib_free': 'int', + 'total_storage_gib_free': 'int', + 'min_vcpu': 'float', + 'min_memory_gib': 'float' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'machine_type': 'machineType', + 'cpu_model': 'cpuModel', + 'gpu_model': 'gpuModel', + 'gpu_model_id': 'gpuModelId', + 'min_vcpu_per_memory_gib': 'minVcpuPerMemoryGib', + 'max_vcpu_per_memory_gib': 'maxVcpuPerMemoryGib', + 'min_vcpu_per_gpu': 'minVcpuPerGpu', + 'max_vcpu_per_gpu': 'maxVcpuPerGpu', + 'vcpu_price_hr': 'vcpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr', + 'gpu_price_hr': 'gpuPriceHr', + 'min_storage_gib_price_hr': 'minStorageGibPriceHr', + 'ipv4_price_hr': 'ipv4PriceHr', + 'renewable_energy': 'renewableEnergy', + 'max_vcpu_free': 'maxVcpuFree', + 'total_vcpu_free': 'totalVcpuFree', + 'max_memory_gib_free': 'maxMemoryGibFree', + 'total_memory_gib_free': 'totalMemoryGibFree', + 'max_gpu_free': 'maxGpuFree', + 'total_gpu_free': 'totalGpuFree', + 'max_storage_gib_free': 'maxStorageGibFree', + 'total_storage_gib_free': 'totalStorageGibFree', + 'min_vcpu': 'minVcpu', + 'min_memory_gib': 'minMemoryGib' + } + + def __init__(self, data_center_id=None, machine_type=None, cpu_model=None, gpu_model=None, gpu_model_id=None, min_vcpu_per_memory_gib=None, max_vcpu_per_memory_gib=None, min_vcpu_per_gpu=None, max_vcpu_per_gpu=None, vcpu_price_hr=None, memory_gib_price_hr=None, gpu_price_hr=None, min_storage_gib_price_hr=None, ipv4_price_hr=None, renewable_energy=None, max_vcpu_free=None, total_vcpu_free=None, max_memory_gib_free=None, total_memory_gib_free=None, max_gpu_free=None, total_gpu_free=None, max_storage_gib_free=None, total_storage_gib_free=None, min_vcpu=None, min_memory_gib=None, _configuration=None): # noqa: E501 + """ListVMMachineTypes2ResponseVMMachineType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._machine_type = None + self._cpu_model = None + self._gpu_model = None + self._gpu_model_id = None + self._min_vcpu_per_memory_gib = None + self._max_vcpu_per_memory_gib = None + self._min_vcpu_per_gpu = None + self._max_vcpu_per_gpu = None + self._vcpu_price_hr = None + self._memory_gib_price_hr = None + self._gpu_price_hr = None + self._min_storage_gib_price_hr = None + self._ipv4_price_hr = None + self._renewable_energy = None + self._max_vcpu_free = None + self._total_vcpu_free = None + self._max_memory_gib_free = None + self._total_memory_gib_free = None + self._max_gpu_free = None + self._total_gpu_free = None + self._max_storage_gib_free = None + self._total_storage_gib_free = None + self._min_vcpu = None + self._min_memory_gib = None + self.discriminator = None + + self.data_center_id = data_center_id + self.machine_type = machine_type + self.cpu_model = cpu_model + self.gpu_model = gpu_model + self.gpu_model_id = gpu_model_id + self.min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + self.max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + self.min_vcpu_per_gpu = min_vcpu_per_gpu + self.max_vcpu_per_gpu = max_vcpu_per_gpu + self.vcpu_price_hr = vcpu_price_hr + self.memory_gib_price_hr = memory_gib_price_hr + self.gpu_price_hr = gpu_price_hr + self.min_storage_gib_price_hr = min_storage_gib_price_hr + self.ipv4_price_hr = ipv4_price_hr + self.renewable_energy = renewable_energy + self.max_vcpu_free = max_vcpu_free + self.total_vcpu_free = total_vcpu_free + self.max_memory_gib_free = max_memory_gib_free + self.total_memory_gib_free = total_memory_gib_free + self.max_gpu_free = max_gpu_free + self.total_gpu_free = total_gpu_free + self.max_storage_gib_free = max_storage_gib_free + self.total_storage_gib_free = total_storage_gib_free + self.min_vcpu = min_vcpu + self.min_memory_gib = min_memory_gib + + @property + def data_center_id(self): + """Gets the data_center_id of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The data_center_id of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this ListVMMachineTypes2ResponseVMMachineType. + + + :param data_center_id: The data_center_id of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def machine_type(self): + """Gets the machine_type of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The machine_type of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this ListVMMachineTypes2ResponseVMMachineType. + + + :param machine_type: The machine_type of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def cpu_model(self): + """Gets the cpu_model of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The cpu_model of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._cpu_model + + @cpu_model.setter + def cpu_model(self, cpu_model): + """Sets the cpu_model of this ListVMMachineTypes2ResponseVMMachineType. + + + :param cpu_model: The cpu_model of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and cpu_model is None: + raise ValueError("Invalid value for `cpu_model`, must not be `None`") # noqa: E501 + + self._cpu_model = cpu_model + + @property + def gpu_model(self): + """Gets the gpu_model of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The gpu_model of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._gpu_model + + @gpu_model.setter + def gpu_model(self, gpu_model): + """Sets the gpu_model of this ListVMMachineTypes2ResponseVMMachineType. + + + :param gpu_model: The gpu_model of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model is None: + raise ValueError("Invalid value for `gpu_model`, must not be `None`") # noqa: E501 + + self._gpu_model = gpu_model + + @property + def gpu_model_id(self): + """Gets the gpu_model_id of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The gpu_model_id of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._gpu_model_id + + @gpu_model_id.setter + def gpu_model_id(self, gpu_model_id): + """Sets the gpu_model_id of this ListVMMachineTypes2ResponseVMMachineType. + + + :param gpu_model_id: The gpu_model_id of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model_id is None: + raise ValueError("Invalid value for `gpu_model_id`, must not be `None`") # noqa: E501 + + self._gpu_model_id = gpu_model_id + + @property + def min_vcpu_per_memory_gib(self): + """Gets the min_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The min_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_memory_gib + + @min_vcpu_per_memory_gib.setter + def min_vcpu_per_memory_gib(self, min_vcpu_per_memory_gib): + """Sets the min_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. + + + :param min_vcpu_per_memory_gib: The min_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `min_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + + @property + def max_vcpu_per_memory_gib(self): + """Gets the max_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The max_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_memory_gib + + @max_vcpu_per_memory_gib.setter + def max_vcpu_per_memory_gib(self, max_vcpu_per_memory_gib): + """Sets the max_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. + + + :param max_vcpu_per_memory_gib: The max_vcpu_per_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `max_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + + @property + def min_vcpu_per_gpu(self): + """Gets the min_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The min_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_gpu + + @min_vcpu_per_gpu.setter + def min_vcpu_per_gpu(self, min_vcpu_per_gpu): + """Sets the min_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. + + + :param min_vcpu_per_gpu: The min_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_gpu is None: + raise ValueError("Invalid value for `min_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_gpu = min_vcpu_per_gpu + + @property + def max_vcpu_per_gpu(self): + """Gets the max_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The max_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_gpu + + @max_vcpu_per_gpu.setter + def max_vcpu_per_gpu(self, max_vcpu_per_gpu): + """Sets the max_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. + + + :param max_vcpu_per_gpu: The max_vcpu_per_gpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_gpu is None: + raise ValueError("Invalid value for `max_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_gpu = max_vcpu_per_gpu + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The vcpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. + + + :param vcpu_price_hr: The vcpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and vcpu_price_hr is None: + raise ValueError("Invalid value for `vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._vcpu_price_hr = vcpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The memory_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and memory_gib_price_hr is None: + raise ValueError("Invalid value for `memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._memory_gib_price_hr = memory_gib_price_hr + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The gpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. + + + :param gpu_price_hr: The gpu_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and gpu_price_hr is None: + raise ValueError("Invalid value for `gpu_price_hr`, must not be `None`") # noqa: E501 + + self._gpu_price_hr = gpu_price_hr + + @property + def min_storage_gib_price_hr(self): + """Gets the min_storage_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The min_storage_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._min_storage_gib_price_hr + + @min_storage_gib_price_hr.setter + def min_storage_gib_price_hr(self, min_storage_gib_price_hr): + """Sets the min_storage_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. + + + :param min_storage_gib_price_hr: The min_storage_gib_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and min_storage_gib_price_hr is None: + raise ValueError("Invalid value for `min_storage_gib_price_hr`, must not be `None`") # noqa: E501 + + self._min_storage_gib_price_hr = min_storage_gib_price_hr + + @property + def ipv4_price_hr(self): + """Gets the ipv4_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The ipv4_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._ipv4_price_hr + + @ipv4_price_hr.setter + def ipv4_price_hr(self, ipv4_price_hr): + """Sets the ipv4_price_hr of this ListVMMachineTypes2ResponseVMMachineType. + + + :param ipv4_price_hr: The ipv4_price_hr of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and ipv4_price_hr is None: + raise ValueError("Invalid value for `ipv4_price_hr`, must not be `None`") # noqa: E501 + + self._ipv4_price_hr = ipv4_price_hr + + @property + def renewable_energy(self): + """Gets the renewable_energy of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The renewable_energy of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: bool + """ + return self._renewable_energy + + @renewable_energy.setter + def renewable_energy(self, renewable_energy): + """Sets the renewable_energy of this ListVMMachineTypes2ResponseVMMachineType. + + + :param renewable_energy: The renewable_energy of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and renewable_energy is None: + raise ValueError("Invalid value for `renewable_energy`, must not be `None`") # noqa: E501 + + self._renewable_energy = renewable_energy + + @property + def max_vcpu_free(self): + """Gets the max_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The max_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_vcpu_free + + @max_vcpu_free.setter + def max_vcpu_free(self, max_vcpu_free): + """Sets the max_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param max_vcpu_free: The max_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_vcpu_free is None: + raise ValueError("Invalid value for `max_vcpu_free`, must not be `None`") # noqa: E501 + + self._max_vcpu_free = max_vcpu_free + + @property + def total_vcpu_free(self): + """Gets the total_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The total_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_vcpu_free + + @total_vcpu_free.setter + def total_vcpu_free(self, total_vcpu_free): + """Sets the total_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param total_vcpu_free: The total_vcpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_vcpu_free is None: + raise ValueError("Invalid value for `total_vcpu_free`, must not be `None`") # noqa: E501 + + self._total_vcpu_free = total_vcpu_free + + @property + def max_memory_gib_free(self): + """Gets the max_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The max_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_memory_gib_free + + @max_memory_gib_free.setter + def max_memory_gib_free(self, max_memory_gib_free): + """Sets the max_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param max_memory_gib_free: The max_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_memory_gib_free is None: + raise ValueError("Invalid value for `max_memory_gib_free`, must not be `None`") # noqa: E501 + + self._max_memory_gib_free = max_memory_gib_free + + @property + def total_memory_gib_free(self): + """Gets the total_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The total_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_memory_gib_free + + @total_memory_gib_free.setter + def total_memory_gib_free(self, total_memory_gib_free): + """Sets the total_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param total_memory_gib_free: The total_memory_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_memory_gib_free is None: + raise ValueError("Invalid value for `total_memory_gib_free`, must not be `None`") # noqa: E501 + + self._total_memory_gib_free = total_memory_gib_free + + @property + def max_gpu_free(self): + """Gets the max_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The max_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_gpu_free + + @max_gpu_free.setter + def max_gpu_free(self, max_gpu_free): + """Sets the max_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param max_gpu_free: The max_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_gpu_free is None: + raise ValueError("Invalid value for `max_gpu_free`, must not be `None`") # noqa: E501 + + self._max_gpu_free = max_gpu_free + + @property + def total_gpu_free(self): + """Gets the total_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The total_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_gpu_free + + @total_gpu_free.setter + def total_gpu_free(self, total_gpu_free): + """Sets the total_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param total_gpu_free: The total_gpu_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_gpu_free is None: + raise ValueError("Invalid value for `total_gpu_free`, must not be `None`") # noqa: E501 + + self._total_gpu_free = total_gpu_free + + @property + def max_storage_gib_free(self): + """Gets the max_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The max_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_storage_gib_free + + @max_storage_gib_free.setter + def max_storage_gib_free(self, max_storage_gib_free): + """Sets the max_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param max_storage_gib_free: The max_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_storage_gib_free is None: + raise ValueError("Invalid value for `max_storage_gib_free`, must not be `None`") # noqa: E501 + + self._max_storage_gib_free = max_storage_gib_free + + @property + def total_storage_gib_free(self): + """Gets the total_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The total_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_storage_gib_free + + @total_storage_gib_free.setter + def total_storage_gib_free(self, total_storage_gib_free): + """Sets the total_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. + + + :param total_storage_gib_free: The total_storage_gib_free of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_storage_gib_free is None: + raise ValueError("Invalid value for `total_storage_gib_free`, must not be `None`") # noqa: E501 + + self._total_storage_gib_free = total_storage_gib_free + + @property + def min_vcpu(self): + """Gets the min_vcpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The min_vcpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_vcpu + + @min_vcpu.setter + def min_vcpu(self, min_vcpu): + """Sets the min_vcpu of this ListVMMachineTypes2ResponseVMMachineType. + + + :param min_vcpu: The min_vcpu of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu is None: + raise ValueError("Invalid value for `min_vcpu`, must not be `None`") # noqa: E501 + + self._min_vcpu = min_vcpu + + @property + def min_memory_gib(self): + """Gets the min_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + + + :return: The min_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_memory_gib + + @min_memory_gib.setter + def min_memory_gib(self, min_memory_gib): + """Sets the min_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. + + + :param min_memory_gib: The min_memory_gib of this ListVMMachineTypes2ResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_memory_gib is None: + raise ValueError("Invalid value for `min_memory_gib`, must not be `None`") # noqa: E501 + + self._min_memory_gib = min_memory_gib + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMMachineTypes2ResponseVMMachineType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMMachineTypes2ResponseVMMachineType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMMachineTypes2ResponseVMMachineType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vm_machine_types_response.py b/docs/cudo_compute/models/list_vm_machine_types_response.py new file mode 100644 index 0000000..6a5f1a7 --- /dev/null +++ b/docs/cudo_compute/models/list_vm_machine_types_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMMachineTypesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'machine_types': 'list[ListVMMachineTypesResponseVMMachineType]' + } + + attribute_map = { + 'machine_types': 'machineTypes' + } + + def __init__(self, machine_types=None, _configuration=None): # noqa: E501 + """ListVMMachineTypesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._machine_types = None + self.discriminator = None + + self.machine_types = machine_types + + @property + def machine_types(self): + """Gets the machine_types of this ListVMMachineTypesResponse. # noqa: E501 + + + :return: The machine_types of this ListVMMachineTypesResponse. # noqa: E501 + :rtype: list[ListVMMachineTypesResponseVMMachineType] + """ + return self._machine_types + + @machine_types.setter + def machine_types(self, machine_types): + """Sets the machine_types of this ListVMMachineTypesResponse. + + + :param machine_types: The machine_types of this ListVMMachineTypesResponse. # noqa: E501 + :type: list[ListVMMachineTypesResponseVMMachineType] + """ + if self._configuration.client_side_validation and machine_types is None: + raise ValueError("Invalid value for `machine_types`, must not be `None`") # noqa: E501 + + self._machine_types = machine_types + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMMachineTypesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMMachineTypesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMMachineTypesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vm_machine_types_response_vm_machine_type.py b/docs/cudo_compute/models/list_vm_machine_types_response_vm_machine_type.py new file mode 100644 index 0000000..61cdd8a --- /dev/null +++ b/docs/cudo_compute/models/list_vm_machine_types_response_vm_machine_type.py @@ -0,0 +1,799 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMMachineTypesResponseVMMachineType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'machine_type': 'str', + 'cpu_model': 'str', + 'gpu_model': 'str', + 'gpu_model_id': 'str', + 'min_vcpu_per_memory_gib': 'float', + 'max_vcpu_per_memory_gib': 'float', + 'min_vcpu_per_gpu': 'float', + 'max_vcpu_per_gpu': 'float', + 'vcpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal', + 'gpu_price_hr': 'Decimal', + 'min_storage_gib_price_hr': 'Decimal', + 'ipv4_price_hr': 'Decimal', + 'renewable_energy': 'bool', + 'max_vcpu_free': 'int', + 'total_vcpu_free': 'int', + 'max_memory_gib_free': 'int', + 'total_memory_gib_free': 'int', + 'max_gpu_free': 'int', + 'total_gpu_free': 'int', + 'max_storage_gib_free': 'int', + 'total_storage_gib_free': 'int', + 'min_vcpu': 'float', + 'min_memory_gib': 'float', + 'prices': 'list[VMMachineTypeMachineTypePrice]' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'machine_type': 'machineType', + 'cpu_model': 'cpuModel', + 'gpu_model': 'gpuModel', + 'gpu_model_id': 'gpuModelId', + 'min_vcpu_per_memory_gib': 'minVcpuPerMemoryGib', + 'max_vcpu_per_memory_gib': 'maxVcpuPerMemoryGib', + 'min_vcpu_per_gpu': 'minVcpuPerGpu', + 'max_vcpu_per_gpu': 'maxVcpuPerGpu', + 'vcpu_price_hr': 'vcpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr', + 'gpu_price_hr': 'gpuPriceHr', + 'min_storage_gib_price_hr': 'minStorageGibPriceHr', + 'ipv4_price_hr': 'ipv4PriceHr', + 'renewable_energy': 'renewableEnergy', + 'max_vcpu_free': 'maxVcpuFree', + 'total_vcpu_free': 'totalVcpuFree', + 'max_memory_gib_free': 'maxMemoryGibFree', + 'total_memory_gib_free': 'totalMemoryGibFree', + 'max_gpu_free': 'maxGpuFree', + 'total_gpu_free': 'totalGpuFree', + 'max_storage_gib_free': 'maxStorageGibFree', + 'total_storage_gib_free': 'totalStorageGibFree', + 'min_vcpu': 'minVcpu', + 'min_memory_gib': 'minMemoryGib', + 'prices': 'prices' + } + + def __init__(self, data_center_id=None, machine_type=None, cpu_model=None, gpu_model=None, gpu_model_id=None, min_vcpu_per_memory_gib=None, max_vcpu_per_memory_gib=None, min_vcpu_per_gpu=None, max_vcpu_per_gpu=None, vcpu_price_hr=None, memory_gib_price_hr=None, gpu_price_hr=None, min_storage_gib_price_hr=None, ipv4_price_hr=None, renewable_energy=None, max_vcpu_free=None, total_vcpu_free=None, max_memory_gib_free=None, total_memory_gib_free=None, max_gpu_free=None, total_gpu_free=None, max_storage_gib_free=None, total_storage_gib_free=None, min_vcpu=None, min_memory_gib=None, prices=None, _configuration=None): # noqa: E501 + """ListVMMachineTypesResponseVMMachineType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._machine_type = None + self._cpu_model = None + self._gpu_model = None + self._gpu_model_id = None + self._min_vcpu_per_memory_gib = None + self._max_vcpu_per_memory_gib = None + self._min_vcpu_per_gpu = None + self._max_vcpu_per_gpu = None + self._vcpu_price_hr = None + self._memory_gib_price_hr = None + self._gpu_price_hr = None + self._min_storage_gib_price_hr = None + self._ipv4_price_hr = None + self._renewable_energy = None + self._max_vcpu_free = None + self._total_vcpu_free = None + self._max_memory_gib_free = None + self._total_memory_gib_free = None + self._max_gpu_free = None + self._total_gpu_free = None + self._max_storage_gib_free = None + self._total_storage_gib_free = None + self._min_vcpu = None + self._min_memory_gib = None + self._prices = None + self.discriminator = None + + self.data_center_id = data_center_id + self.machine_type = machine_type + self.cpu_model = cpu_model + self.gpu_model = gpu_model + self.gpu_model_id = gpu_model_id + self.min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + self.max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + self.min_vcpu_per_gpu = min_vcpu_per_gpu + self.max_vcpu_per_gpu = max_vcpu_per_gpu + self.vcpu_price_hr = vcpu_price_hr + self.memory_gib_price_hr = memory_gib_price_hr + self.gpu_price_hr = gpu_price_hr + self.min_storage_gib_price_hr = min_storage_gib_price_hr + self.ipv4_price_hr = ipv4_price_hr + self.renewable_energy = renewable_energy + self.max_vcpu_free = max_vcpu_free + self.total_vcpu_free = total_vcpu_free + self.max_memory_gib_free = max_memory_gib_free + self.total_memory_gib_free = total_memory_gib_free + self.max_gpu_free = max_gpu_free + self.total_gpu_free = total_gpu_free + self.max_storage_gib_free = max_storage_gib_free + self.total_storage_gib_free = total_storage_gib_free + self.min_vcpu = min_vcpu + self.min_memory_gib = min_memory_gib + self.prices = prices + + @property + def data_center_id(self): + """Gets the data_center_id of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The data_center_id of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this ListVMMachineTypesResponseVMMachineType. + + + :param data_center_id: The data_center_id of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def machine_type(self): + """Gets the machine_type of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The machine_type of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this ListVMMachineTypesResponseVMMachineType. + + + :param machine_type: The machine_type of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and machine_type is None: + raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501 + + self._machine_type = machine_type + + @property + def cpu_model(self): + """Gets the cpu_model of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The cpu_model of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._cpu_model + + @cpu_model.setter + def cpu_model(self, cpu_model): + """Sets the cpu_model of this ListVMMachineTypesResponseVMMachineType. + + + :param cpu_model: The cpu_model of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and cpu_model is None: + raise ValueError("Invalid value for `cpu_model`, must not be `None`") # noqa: E501 + + self._cpu_model = cpu_model + + @property + def gpu_model(self): + """Gets the gpu_model of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The gpu_model of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._gpu_model + + @gpu_model.setter + def gpu_model(self, gpu_model): + """Sets the gpu_model of this ListVMMachineTypesResponseVMMachineType. + + + :param gpu_model: The gpu_model of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model is None: + raise ValueError("Invalid value for `gpu_model`, must not be `None`") # noqa: E501 + + self._gpu_model = gpu_model + + @property + def gpu_model_id(self): + """Gets the gpu_model_id of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The gpu_model_id of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: str + """ + return self._gpu_model_id + + @gpu_model_id.setter + def gpu_model_id(self, gpu_model_id): + """Sets the gpu_model_id of this ListVMMachineTypesResponseVMMachineType. + + + :param gpu_model_id: The gpu_model_id of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gpu_model_id is None: + raise ValueError("Invalid value for `gpu_model_id`, must not be `None`") # noqa: E501 + + self._gpu_model_id = gpu_model_id + + @property + def min_vcpu_per_memory_gib(self): + """Gets the min_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The min_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_memory_gib + + @min_vcpu_per_memory_gib.setter + def min_vcpu_per_memory_gib(self, min_vcpu_per_memory_gib): + """Sets the min_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. + + + :param min_vcpu_per_memory_gib: The min_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `min_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + + @property + def max_vcpu_per_memory_gib(self): + """Gets the max_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The max_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_memory_gib + + @max_vcpu_per_memory_gib.setter + def max_vcpu_per_memory_gib(self, max_vcpu_per_memory_gib): + """Sets the max_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. + + + :param max_vcpu_per_memory_gib: The max_vcpu_per_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_memory_gib is None: + raise ValueError("Invalid value for `max_vcpu_per_memory_gib`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + + @property + def min_vcpu_per_gpu(self): + """Gets the min_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The min_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_vcpu_per_gpu + + @min_vcpu_per_gpu.setter + def min_vcpu_per_gpu(self, min_vcpu_per_gpu): + """Sets the min_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. + + + :param min_vcpu_per_gpu: The min_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu_per_gpu is None: + raise ValueError("Invalid value for `min_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._min_vcpu_per_gpu = min_vcpu_per_gpu + + @property + def max_vcpu_per_gpu(self): + """Gets the max_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The max_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._max_vcpu_per_gpu + + @max_vcpu_per_gpu.setter + def max_vcpu_per_gpu(self, max_vcpu_per_gpu): + """Sets the max_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. + + + :param max_vcpu_per_gpu: The max_vcpu_per_gpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and max_vcpu_per_gpu is None: + raise ValueError("Invalid value for `max_vcpu_per_gpu`, must not be `None`") # noqa: E501 + + self._max_vcpu_per_gpu = max_vcpu_per_gpu + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The vcpu_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this ListVMMachineTypesResponseVMMachineType. + + + :param vcpu_price_hr: The vcpu_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and vcpu_price_hr is None: + raise ValueError("Invalid value for `vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._vcpu_price_hr = vcpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The memory_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and memory_gib_price_hr is None: + raise ValueError("Invalid value for `memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._memory_gib_price_hr = memory_gib_price_hr + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The gpu_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this ListVMMachineTypesResponseVMMachineType. + + + :param gpu_price_hr: The gpu_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and gpu_price_hr is None: + raise ValueError("Invalid value for `gpu_price_hr`, must not be `None`") # noqa: E501 + + self._gpu_price_hr = gpu_price_hr + + @property + def min_storage_gib_price_hr(self): + """Gets the min_storage_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The min_storage_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._min_storage_gib_price_hr + + @min_storage_gib_price_hr.setter + def min_storage_gib_price_hr(self, min_storage_gib_price_hr): + """Sets the min_storage_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. + + + :param min_storage_gib_price_hr: The min_storage_gib_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and min_storage_gib_price_hr is None: + raise ValueError("Invalid value for `min_storage_gib_price_hr`, must not be `None`") # noqa: E501 + + self._min_storage_gib_price_hr = min_storage_gib_price_hr + + @property + def ipv4_price_hr(self): + """Gets the ipv4_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The ipv4_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: Decimal + """ + return self._ipv4_price_hr + + @ipv4_price_hr.setter + def ipv4_price_hr(self, ipv4_price_hr): + """Sets the ipv4_price_hr of this ListVMMachineTypesResponseVMMachineType. + + + :param ipv4_price_hr: The ipv4_price_hr of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and ipv4_price_hr is None: + raise ValueError("Invalid value for `ipv4_price_hr`, must not be `None`") # noqa: E501 + + self._ipv4_price_hr = ipv4_price_hr + + @property + def renewable_energy(self): + """Gets the renewable_energy of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The renewable_energy of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: bool + """ + return self._renewable_energy + + @renewable_energy.setter + def renewable_energy(self, renewable_energy): + """Sets the renewable_energy of this ListVMMachineTypesResponseVMMachineType. + + + :param renewable_energy: The renewable_energy of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and renewable_energy is None: + raise ValueError("Invalid value for `renewable_energy`, must not be `None`") # noqa: E501 + + self._renewable_energy = renewable_energy + + @property + def max_vcpu_free(self): + """Gets the max_vcpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The max_vcpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_vcpu_free + + @max_vcpu_free.setter + def max_vcpu_free(self, max_vcpu_free): + """Sets the max_vcpu_free of this ListVMMachineTypesResponseVMMachineType. + + + :param max_vcpu_free: The max_vcpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_vcpu_free is None: + raise ValueError("Invalid value for `max_vcpu_free`, must not be `None`") # noqa: E501 + + self._max_vcpu_free = max_vcpu_free + + @property + def total_vcpu_free(self): + """Gets the total_vcpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The total_vcpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_vcpu_free + + @total_vcpu_free.setter + def total_vcpu_free(self, total_vcpu_free): + """Sets the total_vcpu_free of this ListVMMachineTypesResponseVMMachineType. + + + :param total_vcpu_free: The total_vcpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_vcpu_free is None: + raise ValueError("Invalid value for `total_vcpu_free`, must not be `None`") # noqa: E501 + + self._total_vcpu_free = total_vcpu_free + + @property + def max_memory_gib_free(self): + """Gets the max_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The max_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_memory_gib_free + + @max_memory_gib_free.setter + def max_memory_gib_free(self, max_memory_gib_free): + """Sets the max_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. + + + :param max_memory_gib_free: The max_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_memory_gib_free is None: + raise ValueError("Invalid value for `max_memory_gib_free`, must not be `None`") # noqa: E501 + + self._max_memory_gib_free = max_memory_gib_free + + @property + def total_memory_gib_free(self): + """Gets the total_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The total_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_memory_gib_free + + @total_memory_gib_free.setter + def total_memory_gib_free(self, total_memory_gib_free): + """Sets the total_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. + + + :param total_memory_gib_free: The total_memory_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_memory_gib_free is None: + raise ValueError("Invalid value for `total_memory_gib_free`, must not be `None`") # noqa: E501 + + self._total_memory_gib_free = total_memory_gib_free + + @property + def max_gpu_free(self): + """Gets the max_gpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The max_gpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_gpu_free + + @max_gpu_free.setter + def max_gpu_free(self, max_gpu_free): + """Sets the max_gpu_free of this ListVMMachineTypesResponseVMMachineType. + + + :param max_gpu_free: The max_gpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_gpu_free is None: + raise ValueError("Invalid value for `max_gpu_free`, must not be `None`") # noqa: E501 + + self._max_gpu_free = max_gpu_free + + @property + def total_gpu_free(self): + """Gets the total_gpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The total_gpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_gpu_free + + @total_gpu_free.setter + def total_gpu_free(self, total_gpu_free): + """Sets the total_gpu_free of this ListVMMachineTypesResponseVMMachineType. + + + :param total_gpu_free: The total_gpu_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_gpu_free is None: + raise ValueError("Invalid value for `total_gpu_free`, must not be `None`") # noqa: E501 + + self._total_gpu_free = total_gpu_free + + @property + def max_storage_gib_free(self): + """Gets the max_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The max_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._max_storage_gib_free + + @max_storage_gib_free.setter + def max_storage_gib_free(self, max_storage_gib_free): + """Sets the max_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. + + + :param max_storage_gib_free: The max_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and max_storage_gib_free is None: + raise ValueError("Invalid value for `max_storage_gib_free`, must not be `None`") # noqa: E501 + + self._max_storage_gib_free = max_storage_gib_free + + @property + def total_storage_gib_free(self): + """Gets the total_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The total_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: int + """ + return self._total_storage_gib_free + + @total_storage_gib_free.setter + def total_storage_gib_free(self, total_storage_gib_free): + """Sets the total_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. + + + :param total_storage_gib_free: The total_storage_gib_free of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and total_storage_gib_free is None: + raise ValueError("Invalid value for `total_storage_gib_free`, must not be `None`") # noqa: E501 + + self._total_storage_gib_free = total_storage_gib_free + + @property + def min_vcpu(self): + """Gets the min_vcpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The min_vcpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_vcpu + + @min_vcpu.setter + def min_vcpu(self, min_vcpu): + """Sets the min_vcpu of this ListVMMachineTypesResponseVMMachineType. + + + :param min_vcpu: The min_vcpu of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_vcpu is None: + raise ValueError("Invalid value for `min_vcpu`, must not be `None`") # noqa: E501 + + self._min_vcpu = min_vcpu + + @property + def min_memory_gib(self): + """Gets the min_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The min_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: float + """ + return self._min_memory_gib + + @min_memory_gib.setter + def min_memory_gib(self, min_memory_gib): + """Sets the min_memory_gib of this ListVMMachineTypesResponseVMMachineType. + + + :param min_memory_gib: The min_memory_gib of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: float + """ + if self._configuration.client_side_validation and min_memory_gib is None: + raise ValueError("Invalid value for `min_memory_gib`, must not be `None`") # noqa: E501 + + self._min_memory_gib = min_memory_gib + + @property + def prices(self): + """Gets the prices of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + + + :return: The prices of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :rtype: list[VMMachineTypeMachineTypePrice] + """ + return self._prices + + @prices.setter + def prices(self, prices): + """Sets the prices of this ListVMMachineTypesResponseVMMachineType. + + + :param prices: The prices of this ListVMMachineTypesResponseVMMachineType. # noqa: E501 + :type: list[VMMachineTypeMachineTypePrice] + """ + if self._configuration.client_side_validation and prices is None: + raise ValueError("Invalid value for `prices`, must not be `None`") # noqa: E501 + + self._prices = prices + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMMachineTypesResponseVMMachineType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMMachineTypesResponseVMMachineType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMMachineTypesResponseVMMachineType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/list_vms_response.py b/docs/cudo_compute/models/list_vms_response.py new file mode 100644 index 0000000..24c4838 --- /dev/null +++ b/docs/cudo_compute/models/list_vms_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ListVMsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'vms': 'list[VM]' + } + + attribute_map = { + 'vms': 'VMs' + } + + def __init__(self, vms=None, _configuration=None): # noqa: E501 + """ListVMsResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._vms = None + self.discriminator = None + + if vms is not None: + self.vms = vms + + @property + def vms(self): + """Gets the vms of this ListVMsResponse. # noqa: E501 + + + :return: The vms of this ListVMsResponse. # noqa: E501 + :rtype: list[VM] + """ + return self._vms + + @vms.setter + def vms(self, vms): + """Sets the vms of this ListVMsResponse. + + + :param vms: The vms of this ListVMsResponse. # noqa: E501 + :type: list[VM] + """ + + self._vms = vms + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ListVMsResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListVMsResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ListVMsResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/monitor_vm_response.py b/docs/cudo_compute/models/monitor_vm_response.py new file mode 100644 index 0000000..892c97e --- /dev/null +++ b/docs/cudo_compute/models/monitor_vm_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class MonitorVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'items': 'list[VMMonitoringItem]' + } + + attribute_map = { + 'items': 'items' + } + + def __init__(self, items=None, _configuration=None): # noqa: E501 + """MonitorVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._items = None + self.discriminator = None + + self.items = items + + @property + def items(self): + """Gets the items of this MonitorVMResponse. # noqa: E501 + + + :return: The items of this MonitorVMResponse. # noqa: E501 + :rtype: list[VMMonitoringItem] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this MonitorVMResponse. + + + :param items: The items of this MonitorVMResponse. # noqa: E501 + :type: list[VMMonitoringItem] + """ + if self._configuration.client_side_validation and items is None: + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MonitorVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MonitorVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MonitorVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/network.py b/docs/cudo_compute/models/network.py new file mode 100644 index 0000000..ec57097 --- /dev/null +++ b/docs/cudo_compute/models/network.py @@ -0,0 +1,394 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Network(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'data_center_id': 'str', + 'ip_range': 'str', + 'gateway': 'str', + 'size': 'V1VRouterSize', + 'price_hr': 'Decimal', + 'external_ip_address': 'str', + 'internal_ip_address': 'str', + 'short_state': 'str', + 'state': 'NetworkState', + 'create_time': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'data_center_id': 'dataCenterId', + 'ip_range': 'ipRange', + 'gateway': 'gateway', + 'size': 'size', + 'price_hr': 'priceHr', + 'external_ip_address': 'externalIpAddress', + 'internal_ip_address': 'internalIpAddress', + 'short_state': 'shortState', + 'state': 'state', + 'create_time': 'createTime' + } + + def __init__(self, id=None, data_center_id=None, ip_range=None, gateway=None, size=None, price_hr=None, external_ip_address=None, internal_ip_address=None, short_state=None, state=None, create_time=None, _configuration=None): # noqa: E501 + """Network - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._data_center_id = None + self._ip_range = None + self._gateway = None + self._size = None + self._price_hr = None + self._external_ip_address = None + self._internal_ip_address = None + self._short_state = None + self._state = None + self._create_time = None + self.discriminator = None + + self.id = id + self.data_center_id = data_center_id + self.ip_range = ip_range + self.gateway = gateway + self.size = size + self.price_hr = price_hr + self.external_ip_address = external_ip_address + self.internal_ip_address = internal_ip_address + self.short_state = short_state + self.state = state + self.create_time = create_time + + @property + def id(self): + """Gets the id of this Network. # noqa: E501 + + + :return: The id of this Network. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Network. + + + :param id: The id of this Network. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def data_center_id(self): + """Gets the data_center_id of this Network. # noqa: E501 + + + :return: The data_center_id of this Network. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this Network. + + + :param data_center_id: The data_center_id of this Network. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def ip_range(self): + """Gets the ip_range of this Network. # noqa: E501 + + + :return: The ip_range of this Network. # noqa: E501 + :rtype: str + """ + return self._ip_range + + @ip_range.setter + def ip_range(self, ip_range): + """Sets the ip_range of this Network. + + + :param ip_range: The ip_range of this Network. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and ip_range is None: + raise ValueError("Invalid value for `ip_range`, must not be `None`") # noqa: E501 + + self._ip_range = ip_range + + @property + def gateway(self): + """Gets the gateway of this Network. # noqa: E501 + + + :return: The gateway of this Network. # noqa: E501 + :rtype: str + """ + return self._gateway + + @gateway.setter + def gateway(self, gateway): + """Sets the gateway of this Network. + + + :param gateway: The gateway of this Network. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and gateway is None: + raise ValueError("Invalid value for `gateway`, must not be `None`") # noqa: E501 + + self._gateway = gateway + + @property + def size(self): + """Gets the size of this Network. # noqa: E501 + + + :return: The size of this Network. # noqa: E501 + :rtype: V1VRouterSize + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this Network. + + + :param size: The size of this Network. # noqa: E501 + :type: V1VRouterSize + """ + if self._configuration.client_side_validation and size is None: + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + @property + def price_hr(self): + """Gets the price_hr of this Network. # noqa: E501 + + + :return: The price_hr of this Network. # noqa: E501 + :rtype: Decimal + """ + return self._price_hr + + @price_hr.setter + def price_hr(self, price_hr): + """Sets the price_hr of this Network. + + + :param price_hr: The price_hr of this Network. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and price_hr is None: + raise ValueError("Invalid value for `price_hr`, must not be `None`") # noqa: E501 + + self._price_hr = price_hr + + @property + def external_ip_address(self): + """Gets the external_ip_address of this Network. # noqa: E501 + + + :return: The external_ip_address of this Network. # noqa: E501 + :rtype: str + """ + return self._external_ip_address + + @external_ip_address.setter + def external_ip_address(self, external_ip_address): + """Sets the external_ip_address of this Network. + + + :param external_ip_address: The external_ip_address of this Network. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and external_ip_address is None: + raise ValueError("Invalid value for `external_ip_address`, must not be `None`") # noqa: E501 + + self._external_ip_address = external_ip_address + + @property + def internal_ip_address(self): + """Gets the internal_ip_address of this Network. # noqa: E501 + + + :return: The internal_ip_address of this Network. # noqa: E501 + :rtype: str + """ + return self._internal_ip_address + + @internal_ip_address.setter + def internal_ip_address(self, internal_ip_address): + """Sets the internal_ip_address of this Network. + + + :param internal_ip_address: The internal_ip_address of this Network. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and internal_ip_address is None: + raise ValueError("Invalid value for `internal_ip_address`, must not be `None`") # noqa: E501 + + self._internal_ip_address = internal_ip_address + + @property + def short_state(self): + """Gets the short_state of this Network. # noqa: E501 + + + :return: The short_state of this Network. # noqa: E501 + :rtype: str + """ + return self._short_state + + @short_state.setter + def short_state(self, short_state): + """Sets the short_state of this Network. + + + :param short_state: The short_state of this Network. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and short_state is None: + raise ValueError("Invalid value for `short_state`, must not be `None`") # noqa: E501 + + self._short_state = short_state + + @property + def state(self): + """Gets the state of this Network. # noqa: E501 + + + :return: The state of this Network. # noqa: E501 + :rtype: NetworkState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this Network. + + + :param state: The state of this Network. # noqa: E501 + :type: NetworkState + """ + if self._configuration.client_side_validation and state is None: + raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 + + self._state = state + + @property + def create_time(self): + """Gets the create_time of this Network. # noqa: E501 + + + :return: The create_time of this Network. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Network. + + + :param create_time: The create_time of this Network. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and create_time is None: + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Network, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Network): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Network): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/network_price_hr.py b/docs/cudo_compute/models/network_price_hr.py new file mode 100644 index 0000000..fbfc104 --- /dev/null +++ b/docs/cudo_compute/models/network_price_hr.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class NetworkPriceHr(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'size': 'VMDataCenterVRouterSize', + 'price_hr': 'Decimal' + } + + attribute_map = { + 'size': 'size', + 'price_hr': 'priceHr' + } + + def __init__(self, size=None, price_hr=None, _configuration=None): # noqa: E501 + """NetworkPriceHr - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._size = None + self._price_hr = None + self.discriminator = None + + if size is not None: + self.size = size + if price_hr is not None: + self.price_hr = price_hr + + @property + def size(self): + """Gets the size of this NetworkPriceHr. # noqa: E501 + + + :return: The size of this NetworkPriceHr. # noqa: E501 + :rtype: VMDataCenterVRouterSize + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this NetworkPriceHr. + + + :param size: The size of this NetworkPriceHr. # noqa: E501 + :type: VMDataCenterVRouterSize + """ + + self._size = size + + @property + def price_hr(self): + """Gets the price_hr of this NetworkPriceHr. # noqa: E501 + + + :return: The price_hr of this NetworkPriceHr. # noqa: E501 + :rtype: Decimal + """ + return self._price_hr + + @price_hr.setter + def price_hr(self, price_hr): + """Sets the price_hr of this NetworkPriceHr. + + + :param price_hr: The price_hr of this NetworkPriceHr. # noqa: E501 + :type: Decimal + """ + + self._price_hr = price_hr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkPriceHr, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkPriceHr): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NetworkPriceHr): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/network_result.py b/docs/cudo_compute/models/network_result.py new file mode 100644 index 0000000..5925754 --- /dev/null +++ b/docs/cudo_compute/models/network_result.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class NetworkResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'id': 'str', + 'data_center_id': 'str', + 'ip_range': 'str', + 'gateway': 'str', + 'internal_ip_address': 'str', + 'external_ip_address': 'str', + 'state': 'NetworkState', + 'create_time': 'datetime' + } + + attribute_map = { + 'project_id': 'projectId', + 'id': 'id', + 'data_center_id': 'dataCenterId', + 'ip_range': 'ipRange', + 'gateway': 'gateway', + 'internal_ip_address': 'internalIpAddress', + 'external_ip_address': 'externalIpAddress', + 'state': 'state', + 'create_time': 'createTime' + } + + def __init__(self, project_id=None, id=None, data_center_id=None, ip_range=None, gateway=None, internal_ip_address=None, external_ip_address=None, state=None, create_time=None, _configuration=None): # noqa: E501 + """NetworkResult - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._id = None + self._data_center_id = None + self._ip_range = None + self._gateway = None + self._internal_ip_address = None + self._external_ip_address = None + self._state = None + self._create_time = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if id is not None: + self.id = id + if data_center_id is not None: + self.data_center_id = data_center_id + if ip_range is not None: + self.ip_range = ip_range + if gateway is not None: + self.gateway = gateway + if internal_ip_address is not None: + self.internal_ip_address = internal_ip_address + if external_ip_address is not None: + self.external_ip_address = external_ip_address + if state is not None: + self.state = state + if create_time is not None: + self.create_time = create_time + + @property + def project_id(self): + """Gets the project_id of this NetworkResult. # noqa: E501 + + + :return: The project_id of this NetworkResult. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this NetworkResult. + + + :param project_id: The project_id of this NetworkResult. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def id(self): + """Gets the id of this NetworkResult. # noqa: E501 + + + :return: The id of this NetworkResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NetworkResult. + + + :param id: The id of this NetworkResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def data_center_id(self): + """Gets the data_center_id of this NetworkResult. # noqa: E501 + + + :return: The data_center_id of this NetworkResult. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this NetworkResult. + + + :param data_center_id: The data_center_id of this NetworkResult. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def ip_range(self): + """Gets the ip_range of this NetworkResult. # noqa: E501 + + + :return: The ip_range of this NetworkResult. # noqa: E501 + :rtype: str + """ + return self._ip_range + + @ip_range.setter + def ip_range(self, ip_range): + """Sets the ip_range of this NetworkResult. + + + :param ip_range: The ip_range of this NetworkResult. # noqa: E501 + :type: str + """ + + self._ip_range = ip_range + + @property + def gateway(self): + """Gets the gateway of this NetworkResult. # noqa: E501 + + + :return: The gateway of this NetworkResult. # noqa: E501 + :rtype: str + """ + return self._gateway + + @gateway.setter + def gateway(self, gateway): + """Sets the gateway of this NetworkResult. + + + :param gateway: The gateway of this NetworkResult. # noqa: E501 + :type: str + """ + + self._gateway = gateway + + @property + def internal_ip_address(self): + """Gets the internal_ip_address of this NetworkResult. # noqa: E501 + + + :return: The internal_ip_address of this NetworkResult. # noqa: E501 + :rtype: str + """ + return self._internal_ip_address + + @internal_ip_address.setter + def internal_ip_address(self, internal_ip_address): + """Sets the internal_ip_address of this NetworkResult. + + + :param internal_ip_address: The internal_ip_address of this NetworkResult. # noqa: E501 + :type: str + """ + + self._internal_ip_address = internal_ip_address + + @property + def external_ip_address(self): + """Gets the external_ip_address of this NetworkResult. # noqa: E501 + + + :return: The external_ip_address of this NetworkResult. # noqa: E501 + :rtype: str + """ + return self._external_ip_address + + @external_ip_address.setter + def external_ip_address(self, external_ip_address): + """Sets the external_ip_address of this NetworkResult. + + + :param external_ip_address: The external_ip_address of this NetworkResult. # noqa: E501 + :type: str + """ + + self._external_ip_address = external_ip_address + + @property + def state(self): + """Gets the state of this NetworkResult. # noqa: E501 + + + :return: The state of this NetworkResult. # noqa: E501 + :rtype: NetworkState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this NetworkResult. + + + :param state: The state of this NetworkResult. # noqa: E501 + :type: NetworkState + """ + + self._state = state + + @property + def create_time(self): + """Gets the create_time of this NetworkResult. # noqa: E501 + + + :return: The create_time of this NetworkResult. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this NetworkResult. + + + :param create_time: The create_time of this NetworkResult. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NetworkResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/network_state.py b/docs/cudo_compute/models/network_state.py new file mode 100644 index 0000000..96bd788 --- /dev/null +++ b/docs/cudo_compute/models/network_state.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class NetworkState(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + CLONING = "CLONING" + CREATING_SNAPSHOT = "CREATING_SNAPSHOT" + DELETED = "DELETED" + DELETING = "DELETING" + DELETING_SNAPSHOT = "DELETING_SNAPSHOT" + FAILED = "FAILED" + HOTPLUGGING = "HOTPLUGGING" + MIGRATING = "MIGRATING" + RECREATING = "RECREATING" + REVERTING_SNAPSHOT = "REVERTING_SNAPSHOT" + RESIZING = "RESIZING" + RESIZING_DISK = "RESIZING_DISK" + ACTIVE = "ACTIVE" + STARTING = "STARTING" + STOPPED = "STOPPED" + STOPPING = "STOPPING" + SUSPENDED = "SUSPENDED" + SUSPENDING = "SUSPENDING" + UNKNOWN = "UNKNOWN" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """NetworkState - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NetworkState, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NetworkState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NetworkState): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/object_storage_bucket.py b/docs/cudo_compute/models/object_storage_bucket.py new file mode 100644 index 0000000..8e2ca0b --- /dev/null +++ b/docs/cudo_compute/models/object_storage_bucket.py @@ -0,0 +1,308 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ObjectStorageBucket(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'data_center_id': 'str', + 'id': 'str', + 'endpoint': 'str', + 'object_count': 'str', + 'size_bytes': 'str', + 'billable_bytes': 'str', + 'storage_gib_price_hr': 'Decimal' + } + + attribute_map = { + 'project_id': 'projectId', + 'data_center_id': 'dataCenterId', + 'id': 'id', + 'endpoint': 'endpoint', + 'object_count': 'objectCount', + 'size_bytes': 'sizeBytes', + 'billable_bytes': 'billableBytes', + 'storage_gib_price_hr': 'storageGibPriceHr' + } + + def __init__(self, project_id=None, data_center_id=None, id=None, endpoint=None, object_count=None, size_bytes=None, billable_bytes=None, storage_gib_price_hr=None, _configuration=None): # noqa: E501 + """ObjectStorageBucket - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._data_center_id = None + self._id = None + self._endpoint = None + self._object_count = None + self._size_bytes = None + self._billable_bytes = None + self._storage_gib_price_hr = None + self.discriminator = None + + self.project_id = project_id + self.data_center_id = data_center_id + self.id = id + if endpoint is not None: + self.endpoint = endpoint + if object_count is not None: + self.object_count = object_count + if size_bytes is not None: + self.size_bytes = size_bytes + if billable_bytes is not None: + self.billable_bytes = billable_bytes + if storage_gib_price_hr is not None: + self.storage_gib_price_hr = storage_gib_price_hr + + @property + def project_id(self): + """Gets the project_id of this ObjectStorageBucket. # noqa: E501 + + + :return: The project_id of this ObjectStorageBucket. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ObjectStorageBucket. + + + :param project_id: The project_id of this ObjectStorageBucket. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and project_id is None: + raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501 + + self._project_id = project_id + + @property + def data_center_id(self): + """Gets the data_center_id of this ObjectStorageBucket. # noqa: E501 + + + :return: The data_center_id of this ObjectStorageBucket. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this ObjectStorageBucket. + + + :param data_center_id: The data_center_id of this ObjectStorageBucket. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def id(self): + """Gets the id of this ObjectStorageBucket. # noqa: E501 + + + :return: The id of this ObjectStorageBucket. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ObjectStorageBucket. + + + :param id: The id of this ObjectStorageBucket. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def endpoint(self): + """Gets the endpoint of this ObjectStorageBucket. # noqa: E501 + + + :return: The endpoint of this ObjectStorageBucket. # noqa: E501 + :rtype: str + """ + return self._endpoint + + @endpoint.setter + def endpoint(self, endpoint): + """Sets the endpoint of this ObjectStorageBucket. + + + :param endpoint: The endpoint of this ObjectStorageBucket. # noqa: E501 + :type: str + """ + + self._endpoint = endpoint + + @property + def object_count(self): + """Gets the object_count of this ObjectStorageBucket. # noqa: E501 + + + :return: The object_count of this ObjectStorageBucket. # noqa: E501 + :rtype: str + """ + return self._object_count + + @object_count.setter + def object_count(self, object_count): + """Sets the object_count of this ObjectStorageBucket. + + + :param object_count: The object_count of this ObjectStorageBucket. # noqa: E501 + :type: str + """ + + self._object_count = object_count + + @property + def size_bytes(self): + """Gets the size_bytes of this ObjectStorageBucket. # noqa: E501 + + + :return: The size_bytes of this ObjectStorageBucket. # noqa: E501 + :rtype: str + """ + return self._size_bytes + + @size_bytes.setter + def size_bytes(self, size_bytes): + """Sets the size_bytes of this ObjectStorageBucket. + + + :param size_bytes: The size_bytes of this ObjectStorageBucket. # noqa: E501 + :type: str + """ + + self._size_bytes = size_bytes + + @property + def billable_bytes(self): + """Gets the billable_bytes of this ObjectStorageBucket. # noqa: E501 + + + :return: The billable_bytes of this ObjectStorageBucket. # noqa: E501 + :rtype: str + """ + return self._billable_bytes + + @billable_bytes.setter + def billable_bytes(self, billable_bytes): + """Sets the billable_bytes of this ObjectStorageBucket. + + + :param billable_bytes: The billable_bytes of this ObjectStorageBucket. # noqa: E501 + :type: str + """ + + self._billable_bytes = billable_bytes + + @property + def storage_gib_price_hr(self): + """Gets the storage_gib_price_hr of this ObjectStorageBucket. # noqa: E501 + + + :return: The storage_gib_price_hr of this ObjectStorageBucket. # noqa: E501 + :rtype: Decimal + """ + return self._storage_gib_price_hr + + @storage_gib_price_hr.setter + def storage_gib_price_hr(self, storage_gib_price_hr): + """Sets the storage_gib_price_hr of this ObjectStorageBucket. + + + :param storage_gib_price_hr: The storage_gib_price_hr of this ObjectStorageBucket. # noqa: E501 + :type: Decimal + """ + + self._storage_gib_price_hr = storage_gib_price_hr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStorageBucket, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStorageBucket): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ObjectStorageBucket): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/object_storage_key.py b/docs/cudo_compute/models/object_storage_key.py new file mode 100644 index 0000000..dca55ab --- /dev/null +++ b/docs/cudo_compute/models/object_storage_key.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ObjectStorageKey(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_key': 'str', + 'secret_key': 'str' + } + + attribute_map = { + 'access_key': 'accessKey', + 'secret_key': 'secretKey' + } + + def __init__(self, access_key=None, secret_key=None, _configuration=None): # noqa: E501 + """ObjectStorageKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._access_key = None + self._secret_key = None + self.discriminator = None + + if access_key is not None: + self.access_key = access_key + if secret_key is not None: + self.secret_key = secret_key + + @property + def access_key(self): + """Gets the access_key of this ObjectStorageKey. # noqa: E501 + + + :return: The access_key of this ObjectStorageKey. # noqa: E501 + :rtype: str + """ + return self._access_key + + @access_key.setter + def access_key(self, access_key): + """Sets the access_key of this ObjectStorageKey. + + + :param access_key: The access_key of this ObjectStorageKey. # noqa: E501 + :type: str + """ + + self._access_key = access_key + + @property + def secret_key(self): + """Gets the secret_key of this ObjectStorageKey. # noqa: E501 + + + :return: The secret_key of this ObjectStorageKey. # noqa: E501 + :rtype: str + """ + return self._secret_key + + @secret_key.setter + def secret_key(self, secret_key): + """Sets the secret_key of this ObjectStorageKey. + + + :param secret_key: The secret_key of this ObjectStorageKey. # noqa: E501 + :type: str + """ + + self._secret_key = secret_key + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStorageKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStorageKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ObjectStorageKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/object_storage_user.py b/docs/cudo_compute/models/object_storage_user.py new file mode 100644 index 0000000..bb75f08 --- /dev/null +++ b/docs/cudo_compute/models/object_storage_user.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ObjectStorageUser(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'data_center_id': 'str', + 'id': 'str', + 'keys': 'list[ObjectStorageKey]', + 'create_by': 'str', + 'create_time': 'datetime' + } + + attribute_map = { + 'project_id': 'projectId', + 'data_center_id': 'dataCenterId', + 'id': 'id', + 'keys': 'keys', + 'create_by': 'createBy', + 'create_time': 'createTime' + } + + def __init__(self, project_id=None, data_center_id=None, id=None, keys=None, create_by=None, create_time=None, _configuration=None): # noqa: E501 + """ObjectStorageUser - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._data_center_id = None + self._id = None + self._keys = None + self._create_by = None + self._create_time = None + self.discriminator = None + + self.project_id = project_id + self.data_center_id = data_center_id + self.id = id + self.keys = keys + if create_by is not None: + self.create_by = create_by + if create_time is not None: + self.create_time = create_time + + @property + def project_id(self): + """Gets the project_id of this ObjectStorageUser. # noqa: E501 + + + :return: The project_id of this ObjectStorageUser. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ObjectStorageUser. + + + :param project_id: The project_id of this ObjectStorageUser. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and project_id is None: + raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501 + + self._project_id = project_id + + @property + def data_center_id(self): + """Gets the data_center_id of this ObjectStorageUser. # noqa: E501 + + + :return: The data_center_id of this ObjectStorageUser. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this ObjectStorageUser. + + + :param data_center_id: The data_center_id of this ObjectStorageUser. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def id(self): + """Gets the id of this ObjectStorageUser. # noqa: E501 + + + :return: The id of this ObjectStorageUser. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ObjectStorageUser. + + + :param id: The id of this ObjectStorageUser. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def keys(self): + """Gets the keys of this ObjectStorageUser. # noqa: E501 + + + :return: The keys of this ObjectStorageUser. # noqa: E501 + :rtype: list[ObjectStorageKey] + """ + return self._keys + + @keys.setter + def keys(self, keys): + """Sets the keys of this ObjectStorageUser. + + + :param keys: The keys of this ObjectStorageUser. # noqa: E501 + :type: list[ObjectStorageKey] + """ + if self._configuration.client_side_validation and keys is None: + raise ValueError("Invalid value for `keys`, must not be `None`") # noqa: E501 + + self._keys = keys + + @property + def create_by(self): + """Gets the create_by of this ObjectStorageUser. # noqa: E501 + + + :return: The create_by of this ObjectStorageUser. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this ObjectStorageUser. + + + :param create_by: The create_by of this ObjectStorageUser. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def create_time(self): + """Gets the create_time of this ObjectStorageUser. # noqa: E501 + + + :return: The create_time of this ObjectStorageUser. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ObjectStorageUser. + + + :param create_time: The create_time of this ObjectStorageUser. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ObjectStorageUser, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ObjectStorageUser): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ObjectStorageUser): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/package.py b/docs/cudo_compute/models/package.py new file mode 100644 index 0000000..59d7c68 --- /dev/null +++ b/docs/cudo_compute/models/package.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Package(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'description': 'str', + 'version': 'str' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'version': 'version' + } + + def __init__(self, name=None, description=None, version=None, _configuration=None): # noqa: E501 + """Package - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._name = None + self._description = None + self._version = None + self.discriminator = None + + self.name = name + self.description = description + self.version = version + + @property + def name(self): + """Gets the name of this Package. # noqa: E501 + + + :return: The name of this Package. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Package. + + + :param name: The name of this Package. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def description(self): + """Gets the description of this Package. # noqa: E501 + + + :return: The description of this Package. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Package. + + + :param description: The description of this Package. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and description is None: + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + @property + def version(self): + """Gets the version of this Package. # noqa: E501 + + + :return: The version of this Package. # noqa: E501 + :rtype: str + """ + return self._version + + @version.setter + def version(self, version): + """Sets the version of this Package. + + + :param version: The version of this Package. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and version is None: + raise ValueError("Invalid value for `version`, must not be `None`") # noqa: E501 + + self._version = version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Package, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Package): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Package): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/payment_intent.py b/docs/cudo_compute/models/payment_intent.py new file mode 100644 index 0000000..1b46799 --- /dev/null +++ b/docs/cudo_compute/models/payment_intent.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class PaymentIntent(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'client_secret': 'str' + } + + attribute_map = { + 'client_secret': 'clientSecret' + } + + def __init__(self, client_secret=None, _configuration=None): # noqa: E501 + """PaymentIntent - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._client_secret = None + self.discriminator = None + + self.client_secret = client_secret + + @property + def client_secret(self): + """Gets the client_secret of this PaymentIntent. # noqa: E501 + + + :return: The client_secret of this PaymentIntent. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this PaymentIntent. + + + :param client_secret: The client_secret of this PaymentIntent. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and client_secret is None: + raise ValueError("Invalid value for `client_secret`, must not be `None`") # noqa: E501 + + self._client_secret = client_secret + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PaymentIntent, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentIntent): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentIntent): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/payment_method_card.py b/docs/cudo_compute/models/payment_method_card.py new file mode 100644 index 0000000..64c5e92 --- /dev/null +++ b/docs/cudo_compute/models/payment_method_card.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class PaymentMethodCard(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'brand': 'str', + 'country': 'str', + 'exp_month': 'str', + 'exp_year': 'str', + 'fingerprint': 'str', + 'last4': 'str' + } + + attribute_map = { + 'brand': 'brand', + 'country': 'country', + 'exp_month': 'expMonth', + 'exp_year': 'expYear', + 'fingerprint': 'fingerprint', + 'last4': 'last4' + } + + def __init__(self, brand=None, country=None, exp_month=None, exp_year=None, fingerprint=None, last4=None, _configuration=None): # noqa: E501 + """PaymentMethodCard - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._brand = None + self._country = None + self._exp_month = None + self._exp_year = None + self._fingerprint = None + self._last4 = None + self.discriminator = None + + if brand is not None: + self.brand = brand + if country is not None: + self.country = country + if exp_month is not None: + self.exp_month = exp_month + if exp_year is not None: + self.exp_year = exp_year + if fingerprint is not None: + self.fingerprint = fingerprint + if last4 is not None: + self.last4 = last4 + + @property + def brand(self): + """Gets the brand of this PaymentMethodCard. # noqa: E501 + + + :return: The brand of this PaymentMethodCard. # noqa: E501 + :rtype: str + """ + return self._brand + + @brand.setter + def brand(self, brand): + """Sets the brand of this PaymentMethodCard. + + + :param brand: The brand of this PaymentMethodCard. # noqa: E501 + :type: str + """ + + self._brand = brand + + @property + def country(self): + """Gets the country of this PaymentMethodCard. # noqa: E501 + + + :return: The country of this PaymentMethodCard. # noqa: E501 + :rtype: str + """ + return self._country + + @country.setter + def country(self, country): + """Sets the country of this PaymentMethodCard. + + + :param country: The country of this PaymentMethodCard. # noqa: E501 + :type: str + """ + + self._country = country + + @property + def exp_month(self): + """Gets the exp_month of this PaymentMethodCard. # noqa: E501 + + + :return: The exp_month of this PaymentMethodCard. # noqa: E501 + :rtype: str + """ + return self._exp_month + + @exp_month.setter + def exp_month(self, exp_month): + """Sets the exp_month of this PaymentMethodCard. + + + :param exp_month: The exp_month of this PaymentMethodCard. # noqa: E501 + :type: str + """ + + self._exp_month = exp_month + + @property + def exp_year(self): + """Gets the exp_year of this PaymentMethodCard. # noqa: E501 + + + :return: The exp_year of this PaymentMethodCard. # noqa: E501 + :rtype: str + """ + return self._exp_year + + @exp_year.setter + def exp_year(self, exp_year): + """Sets the exp_year of this PaymentMethodCard. + + + :param exp_year: The exp_year of this PaymentMethodCard. # noqa: E501 + :type: str + """ + + self._exp_year = exp_year + + @property + def fingerprint(self): + """Gets the fingerprint of this PaymentMethodCard. # noqa: E501 + + + :return: The fingerprint of this PaymentMethodCard. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this PaymentMethodCard. + + + :param fingerprint: The fingerprint of this PaymentMethodCard. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def last4(self): + """Gets the last4 of this PaymentMethodCard. # noqa: E501 + + + :return: The last4 of this PaymentMethodCard. # noqa: E501 + :rtype: str + """ + return self._last4 + + @last4.setter + def last4(self, last4): + """Sets the last4 of this PaymentMethodCard. + + + :param last4: The last4 of this PaymentMethodCard. # noqa: E501 + :type: str + """ + + self._last4 = last4 + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PaymentMethodCard, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodCard): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodCard): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/payment_method_paypal.py b/docs/cudo_compute/models/payment_method_paypal.py new file mode 100644 index 0000000..9e9673e --- /dev/null +++ b/docs/cudo_compute/models/payment_method_paypal.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class PaymentMethodPaypal(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payer_email': 'str', + 'payer_id': 'str' + } + + attribute_map = { + 'payer_email': 'payerEmail', + 'payer_id': 'payerId' + } + + def __init__(self, payer_email=None, payer_id=None, _configuration=None): # noqa: E501 + """PaymentMethodPaypal - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._payer_email = None + self._payer_id = None + self.discriminator = None + + if payer_email is not None: + self.payer_email = payer_email + if payer_id is not None: + self.payer_id = payer_id + + @property + def payer_email(self): + """Gets the payer_email of this PaymentMethodPaypal. # noqa: E501 + + + :return: The payer_email of this PaymentMethodPaypal. # noqa: E501 + :rtype: str + """ + return self._payer_email + + @payer_email.setter + def payer_email(self, payer_email): + """Sets the payer_email of this PaymentMethodPaypal. + + + :param payer_email: The payer_email of this PaymentMethodPaypal. # noqa: E501 + :type: str + """ + + self._payer_email = payer_email + + @property + def payer_id(self): + """Gets the payer_id of this PaymentMethodPaypal. # noqa: E501 + + + :return: The payer_id of this PaymentMethodPaypal. # noqa: E501 + :rtype: str + """ + return self._payer_id + + @payer_id.setter + def payer_id(self, payer_id): + """Sets the payer_id of this PaymentMethodPaypal. + + + :param payer_id: The payer_id of this PaymentMethodPaypal. # noqa: E501 + :type: str + """ + + self._payer_id = payer_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PaymentMethodPaypal, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentMethodPaypal): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentMethodPaypal): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/payment_terms.py b/docs/cudo_compute/models/payment_terms.py new file mode 100644 index 0000000..b46c002 --- /dev/null +++ b/docs/cudo_compute/models/payment_terms.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class PaymentTerms(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNSPECIFIED = "PAYMENT_TERMS_UNSPECIFIED" + PREPAID = "PAYMENT_TERMS_PREPAID" + INVOICE = "PAYMENT_TERMS_INVOICE" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """PaymentTerms - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PaymentTerms, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PaymentTerms): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PaymentTerms): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/point.py b/docs/cudo_compute/models/point.py new file mode 100644 index 0000000..b088918 --- /dev/null +++ b/docs/cudo_compute/models/point.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Point(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'lat': 'float', + 'lng': 'float' + } + + attribute_map = { + 'lat': 'lat', + 'lng': 'lng' + } + + def __init__(self, lat=None, lng=None, _configuration=None): # noqa: E501 + """Point - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._lat = None + self._lng = None + self.discriminator = None + + if lat is not None: + self.lat = lat + if lng is not None: + self.lng = lng + + @property + def lat(self): + """Gets the lat of this Point. # noqa: E501 + + + :return: The lat of this Point. # noqa: E501 + :rtype: float + """ + return self._lat + + @lat.setter + def lat(self, lat): + """Sets the lat of this Point. + + + :param lat: The lat of this Point. # noqa: E501 + :type: float + """ + + self._lat = lat + + @property + def lng(self): + """Gets the lng of this Point. # noqa: E501 + + + :return: The lng of this Point. # noqa: E501 + :rtype: float + """ + return self._lng + + @lng.setter + def lng(self, lng): + """Sets the lng of this Point. + + + :param lng: The lng of this Point. # noqa: E501 + :type: float + """ + + self._lng = lng + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Point, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Point): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Point): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/private_image.py b/docs/cudo_compute/models/private_image.py new file mode 100644 index 0000000..3f9e0d8 --- /dev/null +++ b/docs/cudo_compute/models/private_image.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class PrivateImage(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'id': 'str', + 'data_center_id': 'str', + 'description': 'str', + 'size_gib': 'int' + } + + attribute_map = { + 'project_id': 'projectId', + 'id': 'id', + 'data_center_id': 'dataCenterId', + 'description': 'description', + 'size_gib': 'sizeGib' + } + + def __init__(self, project_id=None, id=None, data_center_id=None, description=None, size_gib=None, _configuration=None): # noqa: E501 + """PrivateImage - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._id = None + self._data_center_id = None + self._description = None + self._size_gib = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if id is not None: + self.id = id + if data_center_id is not None: + self.data_center_id = data_center_id + if description is not None: + self.description = description + if size_gib is not None: + self.size_gib = size_gib + + @property + def project_id(self): + """Gets the project_id of this PrivateImage. # noqa: E501 + + + :return: The project_id of this PrivateImage. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this PrivateImage. + + + :param project_id: The project_id of this PrivateImage. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def id(self): + """Gets the id of this PrivateImage. # noqa: E501 + + + :return: The id of this PrivateImage. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PrivateImage. + + + :param id: The id of this PrivateImage. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def data_center_id(self): + """Gets the data_center_id of this PrivateImage. # noqa: E501 + + + :return: The data_center_id of this PrivateImage. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this PrivateImage. + + + :param data_center_id: The data_center_id of this PrivateImage. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def description(self): + """Gets the description of this PrivateImage. # noqa: E501 + + + :return: The description of this PrivateImage. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this PrivateImage. + + + :param description: The description of this PrivateImage. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def size_gib(self): + """Gets the size_gib of this PrivateImage. # noqa: E501 + + + :return: The size_gib of this PrivateImage. # noqa: E501 + :rtype: int + """ + return self._size_gib + + @size_gib.setter + def size_gib(self, size_gib): + """Sets the size_gib of this PrivateImage. + + + :param size_gib: The size_gib of this PrivateImage. # noqa: E501 + :type: int + """ + + self._size_gib = size_gib + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PrivateImage, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PrivateImage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PrivateImage): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/profile.py b/docs/cudo_compute/models/profile.py new file mode 100644 index 0000000..a6b2614 --- /dev/null +++ b/docs/cudo_compute/models/profile.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Profile(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'email_address': 'str', + 'first_name': 'str', + 'last_name': 'str', + 'picture': 'str' + } + + attribute_map = { + 'email_address': 'emailAddress', + 'first_name': 'firstName', + 'last_name': 'lastName', + 'picture': 'picture' + } + + def __init__(self, email_address=None, first_name=None, last_name=None, picture=None, _configuration=None): # noqa: E501 + """Profile - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._email_address = None + self._first_name = None + self._last_name = None + self._picture = None + self.discriminator = None + + if email_address is not None: + self.email_address = email_address + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + if picture is not None: + self.picture = picture + + @property + def email_address(self): + """Gets the email_address of this Profile. # noqa: E501 + + + :return: The email_address of this Profile. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this Profile. + + + :param email_address: The email_address of this Profile. # noqa: E501 + :type: str + """ + + self._email_address = email_address + + @property + def first_name(self): + """Gets the first_name of this Profile. # noqa: E501 + + + :return: The first_name of this Profile. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this Profile. + + + :param first_name: The first_name of this Profile. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this Profile. # noqa: E501 + + + :return: The last_name of this Profile. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this Profile. + + + :param last_name: The last_name of this Profile. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def picture(self): + """Gets the picture of this Profile. # noqa: E501 + + + :return: The picture of this Profile. # noqa: E501 + :rtype: str + """ + return self._picture + + @picture.setter + def picture(self, picture): + """Sets the picture of this Profile. + + + :param picture: The picture of this Profile. # noqa: E501 + :type: str + """ + + self._picture = picture + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Profile, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Profile): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Profile): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/project.py b/docs/cudo_compute/models/project.py new file mode 100644 index 0000000..eb3072f --- /dev/null +++ b/docs/cudo_compute/models/project.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Project(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'billing_account_id': 'str', + 'resource_count': 'int', + 'create_by': 'str' + } + + attribute_map = { + 'id': 'id', + 'billing_account_id': 'billingAccountId', + 'resource_count': 'resourceCount', + 'create_by': 'createBy' + } + + def __init__(self, id=None, billing_account_id=None, resource_count=None, create_by=None, _configuration=None): # noqa: E501 + """Project - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._billing_account_id = None + self._resource_count = None + self._create_by = None + self.discriminator = None + + self.id = id + self.billing_account_id = billing_account_id + if resource_count is not None: + self.resource_count = resource_count + if create_by is not None: + self.create_by = create_by + + @property + def id(self): + """Gets the id of this Project. # noqa: E501 + + + :return: The id of this Project. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Project. + + + :param id: The id of this Project. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def billing_account_id(self): + """Gets the billing_account_id of this Project. # noqa: E501 + + + :return: The billing_account_id of this Project. # noqa: E501 + :rtype: str + """ + return self._billing_account_id + + @billing_account_id.setter + def billing_account_id(self, billing_account_id): + """Sets the billing_account_id of this Project. + + + :param billing_account_id: The billing_account_id of this Project. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and billing_account_id is None: + raise ValueError("Invalid value for `billing_account_id`, must not be `None`") # noqa: E501 + + self._billing_account_id = billing_account_id + + @property + def resource_count(self): + """Gets the resource_count of this Project. # noqa: E501 + + + :return: The resource_count of this Project. # noqa: E501 + :rtype: int + """ + return self._resource_count + + @resource_count.setter + def resource_count(self, resource_count): + """Sets the resource_count of this Project. + + + :param resource_count: The resource_count of this Project. # noqa: E501 + :type: int + """ + + self._resource_count = resource_count + + @property + def create_by(self): + """Gets the create_by of this Project. # noqa: E501 + + + :return: The create_by of this Project. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this Project. + + + :param create_by: The create_by of this Project. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Project, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Project): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Project): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/project_result.py b/docs/cudo_compute/models/project_result.py new file mode 100644 index 0000000..26303be --- /dev/null +++ b/docs/cudo_compute/models/project_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ProjectResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'resource_count': 'int', + 'create_time': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'resource_count': 'resourceCount', + 'create_time': 'createTime' + } + + def __init__(self, id=None, resource_count=None, create_time=None, _configuration=None): # noqa: E501 + """ProjectResult - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._resource_count = None + self._create_time = None + self.discriminator = None + + if id is not None: + self.id = id + if resource_count is not None: + self.resource_count = resource_count + if create_time is not None: + self.create_time = create_time + + @property + def id(self): + """Gets the id of this ProjectResult. # noqa: E501 + + + :return: The id of this ProjectResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ProjectResult. + + + :param id: The id of this ProjectResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def resource_count(self): + """Gets the resource_count of this ProjectResult. # noqa: E501 + + + :return: The resource_count of this ProjectResult. # noqa: E501 + :rtype: int + """ + return self._resource_count + + @resource_count.setter + def resource_count(self, resource_count): + """Sets the resource_count of this ProjectResult. + + + :param resource_count: The resource_count of this ProjectResult. # noqa: E501 + :type: int + """ + + self._resource_count = resource_count + + @property + def create_time(self): + """Gets the create_time of this ProjectResult. # noqa: E501 + + + :return: The create_time of this ProjectResult. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this ProjectResult. + + + :param create_time: The create_time of this ProjectResult. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ProjectResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ProjectResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ProjectResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/protobuf_any.py b/docs/cudo_compute/models/protobuf_any.py new file mode 100644 index 0000000..fc1af8f --- /dev/null +++ b/docs/cudo_compute/models/protobuf_any.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ProtobufAny(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'type': 'str' + } + + attribute_map = { + 'type': '@type' + } + + def __init__(self, type=None, _configuration=None): # noqa: E501 + """ProtobufAny - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._type = None + self.discriminator = None + + if type is not None: + self.type = type + + @property + def type(self): + """Gets the type of this ProtobufAny. # noqa: E501 + + A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. # noqa: E501 + + :return: The type of this ProtobufAny. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this ProtobufAny. + + A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. # noqa: E501 + + :param type: The type of this ProtobufAny. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ProtobufAny, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ProtobufAny): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ProtobufAny): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/reboot_vm_response.py b/docs/cudo_compute/models/reboot_vm_response.py new file mode 100644 index 0000000..0cd55f7 --- /dev/null +++ b/docs/cudo_compute/models/reboot_vm_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RebootVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """RebootVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RebootVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RebootVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RebootVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/region.py b/docs/cudo_compute/models/region.py new file mode 100644 index 0000000..212739a --- /dev/null +++ b/docs/cudo_compute/models/region.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Region(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'data_centers': 'list[RegionDataCenter]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'data_centers': 'dataCenters' + } + + def __init__(self, id=None, name=None, data_centers=None, _configuration=None): # noqa: E501 + """Region - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._name = None + self._data_centers = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if data_centers is not None: + self.data_centers = data_centers + + @property + def id(self): + """Gets the id of this Region. # noqa: E501 + + + :return: The id of this Region. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Region. + + + :param id: The id of this Region. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this Region. # noqa: E501 + + + :return: The name of this Region. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Region. + + + :param name: The name of this Region. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def data_centers(self): + """Gets the data_centers of this Region. # noqa: E501 + + + :return: The data_centers of this Region. # noqa: E501 + :rtype: list[RegionDataCenter] + """ + return self._data_centers + + @data_centers.setter + def data_centers(self, data_centers): + """Sets the data_centers of this Region. + + + :param data_centers: The data_centers of this Region. # noqa: E501 + :type: list[RegionDataCenter] + """ + + self._data_centers = data_centers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Region, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Region): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Region): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/region_data_center.py b/docs/cudo_compute/models/region_data_center.py new file mode 100644 index 0000000..0c598cb --- /dev/null +++ b/docs/cudo_compute/models/region_data_center.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RegionDataCenter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str' + } + + attribute_map = { + 'id': 'id' + } + + def __init__(self, id=None, _configuration=None): # noqa: E501 + """RegionDataCenter - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self.discriminator = None + + if id is not None: + self.id = id + + @property + def id(self): + """Gets the id of this RegionDataCenter. # noqa: E501 + + + :return: The id of this RegionDataCenter. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RegionDataCenter. + + + :param id: The id of this RegionDataCenter. # noqa: E501 + :type: str + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RegionDataCenter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RegionDataCenter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RegionDataCenter): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/remove_billing_account_payment_method_response.py b/docs/cudo_compute/models/remove_billing_account_payment_method_response.py new file mode 100644 index 0000000..4ac86fd --- /dev/null +++ b/docs/cudo_compute/models/remove_billing_account_payment_method_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RemoveBillingAccountPaymentMethodResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'payment_method_id': 'str' + } + + attribute_map = { + 'id': 'id', + 'payment_method_id': 'paymentMethodId' + } + + def __init__(self, id=None, payment_method_id=None, _configuration=None): # noqa: E501 + """RemoveBillingAccountPaymentMethodResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._payment_method_id = None + self.discriminator = None + + self.id = id + self.payment_method_id = payment_method_id + + @property + def id(self): + """Gets the id of this RemoveBillingAccountPaymentMethodResponse. # noqa: E501 + + + :return: The id of this RemoveBillingAccountPaymentMethodResponse. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RemoveBillingAccountPaymentMethodResponse. + + + :param id: The id of this RemoveBillingAccountPaymentMethodResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def payment_method_id(self): + """Gets the payment_method_id of this RemoveBillingAccountPaymentMethodResponse. # noqa: E501 + + + :return: The payment_method_id of this RemoveBillingAccountPaymentMethodResponse. # noqa: E501 + :rtype: str + """ + return self._payment_method_id + + @payment_method_id.setter + def payment_method_id(self, payment_method_id): + """Sets the payment_method_id of this RemoveBillingAccountPaymentMethodResponse. + + + :param payment_method_id: The payment_method_id of this RemoveBillingAccountPaymentMethodResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and payment_method_id is None: + raise ValueError("Invalid value for `payment_method_id`, must not be `None`") # noqa: E501 + + self._payment_method_id = payment_method_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RemoveBillingAccountPaymentMethodResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RemoveBillingAccountPaymentMethodResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RemoveBillingAccountPaymentMethodResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/remove_billing_account_user_permission_body.py b/docs/cudo_compute/models/remove_billing_account_user_permission_body.py new file mode 100644 index 0000000..7a8c9f9 --- /dev/null +++ b/docs/cudo_compute/models/remove_billing_account_user_permission_body.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RemoveBillingAccountUserPermissionBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'data_center_id': 'str', + 'user_id': 'str', + 'role': 'Role' + } + + attribute_map = { + 'project_id': 'projectId', + 'data_center_id': 'dataCenterId', + 'user_id': 'userId', + 'role': 'role' + } + + def __init__(self, project_id=None, data_center_id=None, user_id=None, role=None, _configuration=None): # noqa: E501 + """RemoveBillingAccountUserPermissionBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._data_center_id = None + self._user_id = None + self._role = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if data_center_id is not None: + self.data_center_id = data_center_id + self.user_id = user_id + self.role = role + + @property + def project_id(self): + """Gets the project_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The project_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RemoveBillingAccountUserPermissionBody. + + + :param project_id: The project_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def data_center_id(self): + """Gets the data_center_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The data_center_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this RemoveBillingAccountUserPermissionBody. + + + :param data_center_id: The data_center_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def user_id(self): + """Gets the user_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The user_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this RemoveBillingAccountUserPermissionBody. + + + :param user_id: The user_id of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_id is None: + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def role(self): + """Gets the role of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + + + :return: The role of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :rtype: Role + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this RemoveBillingAccountUserPermissionBody. + + + :param role: The role of this RemoveBillingAccountUserPermissionBody. # noqa: E501 + :type: Role + """ + if self._configuration.client_side_validation and role is None: + raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 + + self._role = role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RemoveBillingAccountUserPermissionBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RemoveBillingAccountUserPermissionBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RemoveBillingAccountUserPermissionBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/remove_data_center_user_permission_body.py b/docs/cudo_compute/models/remove_data_center_user_permission_body.py new file mode 100644 index 0000000..c56552c --- /dev/null +++ b/docs/cudo_compute/models/remove_data_center_user_permission_body.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RemoveDataCenterUserPermissionBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'billing_account_id': 'str', + 'user_id': 'str', + 'role': 'Role' + } + + attribute_map = { + 'project_id': 'projectId', + 'billing_account_id': 'billingAccountId', + 'user_id': 'userId', + 'role': 'role' + } + + def __init__(self, project_id=None, billing_account_id=None, user_id=None, role=None, _configuration=None): # noqa: E501 + """RemoveDataCenterUserPermissionBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._billing_account_id = None + self._user_id = None + self._role = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if billing_account_id is not None: + self.billing_account_id = billing_account_id + self.user_id = user_id + self.role = role + + @property + def project_id(self): + """Gets the project_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + + + :return: The project_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RemoveDataCenterUserPermissionBody. + + + :param project_id: The project_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def billing_account_id(self): + """Gets the billing_account_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + + + :return: The billing_account_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._billing_account_id + + @billing_account_id.setter + def billing_account_id(self, billing_account_id): + """Sets the billing_account_id of this RemoveDataCenterUserPermissionBody. + + + :param billing_account_id: The billing_account_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :type: str + """ + + self._billing_account_id = billing_account_id + + @property + def user_id(self): + """Gets the user_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + + + :return: The user_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this RemoveDataCenterUserPermissionBody. + + + :param user_id: The user_id of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_id is None: + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def role(self): + """Gets the role of this RemoveDataCenterUserPermissionBody. # noqa: E501 + + + :return: The role of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :rtype: Role + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this RemoveDataCenterUserPermissionBody. + + + :param role: The role of this RemoveDataCenterUserPermissionBody. # noqa: E501 + :type: Role + """ + if self._configuration.client_side_validation and role is None: + raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 + + self._role = role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RemoveDataCenterUserPermissionBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RemoveDataCenterUserPermissionBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RemoveDataCenterUserPermissionBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/remove_project_user_permission_body.py b/docs/cudo_compute/models/remove_project_user_permission_body.py new file mode 100644 index 0000000..e6e1127 --- /dev/null +++ b/docs/cudo_compute/models/remove_project_user_permission_body.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RemoveProjectUserPermissionBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'billing_account_id': 'str', + 'user_id': 'str', + 'role': 'Role' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'billing_account_id': 'billingAccountId', + 'user_id': 'userId', + 'role': 'role' + } + + def __init__(self, data_center_id=None, billing_account_id=None, user_id=None, role=None, _configuration=None): # noqa: E501 + """RemoveProjectUserPermissionBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._billing_account_id = None + self._user_id = None + self._role = None + self.discriminator = None + + if data_center_id is not None: + self.data_center_id = data_center_id + if billing_account_id is not None: + self.billing_account_id = billing_account_id + self.user_id = user_id + self.role = role + + @property + def data_center_id(self): + """Gets the data_center_id of this RemoveProjectUserPermissionBody. # noqa: E501 + + + :return: The data_center_id of this RemoveProjectUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this RemoveProjectUserPermissionBody. + + + :param data_center_id: The data_center_id of this RemoveProjectUserPermissionBody. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def billing_account_id(self): + """Gets the billing_account_id of this RemoveProjectUserPermissionBody. # noqa: E501 + + + :return: The billing_account_id of this RemoveProjectUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._billing_account_id + + @billing_account_id.setter + def billing_account_id(self, billing_account_id): + """Sets the billing_account_id of this RemoveProjectUserPermissionBody. + + + :param billing_account_id: The billing_account_id of this RemoveProjectUserPermissionBody. # noqa: E501 + :type: str + """ + + self._billing_account_id = billing_account_id + + @property + def user_id(self): + """Gets the user_id of this RemoveProjectUserPermissionBody. # noqa: E501 + + + :return: The user_id of this RemoveProjectUserPermissionBody. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this RemoveProjectUserPermissionBody. + + + :param user_id: The user_id of this RemoveProjectUserPermissionBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_id is None: + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def role(self): + """Gets the role of this RemoveProjectUserPermissionBody. # noqa: E501 + + + :return: The role of this RemoveProjectUserPermissionBody. # noqa: E501 + :rtype: Role + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this RemoveProjectUserPermissionBody. + + + :param role: The role of this RemoveProjectUserPermissionBody. # noqa: E501 + :type: Role + """ + if self._configuration.client_side_validation and role is None: + raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 + + self._role = role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RemoveProjectUserPermissionBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RemoveProjectUserPermissionBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RemoveProjectUserPermissionBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/resize_vm_disk_response.py b/docs/cudo_compute/models/resize_vm_disk_response.py new file mode 100644 index 0000000..86b71e1 --- /dev/null +++ b/docs/cudo_compute/models/resize_vm_disk_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ResizeVMDiskResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """ResizeVMDiskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResizeVMDiskResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeVMDiskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ResizeVMDiskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/resize_vm_response.py b/docs/cudo_compute/models/resize_vm_response.py new file mode 100644 index 0000000..de1fee4 --- /dev/null +++ b/docs/cudo_compute/models/resize_vm_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class ResizeVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'vm': 'VM' + } + + attribute_map = { + 'vm': 'vm' + } + + def __init__(self, vm=None, _configuration=None): # noqa: E501 + """ResizeVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._vm = None + self.discriminator = None + + self.vm = vm + + @property + def vm(self): + """Gets the vm of this ResizeVMResponse. # noqa: E501 + + + :return: The vm of this ResizeVMResponse. # noqa: E501 + :rtype: VM + """ + return self._vm + + @vm.setter + def vm(self, vm): + """Sets the vm of this ResizeVMResponse. + + + :param vm: The vm of this ResizeVMResponse. # noqa: E501 + :type: VM + """ + if self._configuration.client_side_validation and vm is None: + raise ValueError("Invalid value for `vm`, must not be `None`") # noqa: E501 + + self._vm = vm + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ResizeVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ResizeVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ResizeVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/result.py b/docs/cudo_compute/models/result.py new file mode 100644 index 0000000..770a864 --- /dev/null +++ b/docs/cudo_compute/models/result.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Result(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'resource_type': 'str', + 'resource_name': 'str', + 'score': 'float', + 'billing_account': 'BillingAccountResult', + 'project': 'ProjectResult', + 'virtual_machine': 'VirtualMachineResult', + 'disk': 'DiskResult', + 'image': 'ImageResult', + 'network': 'NetworkResult' + } + + attribute_map = { + 'resource_type': 'resourceType', + 'resource_name': 'resourceName', + 'score': 'score', + 'billing_account': 'billingAccount', + 'project': 'project', + 'virtual_machine': 'virtualMachine', + 'disk': 'disk', + 'image': 'image', + 'network': 'network' + } + + def __init__(self, resource_type=None, resource_name=None, score=None, billing_account=None, project=None, virtual_machine=None, disk=None, image=None, network=None, _configuration=None): # noqa: E501 + """Result - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._resource_type = None + self._resource_name = None + self._score = None + self._billing_account = None + self._project = None + self._virtual_machine = None + self._disk = None + self._image = None + self._network = None + self.discriminator = None + + if resource_type is not None: + self.resource_type = resource_type + if resource_name is not None: + self.resource_name = resource_name + if score is not None: + self.score = score + if billing_account is not None: + self.billing_account = billing_account + if project is not None: + self.project = project + if virtual_machine is not None: + self.virtual_machine = virtual_machine + if disk is not None: + self.disk = disk + if image is not None: + self.image = image + if network is not None: + self.network = network + + @property + def resource_type(self): + """Gets the resource_type of this Result. # noqa: E501 + + + :return: The resource_type of this Result. # noqa: E501 + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """Sets the resource_type of this Result. + + + :param resource_type: The resource_type of this Result. # noqa: E501 + :type: str + """ + + self._resource_type = resource_type + + @property + def resource_name(self): + """Gets the resource_name of this Result. # noqa: E501 + + + :return: The resource_name of this Result. # noqa: E501 + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """Sets the resource_name of this Result. + + + :param resource_name: The resource_name of this Result. # noqa: E501 + :type: str + """ + + self._resource_name = resource_name + + @property + def score(self): + """Gets the score of this Result. # noqa: E501 + + + :return: The score of this Result. # noqa: E501 + :rtype: float + """ + return self._score + + @score.setter + def score(self, score): + """Sets the score of this Result. + + + :param score: The score of this Result. # noqa: E501 + :type: float + """ + + self._score = score + + @property + def billing_account(self): + """Gets the billing_account of this Result. # noqa: E501 + + + :return: The billing_account of this Result. # noqa: E501 + :rtype: BillingAccountResult + """ + return self._billing_account + + @billing_account.setter + def billing_account(self, billing_account): + """Sets the billing_account of this Result. + + + :param billing_account: The billing_account of this Result. # noqa: E501 + :type: BillingAccountResult + """ + + self._billing_account = billing_account + + @property + def project(self): + """Gets the project of this Result. # noqa: E501 + + + :return: The project of this Result. # noqa: E501 + :rtype: ProjectResult + """ + return self._project + + @project.setter + def project(self, project): + """Sets the project of this Result. + + + :param project: The project of this Result. # noqa: E501 + :type: ProjectResult + """ + + self._project = project + + @property + def virtual_machine(self): + """Gets the virtual_machine of this Result. # noqa: E501 + + + :return: The virtual_machine of this Result. # noqa: E501 + :rtype: VirtualMachineResult + """ + return self._virtual_machine + + @virtual_machine.setter + def virtual_machine(self, virtual_machine): + """Sets the virtual_machine of this Result. + + + :param virtual_machine: The virtual_machine of this Result. # noqa: E501 + :type: VirtualMachineResult + """ + + self._virtual_machine = virtual_machine + + @property + def disk(self): + """Gets the disk of this Result. # noqa: E501 + + + :return: The disk of this Result. # noqa: E501 + :rtype: DiskResult + """ + return self._disk + + @disk.setter + def disk(self, disk): + """Sets the disk of this Result. + + + :param disk: The disk of this Result. # noqa: E501 + :type: DiskResult + """ + + self._disk = disk + + @property + def image(self): + """Gets the image of this Result. # noqa: E501 + + + :return: The image of this Result. # noqa: E501 + :rtype: ImageResult + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this Result. + + + :param image: The image of this Result. # noqa: E501 + :type: ImageResult + """ + + self._image = image + + @property + def network(self): + """Gets the network of this Result. # noqa: E501 + + + :return: The network of this Result. # noqa: E501 + :rtype: NetworkResult + """ + return self._network + + @network.setter + def network(self, network): + """Sets the network of this Result. + + + :param network: The network of this Result. # noqa: E501 + :type: NetworkResult + """ + + self._network = network + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Result, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Result): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Result): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/revert_disk_response.py b/docs/cudo_compute/models/revert_disk_response.py new file mode 100644 index 0000000..2c17ff9 --- /dev/null +++ b/docs/cudo_compute/models/revert_disk_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RevertDiskResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """RevertDiskResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RevertDiskResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RevertDiskResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RevertDiskResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/role.py b/docs/cudo_compute/models/role.py new file mode 100644 index 0000000..40bcc55 --- /dev/null +++ b/docs/cudo_compute/models/role.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Role(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "UNKNOWN" + OWNER = "OWNER" + VIEWER = "VIEWER" + EDITOR = "EDITOR" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """Role - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Role, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Role): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Role): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/rule.py b/docs/cudo_compute/models/rule.py new file mode 100644 index 0000000..358e348 --- /dev/null +++ b/docs/cudo_compute/models/rule.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Rule(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'protocol': 'RuleProtocol', + 'ports': 'str', + 'rule_type': 'RuleRuleType', + 'ip_range_cidr': 'str', + 'icmp_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'protocol': 'protocol', + 'ports': 'ports', + 'rule_type': 'ruleType', + 'ip_range_cidr': 'ipRangeCidr', + 'icmp_type': 'icmpType' + } + + def __init__(self, id=None, protocol=None, ports=None, rule_type=None, ip_range_cidr=None, icmp_type=None, _configuration=None): # noqa: E501 + """Rule - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._protocol = None + self._ports = None + self._rule_type = None + self._ip_range_cidr = None + self._icmp_type = None + self.discriminator = None + + if id is not None: + self.id = id + if protocol is not None: + self.protocol = protocol + if ports is not None: + self.ports = ports + if rule_type is not None: + self.rule_type = rule_type + if ip_range_cidr is not None: + self.ip_range_cidr = ip_range_cidr + if icmp_type is not None: + self.icmp_type = icmp_type + + @property + def id(self): + """Gets the id of this Rule. # noqa: E501 + + + :return: The id of this Rule. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Rule. + + + :param id: The id of this Rule. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def protocol(self): + """Gets the protocol of this Rule. # noqa: E501 + + + :return: The protocol of this Rule. # noqa: E501 + :rtype: RuleProtocol + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol): + """Sets the protocol of this Rule. + + + :param protocol: The protocol of this Rule. # noqa: E501 + :type: RuleProtocol + """ + + self._protocol = protocol + + @property + def ports(self): + """Gets the ports of this Rule. # noqa: E501 + + + :return: The ports of this Rule. # noqa: E501 + :rtype: str + """ + return self._ports + + @ports.setter + def ports(self, ports): + """Sets the ports of this Rule. + + + :param ports: The ports of this Rule. # noqa: E501 + :type: str + """ + + self._ports = ports + + @property + def rule_type(self): + """Gets the rule_type of this Rule. # noqa: E501 + + + :return: The rule_type of this Rule. # noqa: E501 + :rtype: RuleRuleType + """ + return self._rule_type + + @rule_type.setter + def rule_type(self, rule_type): + """Sets the rule_type of this Rule. + + + :param rule_type: The rule_type of this Rule. # noqa: E501 + :type: RuleRuleType + """ + + self._rule_type = rule_type + + @property + def ip_range_cidr(self): + """Gets the ip_range_cidr of this Rule. # noqa: E501 + + + :return: The ip_range_cidr of this Rule. # noqa: E501 + :rtype: str + """ + return self._ip_range_cidr + + @ip_range_cidr.setter + def ip_range_cidr(self, ip_range_cidr): + """Sets the ip_range_cidr of this Rule. + + + :param ip_range_cidr: The ip_range_cidr of this Rule. # noqa: E501 + :type: str + """ + + self._ip_range_cidr = ip_range_cidr + + @property + def icmp_type(self): + """Gets the icmp_type of this Rule. # noqa: E501 + + + :return: The icmp_type of this Rule. # noqa: E501 + :rtype: str + """ + return self._icmp_type + + @icmp_type.setter + def icmp_type(self, icmp_type): + """Sets the icmp_type of this Rule. + + + :param icmp_type: The icmp_type of this Rule. # noqa: E501 + :type: str + """ + + self._icmp_type = icmp_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Rule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Rule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Rule): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/rule_protocol.py b/docs/cudo_compute/models/rule_protocol.py new file mode 100644 index 0000000..92687b6 --- /dev/null +++ b/docs/cudo_compute/models/rule_protocol.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RuleProtocol(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "PROTOCOL_UNKNOWN" + ALL = "PROTOCOL_ALL" + TCP = "PROTOCOL_TCP" + UDP = "PROTOCOL_UDP" + ICMP = "PROTOCOL_ICMP" + ICMPV6 = "PROTOCOL_ICMPv6" + IPSEC = "PROTOCOL_IPSEC" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """RuleProtocol - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RuleProtocol, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleProtocol): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RuleProtocol): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/rule_rule_type.py b/docs/cudo_compute/models/rule_rule_type.py new file mode 100644 index 0000000..80e6cb7 --- /dev/null +++ b/docs/cudo_compute/models/rule_rule_type.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class RuleRuleType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "RULE_TYPE_UNKNOWN" + INBOUND = "RULE_TYPE_INBOUND" + OUTBOUND = "RULE_TYPE_OUTBOUND" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """RuleRuleType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RuleRuleType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleRuleType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RuleRuleType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/search_resources_response.py b/docs/cudo_compute/models/search_resources_response.py new file mode 100644 index 0000000..c9793cc --- /dev/null +++ b/docs/cudo_compute/models/search_resources_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SearchResourcesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'results': 'list[Result]' + } + + attribute_map = { + 'results': 'results' + } + + def __init__(self, results=None, _configuration=None): # noqa: E501 + """SearchResourcesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._results = None + self.discriminator = None + + if results is not None: + self.results = results + + @property + def results(self): + """Gets the results of this SearchResourcesResponse. # noqa: E501 + + + :return: The results of this SearchResourcesResponse. # noqa: E501 + :rtype: list[Result] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this SearchResourcesResponse. + + + :param results: The results of this SearchResourcesResponse. # noqa: E501 + :type: list[Result] + """ + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SearchResourcesResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SearchResourcesResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SearchResourcesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/security_group.py b/docs/cudo_compute/models/security_group.py new file mode 100644 index 0000000..1ead261 --- /dev/null +++ b/docs/cudo_compute/models/security_group.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SecurityGroup(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'id': 'str', + 'description': 'str', + 'rules': 'list[Rule]' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'id': 'id', + 'description': 'description', + 'rules': 'rules' + } + + def __init__(self, data_center_id=None, id=None, description=None, rules=None, _configuration=None): # noqa: E501 + """SecurityGroup - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._id = None + self._description = None + self._rules = None + self.discriminator = None + + self.data_center_id = data_center_id + self.id = id + if description is not None: + self.description = description + if rules is not None: + self.rules = rules + + @property + def data_center_id(self): + """Gets the data_center_id of this SecurityGroup. # noqa: E501 + + + :return: The data_center_id of this SecurityGroup. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this SecurityGroup. + + + :param data_center_id: The data_center_id of this SecurityGroup. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def id(self): + """Gets the id of this SecurityGroup. # noqa: E501 + + + :return: The id of this SecurityGroup. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SecurityGroup. + + + :param id: The id of this SecurityGroup. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def description(self): + """Gets the description of this SecurityGroup. # noqa: E501 + + + :return: The description of this SecurityGroup. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this SecurityGroup. + + + :param description: The description of this SecurityGroup. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def rules(self): + """Gets the rules of this SecurityGroup. # noqa: E501 + + + :return: The rules of this SecurityGroup. # noqa: E501 + :rtype: list[Rule] + """ + return self._rules + + @rules.setter + def rules(self, rules): + """Sets the rules of this SecurityGroup. + + + :param rules: The rules of this SecurityGroup. # noqa: E501 + :type: list[Rule] + """ + + self._rules = rules + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SecurityGroup, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SecurityGroup): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SecurityGroup): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/security_group1.py b/docs/cudo_compute/models/security_group1.py new file mode 100644 index 0000000..5094786 --- /dev/null +++ b/docs/cudo_compute/models/security_group1.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SecurityGroup1(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center_id': 'str', + 'description': 'str', + 'rules': 'list[Rule]' + } + + attribute_map = { + 'data_center_id': 'dataCenterId', + 'description': 'description', + 'rules': 'rules' + } + + def __init__(self, data_center_id=None, description=None, rules=None, _configuration=None): # noqa: E501 + """SecurityGroup1 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center_id = None + self._description = None + self._rules = None + self.discriminator = None + + self.data_center_id = data_center_id + if description is not None: + self.description = description + if rules is not None: + self.rules = rules + + @property + def data_center_id(self): + """Gets the data_center_id of this SecurityGroup1. # noqa: E501 + + + :return: The data_center_id of this SecurityGroup1. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this SecurityGroup1. + + + :param data_center_id: The data_center_id of this SecurityGroup1. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and data_center_id is None: + raise ValueError("Invalid value for `data_center_id`, must not be `None`") # noqa: E501 + + self._data_center_id = data_center_id + + @property + def description(self): + """Gets the description of this SecurityGroup1. # noqa: E501 + + + :return: The description of this SecurityGroup1. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this SecurityGroup1. + + + :param description: The description of this SecurityGroup1. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def rules(self): + """Gets the rules of this SecurityGroup1. # noqa: E501 + + + :return: The rules of this SecurityGroup1. # noqa: E501 + :rtype: list[Rule] + """ + return self._rules + + @rules.setter + def rules(self, rules): + """Sets the rules of this SecurityGroup1. + + + :param rules: The rules of this SecurityGroup1. # noqa: E501 + :type: list[Rule] + """ + + self._rules = rules + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SecurityGroup1, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SecurityGroup1): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SecurityGroup1): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/security_group_rule.py b/docs/cudo_compute/models/security_group_rule.py new file mode 100644 index 0000000..ae531d0 --- /dev/null +++ b/docs/cudo_compute/models/security_group_rule.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SecurityGroupRule(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'protocol': 'SecurityGroupRuleProtocol', + 'ports': 'str', + 'rule_type': 'SecurityGroupRuleRuleType', + 'ip_range_cidr': 'str', + 'icmp_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'protocol': 'protocol', + 'ports': 'ports', + 'rule_type': 'ruleType', + 'ip_range_cidr': 'ipRangeCidr', + 'icmp_type': 'icmpType' + } + + def __init__(self, id=None, protocol=None, ports=None, rule_type=None, ip_range_cidr=None, icmp_type=None, _configuration=None): # noqa: E501 + """SecurityGroupRule - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._protocol = None + self._ports = None + self._rule_type = None + self._ip_range_cidr = None + self._icmp_type = None + self.discriminator = None + + if id is not None: + self.id = id + if protocol is not None: + self.protocol = protocol + if ports is not None: + self.ports = ports + if rule_type is not None: + self.rule_type = rule_type + if ip_range_cidr is not None: + self.ip_range_cidr = ip_range_cidr + if icmp_type is not None: + self.icmp_type = icmp_type + + @property + def id(self): + """Gets the id of this SecurityGroupRule. # noqa: E501 + + + :return: The id of this SecurityGroupRule. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SecurityGroupRule. + + + :param id: The id of this SecurityGroupRule. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def protocol(self): + """Gets the protocol of this SecurityGroupRule. # noqa: E501 + + + :return: The protocol of this SecurityGroupRule. # noqa: E501 + :rtype: SecurityGroupRuleProtocol + """ + return self._protocol + + @protocol.setter + def protocol(self, protocol): + """Sets the protocol of this SecurityGroupRule. + + + :param protocol: The protocol of this SecurityGroupRule. # noqa: E501 + :type: SecurityGroupRuleProtocol + """ + + self._protocol = protocol + + @property + def ports(self): + """Gets the ports of this SecurityGroupRule. # noqa: E501 + + + :return: The ports of this SecurityGroupRule. # noqa: E501 + :rtype: str + """ + return self._ports + + @ports.setter + def ports(self, ports): + """Sets the ports of this SecurityGroupRule. + + + :param ports: The ports of this SecurityGroupRule. # noqa: E501 + :type: str + """ + + self._ports = ports + + @property + def rule_type(self): + """Gets the rule_type of this SecurityGroupRule. # noqa: E501 + + + :return: The rule_type of this SecurityGroupRule. # noqa: E501 + :rtype: SecurityGroupRuleRuleType + """ + return self._rule_type + + @rule_type.setter + def rule_type(self, rule_type): + """Sets the rule_type of this SecurityGroupRule. + + + :param rule_type: The rule_type of this SecurityGroupRule. # noqa: E501 + :type: SecurityGroupRuleRuleType + """ + + self._rule_type = rule_type + + @property + def ip_range_cidr(self): + """Gets the ip_range_cidr of this SecurityGroupRule. # noqa: E501 + + + :return: The ip_range_cidr of this SecurityGroupRule. # noqa: E501 + :rtype: str + """ + return self._ip_range_cidr + + @ip_range_cidr.setter + def ip_range_cidr(self, ip_range_cidr): + """Sets the ip_range_cidr of this SecurityGroupRule. + + + :param ip_range_cidr: The ip_range_cidr of this SecurityGroupRule. # noqa: E501 + :type: str + """ + + self._ip_range_cidr = ip_range_cidr + + @property + def icmp_type(self): + """Gets the icmp_type of this SecurityGroupRule. # noqa: E501 + + + :return: The icmp_type of this SecurityGroupRule. # noqa: E501 + :rtype: str + """ + return self._icmp_type + + @icmp_type.setter + def icmp_type(self, icmp_type): + """Sets the icmp_type of this SecurityGroupRule. + + + :param icmp_type: The icmp_type of this SecurityGroupRule. # noqa: E501 + :type: str + """ + + self._icmp_type = icmp_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SecurityGroupRule, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SecurityGroupRule): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SecurityGroupRule): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/security_group_rule_protocol.py b/docs/cudo_compute/models/security_group_rule_protocol.py new file mode 100644 index 0000000..c804a5b --- /dev/null +++ b/docs/cudo_compute/models/security_group_rule_protocol.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SecurityGroupRuleProtocol(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "PROTOCOL_UNKNOWN" + ALL = "PROTOCOL_ALL" + TCP = "PROTOCOL_TCP" + UDP = "PROTOCOL_UDP" + ICMP = "PROTOCOL_ICMP" + ICMPV6 = "PROTOCOL_ICMPv6" + IPSEC = "PROTOCOL_IPSEC" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """SecurityGroupRuleProtocol - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SecurityGroupRuleProtocol, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SecurityGroupRuleProtocol): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SecurityGroupRuleProtocol): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/security_group_rule_rule_type.py b/docs/cudo_compute/models/security_group_rule_rule_type.py new file mode 100644 index 0000000..043b488 --- /dev/null +++ b/docs/cudo_compute/models/security_group_rule_rule_type.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SecurityGroupRuleRuleType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "RULE_TYPE_UNKNOWN" + INBOUND = "RULE_TYPE_INBOUND" + OUTBOUND = "RULE_TYPE_OUTBOUND" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """SecurityGroupRuleRuleType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SecurityGroupRuleRuleType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SecurityGroupRuleRuleType): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SecurityGroupRuleRuleType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/set_billing_account_default_payment_method_response.py b/docs/cudo_compute/models/set_billing_account_default_payment_method_response.py new file mode 100644 index 0000000..5b3f6d8 --- /dev/null +++ b/docs/cudo_compute/models/set_billing_account_default_payment_method_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SetBillingAccountDefaultPaymentMethodResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'payment_method_id': 'str' + } + + attribute_map = { + 'id': 'id', + 'payment_method_id': 'paymentMethodId' + } + + def __init__(self, id=None, payment_method_id=None, _configuration=None): # noqa: E501 + """SetBillingAccountDefaultPaymentMethodResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._payment_method_id = None + self.discriminator = None + + self.id = id + self.payment_method_id = payment_method_id + + @property + def id(self): + """Gets the id of this SetBillingAccountDefaultPaymentMethodResponse. # noqa: E501 + + + :return: The id of this SetBillingAccountDefaultPaymentMethodResponse. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SetBillingAccountDefaultPaymentMethodResponse. + + + :param id: The id of this SetBillingAccountDefaultPaymentMethodResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def payment_method_id(self): + """Gets the payment_method_id of this SetBillingAccountDefaultPaymentMethodResponse. # noqa: E501 + + + :return: The payment_method_id of this SetBillingAccountDefaultPaymentMethodResponse. # noqa: E501 + :rtype: str + """ + return self._payment_method_id + + @payment_method_id.setter + def payment_method_id(self, payment_method_id): + """Sets the payment_method_id of this SetBillingAccountDefaultPaymentMethodResponse. + + + :param payment_method_id: The payment_method_id of this SetBillingAccountDefaultPaymentMethodResponse. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and payment_method_id is None: + raise ValueError("Invalid value for `payment_method_id`, must not be `None`") # noqa: E501 + + self._payment_method_id = payment_method_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SetBillingAccountDefaultPaymentMethodResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SetBillingAccountDefaultPaymentMethodResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SetBillingAccountDefaultPaymentMethodResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/snapshot.py b/docs/cudo_compute/models/snapshot.py new file mode 100644 index 0000000..1c7b21f --- /dev/null +++ b/docs/cudo_compute/models/snapshot.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Snapshot(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'active': 'bool', + 'size_gib': 'int', + 'create_time': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'active': 'active', + 'size_gib': 'sizeGib', + 'create_time': 'createTime' + } + + def __init__(self, id=None, active=None, size_gib=None, create_time=None, _configuration=None): # noqa: E501 + """Snapshot - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._active = None + self._size_gib = None + self._create_time = None + self.discriminator = None + + if id is not None: + self.id = id + if active is not None: + self.active = active + if size_gib is not None: + self.size_gib = size_gib + if create_time is not None: + self.create_time = create_time + + @property + def id(self): + """Gets the id of this Snapshot. # noqa: E501 + + + :return: The id of this Snapshot. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Snapshot. + + + :param id: The id of this Snapshot. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def active(self): + """Gets the active of this Snapshot. # noqa: E501 + + + :return: The active of this Snapshot. # noqa: E501 + :rtype: bool + """ + return self._active + + @active.setter + def active(self, active): + """Sets the active of this Snapshot. + + + :param active: The active of this Snapshot. # noqa: E501 + :type: bool + """ + + self._active = active + + @property + def size_gib(self): + """Gets the size_gib of this Snapshot. # noqa: E501 + + + :return: The size_gib of this Snapshot. # noqa: E501 + :rtype: int + """ + return self._size_gib + + @size_gib.setter + def size_gib(self, size_gib): + """Sets the size_gib of this Snapshot. + + + :param size_gib: The size_gib of this Snapshot. # noqa: E501 + :type: int + """ + + self._size_gib = size_gib + + @property + def create_time(self): + """Gets the create_time of this Snapshot. # noqa: E501 + + + :return: The create_time of this Snapshot. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Snapshot. + + + :param create_time: The create_time of this Snapshot. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Snapshot, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Snapshot): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Snapshot): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/ssh_key.py b/docs/cudo_compute/models/ssh_key.py new file mode 100644 index 0000000..6c9b12a --- /dev/null +++ b/docs/cudo_compute/models/ssh_key.py @@ -0,0 +1,254 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SshKey(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'create_time': 'datetime', + 'public_key': 'str', + 'fingerprint': 'str', + 'type': 'str', + 'comment': 'str' + } + + attribute_map = { + 'id': 'id', + 'create_time': 'createTime', + 'public_key': 'publicKey', + 'fingerprint': 'fingerprint', + 'type': 'type', + 'comment': 'comment' + } + + def __init__(self, id=None, create_time=None, public_key=None, fingerprint=None, type=None, comment=None, _configuration=None): # noqa: E501 + """SshKey - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._create_time = None + self._public_key = None + self._fingerprint = None + self._type = None + self._comment = None + self.discriminator = None + + if id is not None: + self.id = id + if create_time is not None: + self.create_time = create_time + self.public_key = public_key + if fingerprint is not None: + self.fingerprint = fingerprint + if type is not None: + self.type = type + if comment is not None: + self.comment = comment + + @property + def id(self): + """Gets the id of this SshKey. # noqa: E501 + + + :return: The id of this SshKey. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SshKey. + + + :param id: The id of this SshKey. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def create_time(self): + """Gets the create_time of this SshKey. # noqa: E501 + + + :return: The create_time of this SshKey. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this SshKey. + + + :param create_time: The create_time of this SshKey. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def public_key(self): + """Gets the public_key of this SshKey. # noqa: E501 + + + :return: The public_key of this SshKey. # noqa: E501 + :rtype: str + """ + return self._public_key + + @public_key.setter + def public_key(self, public_key): + """Sets the public_key of this SshKey. + + + :param public_key: The public_key of this SshKey. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and public_key is None: + raise ValueError("Invalid value for `public_key`, must not be `None`") # noqa: E501 + + self._public_key = public_key + + @property + def fingerprint(self): + """Gets the fingerprint of this SshKey. # noqa: E501 + + + :return: The fingerprint of this SshKey. # noqa: E501 + :rtype: str + """ + return self._fingerprint + + @fingerprint.setter + def fingerprint(self, fingerprint): + """Sets the fingerprint of this SshKey. + + + :param fingerprint: The fingerprint of this SshKey. # noqa: E501 + :type: str + """ + + self._fingerprint = fingerprint + + @property + def type(self): + """Gets the type of this SshKey. # noqa: E501 + + + :return: The type of this SshKey. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this SshKey. + + + :param type: The type of this SshKey. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def comment(self): + """Gets the comment of this SshKey. # noqa: E501 + + + :return: The comment of this SshKey. # noqa: E501 + :rtype: str + """ + return self._comment + + @comment.setter + def comment(self, comment): + """Sets the comment of this SshKey. + + + :param comment: The comment of this SshKey. # noqa: E501 + :type: str + """ + + self._comment = comment + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SshKey, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SshKey): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SshKey): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/ssh_key_source.py b/docs/cudo_compute/models/ssh_key_source.py new file mode 100644 index 0000000..946fdc0 --- /dev/null +++ b/docs/cudo_compute/models/ssh_key_source.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SshKeySource(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "SSH_KEY_SOURCE_UNKNOWN" + PROJECT = "SSH_KEY_SOURCE_PROJECT" + USER = "SSH_KEY_SOURCE_USER" + NONE = "SSH_KEY_SOURCE_NONE" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """SshKeySource - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SshKeySource, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SshKeySource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SshKeySource): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/start_network_response.py b/docs/cudo_compute/models/start_network_response.py new file mode 100644 index 0000000..2e5f907 --- /dev/null +++ b/docs/cudo_compute/models/start_network_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class StartNetworkResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """StartNetworkResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StartNetworkResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StartNetworkResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StartNetworkResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/start_vm_response.py b/docs/cudo_compute/models/start_vm_response.py new file mode 100644 index 0000000..f1e1c32 --- /dev/null +++ b/docs/cudo_compute/models/start_vm_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class StartVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """StartVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StartVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StartVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StartVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/status.py b/docs/cudo_compute/models/status.py new file mode 100644 index 0000000..49c40c5 --- /dev/null +++ b/docs/cudo_compute/models/status.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Status(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'code': 'int', + 'message': 'str', + 'details': 'list[ProtobufAny]' + } + + attribute_map = { + 'code': 'code', + 'message': 'message', + 'details': 'details' + } + + def __init__(self, code=None, message=None, details=None, _configuration=None): # noqa: E501 + """Status - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._code = None + self._message = None + self._details = None + self.discriminator = None + + if code is not None: + self.code = code + if message is not None: + self.message = message + if details is not None: + self.details = details + + @property + def code(self): + """Gets the code of this Status. # noqa: E501 + + + :return: The code of this Status. # noqa: E501 + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this Status. + + + :param code: The code of this Status. # noqa: E501 + :type: int + """ + + self._code = code + + @property + def message(self): + """Gets the message of this Status. # noqa: E501 + + + :return: The message of this Status. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this Status. + + + :param message: The message of this Status. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def details(self): + """Gets the details of this Status. # noqa: E501 + + + :return: The details of this Status. # noqa: E501 + :rtype: list[ProtobufAny] + """ + return self._details + + @details.setter + def details(self, details): + """Sets the details of this Status. + + + :param details: The details of this Status. # noqa: E501 + :type: list[ProtobufAny] + """ + + self._details = details + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Status, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Status): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Status): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/stop_network_response.py b/docs/cudo_compute/models/stop_network_response.py new file mode 100644 index 0000000..2eeee93 --- /dev/null +++ b/docs/cudo_compute/models/stop_network_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class StopNetworkResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """StopNetworkResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StopNetworkResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StopNetworkResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StopNetworkResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/stop_vm_response.py b/docs/cudo_compute/models/stop_vm_response.py new file mode 100644 index 0000000..1ff1e10 --- /dev/null +++ b/docs/cudo_compute/models/stop_vm_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class StopVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """StopVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StopVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StopVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StopVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/stripe_customer.py b/docs/cudo_compute/models/stripe_customer.py new file mode 100644 index 0000000..aa77190 --- /dev/null +++ b/docs/cudo_compute/models/stripe_customer.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class StripeCustomer(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'email': 'str', + 'balance': 'Decimal' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'email': 'email', + 'balance': 'balance' + } + + def __init__(self, id=None, name=None, email=None, balance=None, _configuration=None): # noqa: E501 + """StripeCustomer - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._name = None + self._email = None + self._balance = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if email is not None: + self.email = email + if balance is not None: + self.balance = balance + + @property + def id(self): + """Gets the id of this StripeCustomer. # noqa: E501 + + + :return: The id of this StripeCustomer. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this StripeCustomer. + + + :param id: The id of this StripeCustomer. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this StripeCustomer. # noqa: E501 + + + :return: The name of this StripeCustomer. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this StripeCustomer. + + + :param name: The name of this StripeCustomer. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def email(self): + """Gets the email of this StripeCustomer. # noqa: E501 + + + :return: The email of this StripeCustomer. # noqa: E501 + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this StripeCustomer. + + + :param email: The email of this StripeCustomer. # noqa: E501 + :type: str + """ + + self._email = email + + @property + def balance(self): + """Gets the balance of this StripeCustomer. # noqa: E501 + + + :return: The balance of this StripeCustomer. # noqa: E501 + :rtype: Decimal + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this StripeCustomer. + + + :param balance: The balance of this StripeCustomer. # noqa: E501 + :type: Decimal + """ + + self._balance = balance + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StripeCustomer, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StripeCustomer): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, StripeCustomer): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/sync_response.py b/docs/cudo_compute/models/sync_response.py new file mode 100644 index 0000000..640b3a5 --- /dev/null +++ b/docs/cudo_compute/models/sync_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class SyncResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """SyncResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SyncResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SyncResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SyncResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/task.py b/docs/cudo_compute/models/task.py new file mode 100644 index 0000000..acc9e74 --- /dev/null +++ b/docs/cudo_compute/models/task.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Task(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'task_name': 'str', + 'percent_complete': 'int', + 'project_id': 'str' + } + + attribute_map = { + 'task_name': 'taskName', + 'percent_complete': 'percentComplete', + 'project_id': 'projectId' + } + + def __init__(self, task_name=None, percent_complete=None, project_id=None, _configuration=None): # noqa: E501 + """Task - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._task_name = None + self._percent_complete = None + self._project_id = None + self.discriminator = None + + if task_name is not None: + self.task_name = task_name + if percent_complete is not None: + self.percent_complete = percent_complete + if project_id is not None: + self.project_id = project_id + + @property + def task_name(self): + """Gets the task_name of this Task. # noqa: E501 + + + :return: The task_name of this Task. # noqa: E501 + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this Task. + + + :param task_name: The task_name of this Task. # noqa: E501 + :type: str + """ + + self._task_name = task_name + + @property + def percent_complete(self): + """Gets the percent_complete of this Task. # noqa: E501 + + + :return: The percent_complete of this Task. # noqa: E501 + :rtype: int + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """Sets the percent_complete of this Task. + + + :param percent_complete: The percent_complete of this Task. # noqa: E501 + :type: int + """ + + self._percent_complete = percent_complete + + @property + def project_id(self): + """Gets the project_id of this Task. # noqa: E501 + + + :return: The project_id of this Task. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this Task. + + + :param project_id: The project_id of this Task. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Task, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Task): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Task): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/tax_id.py b/docs/cudo_compute/models/tax_id.py new file mode 100644 index 0000000..2de7c03 --- /dev/null +++ b/docs/cudo_compute/models/tax_id.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class TaxId(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'type': 'str', + 'value': 'str' + } + + attribute_map = { + 'id': 'id', + 'type': 'type', + 'value': 'value' + } + + def __init__(self, id=None, type=None, value=None, _configuration=None): # noqa: E501 + """TaxId - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._type = None + self._value = None + self.discriminator = None + + if id is not None: + self.id = id + if type is not None: + self.type = type + if value is not None: + self.value = value + + @property + def id(self): + """Gets the id of this TaxId. # noqa: E501 + + + :return: The id of this TaxId. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TaxId. + + + :param id: The id of this TaxId. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def type(self): + """Gets the type of this TaxId. # noqa: E501 + + + :return: The type of this TaxId. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this TaxId. + + + :param type: The type of this TaxId. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def value(self): + """Gets the value of this TaxId. # noqa: E501 + + + :return: The value of this TaxId. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this TaxId. + + + :param value: The value of this TaxId. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TaxId, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaxId): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TaxId): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/terminate_vm_response.py b/docs/cudo_compute/models/terminate_vm_response.py new file mode 100644 index 0000000..8516819 --- /dev/null +++ b/docs/cudo_compute/models/terminate_vm_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class TerminateVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """TerminateVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TerminateVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TerminateVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TerminateVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/track_request.py b/docs/cudo_compute/models/track_request.py new file mode 100644 index 0000000..bbe93cf --- /dev/null +++ b/docs/cudo_compute/models/track_request.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class TrackRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'client_id': 'str' + } + + attribute_map = { + 'client_id': 'clientId' + } + + def __init__(self, client_id=None, _configuration=None): # noqa: E501 + """TrackRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._client_id = None + self.discriminator = None + + if client_id is not None: + self.client_id = client_id + + @property + def client_id(self): + """Gets the client_id of this TrackRequest. # noqa: E501 + + + :return: The client_id of this TrackRequest. # noqa: E501 + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this TrackRequest. + + + :param client_id: The client_id of this TrackRequest. # noqa: E501 + :type: str + """ + + self._client_id = client_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TrackRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TrackRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TrackRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/transaction.py b/docs/cudo_compute/models/transaction.py new file mode 100644 index 0000000..67de1a1 --- /dev/null +++ b/docs/cudo_compute/models/transaction.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Transaction(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'amount': 'Decimal', + 'description': 'str', + 'create_time': 'datetime', + 'status': 'str', + 'succeeded': 'bool', + 'latest_charge': 'Charge', + 'last_payment_error': 'LastPaymentError' + } + + attribute_map = { + 'id': 'id', + 'amount': 'amount', + 'description': 'description', + 'create_time': 'createTime', + 'status': 'status', + 'succeeded': 'succeeded', + 'latest_charge': 'latestCharge', + 'last_payment_error': 'lastPaymentError' + } + + def __init__(self, id=None, amount=None, description=None, create_time=None, status=None, succeeded=None, latest_charge=None, last_payment_error=None, _configuration=None): # noqa: E501 + """Transaction - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._amount = None + self._description = None + self._create_time = None + self._status = None + self._succeeded = None + self._latest_charge = None + self._last_payment_error = None + self.discriminator = None + + self.id = id + self.amount = amount + self.description = description + self.create_time = create_time + self.status = status + self.succeeded = succeeded + self.latest_charge = latest_charge + self.last_payment_error = last_payment_error + + @property + def id(self): + """Gets the id of this Transaction. # noqa: E501 + + + :return: The id of this Transaction. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Transaction. + + + :param id: The id of this Transaction. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def amount(self): + """Gets the amount of this Transaction. # noqa: E501 + + + :return: The amount of this Transaction. # noqa: E501 + :rtype: Decimal + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Transaction. + + + :param amount: The amount of this Transaction. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def description(self): + """Gets the description of this Transaction. # noqa: E501 + + + :return: The description of this Transaction. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this Transaction. + + + :param description: The description of this Transaction. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and description is None: + raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 + + self._description = description + + @property + def create_time(self): + """Gets the create_time of this Transaction. # noqa: E501 + + + :return: The create_time of this Transaction. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this Transaction. + + + :param create_time: The create_time of this Transaction. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and create_time is None: + raise ValueError("Invalid value for `create_time`, must not be `None`") # noqa: E501 + + self._create_time = create_time + + @property + def status(self): + """Gets the status of this Transaction. # noqa: E501 + + + :return: The status of this Transaction. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this Transaction. + + + :param status: The status of this Transaction. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def succeeded(self): + """Gets the succeeded of this Transaction. # noqa: E501 + + + :return: The succeeded of this Transaction. # noqa: E501 + :rtype: bool + """ + return self._succeeded + + @succeeded.setter + def succeeded(self, succeeded): + """Sets the succeeded of this Transaction. + + + :param succeeded: The succeeded of this Transaction. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and succeeded is None: + raise ValueError("Invalid value for `succeeded`, must not be `None`") # noqa: E501 + + self._succeeded = succeeded + + @property + def latest_charge(self): + """Gets the latest_charge of this Transaction. # noqa: E501 + + + :return: The latest_charge of this Transaction. # noqa: E501 + :rtype: Charge + """ + return self._latest_charge + + @latest_charge.setter + def latest_charge(self, latest_charge): + """Sets the latest_charge of this Transaction. + + + :param latest_charge: The latest_charge of this Transaction. # noqa: E501 + :type: Charge + """ + if self._configuration.client_side_validation and latest_charge is None: + raise ValueError("Invalid value for `latest_charge`, must not be `None`") # noqa: E501 + + self._latest_charge = latest_charge + + @property + def last_payment_error(self): + """Gets the last_payment_error of this Transaction. # noqa: E501 + + + :return: The last_payment_error of this Transaction. # noqa: E501 + :rtype: LastPaymentError + """ + return self._last_payment_error + + @last_payment_error.setter + def last_payment_error(self, last_payment_error): + """Sets the last_payment_error of this Transaction. + + + :param last_payment_error: The last_payment_error of this Transaction. # noqa: E501 + :type: LastPaymentError + """ + if self._configuration.client_side_validation and last_payment_error is None: + raise ValueError("Invalid value for `last_payment_error`, must not be `None`") # noqa: E501 + + self._last_payment_error = last_payment_error + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Transaction, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Transaction): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Transaction): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/unit.py b/docs/cudo_compute/models/unit.py new file mode 100644 index 0000000..32f2891 --- /dev/null +++ b/docs/cudo_compute/models/unit.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class Unit(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "UNIT_UNKNOWN" + GIB_HOUR = "UNIT_GIB_HOUR" + HOUR = "UNIT_HOUR" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """Unit - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Unit, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Unit): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Unit): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_billing_account_body.py b/docs/cudo_compute/models/update_billing_account_body.py new file mode 100644 index 0000000..74aff8d --- /dev/null +++ b/docs/cudo_compute/models/update_billing_account_body.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateBillingAccountBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'billing_account': 'UpdateBillingAccountBodyBillingAccount', + 'update_mask': 'str' + } + + attribute_map = { + 'billing_account': 'billingAccount', + 'update_mask': 'updateMask' + } + + def __init__(self, billing_account=None, update_mask=None, _configuration=None): # noqa: E501 + """UpdateBillingAccountBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._billing_account = None + self._update_mask = None + self.discriminator = None + + if billing_account is not None: + self.billing_account = billing_account + self.update_mask = update_mask + + @property + def billing_account(self): + """Gets the billing_account of this UpdateBillingAccountBody. # noqa: E501 + + + :return: The billing_account of this UpdateBillingAccountBody. # noqa: E501 + :rtype: UpdateBillingAccountBodyBillingAccount + """ + return self._billing_account + + @billing_account.setter + def billing_account(self, billing_account): + """Sets the billing_account of this UpdateBillingAccountBody. + + + :param billing_account: The billing_account of this UpdateBillingAccountBody. # noqa: E501 + :type: UpdateBillingAccountBodyBillingAccount + """ + + self._billing_account = billing_account + + @property + def update_mask(self): + """Gets the update_mask of this UpdateBillingAccountBody. # noqa: E501 + + + :return: The update_mask of this UpdateBillingAccountBody. # noqa: E501 + :rtype: str + """ + return self._update_mask + + @update_mask.setter + def update_mask(self, update_mask): + """Sets the update_mask of this UpdateBillingAccountBody. + + + :param update_mask: The update_mask of this UpdateBillingAccountBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and update_mask is None: + raise ValueError("Invalid value for `update_mask`, must not be `None`") # noqa: E501 + + self._update_mask = update_mask + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateBillingAccountBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateBillingAccountBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateBillingAccountBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_billing_account_body_billing_account.py b/docs/cudo_compute/models/update_billing_account_body_billing_account.py new file mode 100644 index 0000000..3e2524b --- /dev/null +++ b/docs/cudo_compute/models/update_billing_account_body_billing_account.py @@ -0,0 +1,539 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateBillingAccountBodyBillingAccount(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'create_time': 'datetime', + 'display_name': 'str', + 'stripe_ref': 'str', + 'create_by': 'str', + 'monthly_spend': 'str', + 'hourly_spend_rate': 'Decimal', + 'tax_id': 'TaxId', + 'invoice_time': 'datetime', + 'billing_threshold': 'Decimal', + 'monthly_spend_limit': 'Decimal', + 'hourly_spend_limit': 'Decimal', + 'next_invoice_total': 'Decimal', + 'credit_balance': 'Decimal', + 'credit_balance_recharge': 'CreditBalanceRecharge', + 'billing_address': 'BillingAddress', + 'state': 'BillingAccountState', + 'payment_terms': 'PaymentTerms' + } + + attribute_map = { + 'create_time': 'createTime', + 'display_name': 'displayName', + 'stripe_ref': 'stripeRef', + 'create_by': 'createBy', + 'monthly_spend': 'monthlySpend', + 'hourly_spend_rate': 'hourlySpendRate', + 'tax_id': 'taxId', + 'invoice_time': 'invoiceTime', + 'billing_threshold': 'billingThreshold', + 'monthly_spend_limit': 'monthlySpendLimit', + 'hourly_spend_limit': 'hourlySpendLimit', + 'next_invoice_total': 'nextInvoiceTotal', + 'credit_balance': 'creditBalance', + 'credit_balance_recharge': 'creditBalanceRecharge', + 'billing_address': 'billingAddress', + 'state': 'state', + 'payment_terms': 'paymentTerms' + } + + def __init__(self, create_time=None, display_name=None, stripe_ref=None, create_by=None, monthly_spend=None, hourly_spend_rate=None, tax_id=None, invoice_time=None, billing_threshold=None, monthly_spend_limit=None, hourly_spend_limit=None, next_invoice_total=None, credit_balance=None, credit_balance_recharge=None, billing_address=None, state=None, payment_terms=None, _configuration=None): # noqa: E501 + """UpdateBillingAccountBodyBillingAccount - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._create_time = None + self._display_name = None + self._stripe_ref = None + self._create_by = None + self._monthly_spend = None + self._hourly_spend_rate = None + self._tax_id = None + self._invoice_time = None + self._billing_threshold = None + self._monthly_spend_limit = None + self._hourly_spend_limit = None + self._next_invoice_total = None + self._credit_balance = None + self._credit_balance_recharge = None + self._billing_address = None + self._state = None + self._payment_terms = None + self.discriminator = None + + if create_time is not None: + self.create_time = create_time + if display_name is not None: + self.display_name = display_name + if stripe_ref is not None: + self.stripe_ref = stripe_ref + if create_by is not None: + self.create_by = create_by + if monthly_spend is not None: + self.monthly_spend = monthly_spend + if hourly_spend_rate is not None: + self.hourly_spend_rate = hourly_spend_rate + if tax_id is not None: + self.tax_id = tax_id + if invoice_time is not None: + self.invoice_time = invoice_time + if billing_threshold is not None: + self.billing_threshold = billing_threshold + if monthly_spend_limit is not None: + self.monthly_spend_limit = monthly_spend_limit + if hourly_spend_limit is not None: + self.hourly_spend_limit = hourly_spend_limit + if next_invoice_total is not None: + self.next_invoice_total = next_invoice_total + if credit_balance is not None: + self.credit_balance = credit_balance + if credit_balance_recharge is not None: + self.credit_balance_recharge = credit_balance_recharge + if billing_address is not None: + self.billing_address = billing_address + if state is not None: + self.state = state + if payment_terms is not None: + self.payment_terms = payment_terms + + @property + def create_time(self): + """Gets the create_time of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The create_time of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this UpdateBillingAccountBodyBillingAccount. + + + :param create_time: The create_time of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def display_name(self): + """Gets the display_name of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The display_name of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this UpdateBillingAccountBodyBillingAccount. + + + :param display_name: The display_name of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: str + """ + + self._display_name = display_name + + @property + def stripe_ref(self): + """Gets the stripe_ref of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The stripe_ref of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: str + """ + return self._stripe_ref + + @stripe_ref.setter + def stripe_ref(self, stripe_ref): + """Sets the stripe_ref of this UpdateBillingAccountBodyBillingAccount. + + + :param stripe_ref: The stripe_ref of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: str + """ + + self._stripe_ref = stripe_ref + + @property + def create_by(self): + """Gets the create_by of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The create_by of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this UpdateBillingAccountBodyBillingAccount. + + + :param create_by: The create_by of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def monthly_spend(self): + """Gets the monthly_spend of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The monthly_spend of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: str + """ + return self._monthly_spend + + @monthly_spend.setter + def monthly_spend(self, monthly_spend): + """Sets the monthly_spend of this UpdateBillingAccountBodyBillingAccount. + + + :param monthly_spend: The monthly_spend of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: str + """ + + self._monthly_spend = monthly_spend + + @property + def hourly_spend_rate(self): + """Gets the hourly_spend_rate of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The hourly_spend_rate of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._hourly_spend_rate + + @hourly_spend_rate.setter + def hourly_spend_rate(self, hourly_spend_rate): + """Sets the hourly_spend_rate of this UpdateBillingAccountBodyBillingAccount. + + + :param hourly_spend_rate: The hourly_spend_rate of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: Decimal + """ + + self._hourly_spend_rate = hourly_spend_rate + + @property + def tax_id(self): + """Gets the tax_id of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The tax_id of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: TaxId + """ + return self._tax_id + + @tax_id.setter + def tax_id(self, tax_id): + """Sets the tax_id of this UpdateBillingAccountBodyBillingAccount. + + + :param tax_id: The tax_id of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: TaxId + """ + + self._tax_id = tax_id + + @property + def invoice_time(self): + """Gets the invoice_time of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The invoice_time of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: datetime + """ + return self._invoice_time + + @invoice_time.setter + def invoice_time(self, invoice_time): + """Sets the invoice_time of this UpdateBillingAccountBodyBillingAccount. + + + :param invoice_time: The invoice_time of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: datetime + """ + + self._invoice_time = invoice_time + + @property + def billing_threshold(self): + """Gets the billing_threshold of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The billing_threshold of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._billing_threshold + + @billing_threshold.setter + def billing_threshold(self, billing_threshold): + """Sets the billing_threshold of this UpdateBillingAccountBodyBillingAccount. + + + :param billing_threshold: The billing_threshold of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: Decimal + """ + + self._billing_threshold = billing_threshold + + @property + def monthly_spend_limit(self): + """Gets the monthly_spend_limit of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The monthly_spend_limit of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._monthly_spend_limit + + @monthly_spend_limit.setter + def monthly_spend_limit(self, monthly_spend_limit): + """Sets the monthly_spend_limit of this UpdateBillingAccountBodyBillingAccount. + + + :param monthly_spend_limit: The monthly_spend_limit of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: Decimal + """ + + self._monthly_spend_limit = monthly_spend_limit + + @property + def hourly_spend_limit(self): + """Gets the hourly_spend_limit of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The hourly_spend_limit of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._hourly_spend_limit + + @hourly_spend_limit.setter + def hourly_spend_limit(self, hourly_spend_limit): + """Sets the hourly_spend_limit of this UpdateBillingAccountBodyBillingAccount. + + + :param hourly_spend_limit: The hourly_spend_limit of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: Decimal + """ + + self._hourly_spend_limit = hourly_spend_limit + + @property + def next_invoice_total(self): + """Gets the next_invoice_total of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The next_invoice_total of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._next_invoice_total + + @next_invoice_total.setter + def next_invoice_total(self, next_invoice_total): + """Sets the next_invoice_total of this UpdateBillingAccountBodyBillingAccount. + + + :param next_invoice_total: The next_invoice_total of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: Decimal + """ + + self._next_invoice_total = next_invoice_total + + @property + def credit_balance(self): + """Gets the credit_balance of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The credit_balance of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._credit_balance + + @credit_balance.setter + def credit_balance(self, credit_balance): + """Sets the credit_balance of this UpdateBillingAccountBodyBillingAccount. + + + :param credit_balance: The credit_balance of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: Decimal + """ + + self._credit_balance = credit_balance + + @property + def credit_balance_recharge(self): + """Gets the credit_balance_recharge of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The credit_balance_recharge of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: CreditBalanceRecharge + """ + return self._credit_balance_recharge + + @credit_balance_recharge.setter + def credit_balance_recharge(self, credit_balance_recharge): + """Sets the credit_balance_recharge of this UpdateBillingAccountBodyBillingAccount. + + + :param credit_balance_recharge: The credit_balance_recharge of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: CreditBalanceRecharge + """ + + self._credit_balance_recharge = credit_balance_recharge + + @property + def billing_address(self): + """Gets the billing_address of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The billing_address of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: BillingAddress + """ + return self._billing_address + + @billing_address.setter + def billing_address(self, billing_address): + """Sets the billing_address of this UpdateBillingAccountBodyBillingAccount. + + + :param billing_address: The billing_address of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: BillingAddress + """ + + self._billing_address = billing_address + + @property + def state(self): + """Gets the state of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The state of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: BillingAccountState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this UpdateBillingAccountBodyBillingAccount. + + + :param state: The state of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: BillingAccountState + """ + + self._state = state + + @property + def payment_terms(self): + """Gets the payment_terms of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + + + :return: The payment_terms of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :rtype: PaymentTerms + """ + return self._payment_terms + + @payment_terms.setter + def payment_terms(self, payment_terms): + """Sets the payment_terms of this UpdateBillingAccountBodyBillingAccount. + + + :param payment_terms: The payment_terms of this UpdateBillingAccountBodyBillingAccount. # noqa: E501 + :type: PaymentTerms + """ + + self._payment_terms = payment_terms + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateBillingAccountBodyBillingAccount, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateBillingAccountBodyBillingAccount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateBillingAccountBodyBillingAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_data_center_body.py b/docs/cudo_compute/models/update_data_center_body.py new file mode 100644 index 0000000..ec6dceb --- /dev/null +++ b/docs/cudo_compute/models/update_data_center_body.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateDataCenterBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data_center': 'UpdateDataCenterBodyDataCenter', + 'update_mask': 'str' + } + + attribute_map = { + 'data_center': 'dataCenter', + 'update_mask': 'updateMask' + } + + def __init__(self, data_center=None, update_mask=None, _configuration=None): # noqa: E501 + """UpdateDataCenterBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._data_center = None + self._update_mask = None + self.discriminator = None + + if data_center is not None: + self.data_center = data_center + if update_mask is not None: + self.update_mask = update_mask + + @property + def data_center(self): + """Gets the data_center of this UpdateDataCenterBody. # noqa: E501 + + + :return: The data_center of this UpdateDataCenterBody. # noqa: E501 + :rtype: UpdateDataCenterBodyDataCenter + """ + return self._data_center + + @data_center.setter + def data_center(self, data_center): + """Sets the data_center of this UpdateDataCenterBody. + + + :param data_center: The data_center of this UpdateDataCenterBody. # noqa: E501 + :type: UpdateDataCenterBodyDataCenter + """ + + self._data_center = data_center + + @property + def update_mask(self): + """Gets the update_mask of this UpdateDataCenterBody. # noqa: E501 + + + :return: The update_mask of this UpdateDataCenterBody. # noqa: E501 + :rtype: str + """ + return self._update_mask + + @update_mask.setter + def update_mask(self, update_mask): + """Sets the update_mask of this UpdateDataCenterBody. + + + :param update_mask: The update_mask of this UpdateDataCenterBody. # noqa: E501 + :type: str + """ + + self._update_mask = update_mask + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateDataCenterBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateDataCenterBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateDataCenterBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_data_center_body_data_center.py b/docs/cudo_compute/models/update_data_center_body_data_center.py new file mode 100644 index 0000000..3ddd6b2 --- /dev/null +++ b/docs/cudo_compute/models/update_data_center_body_data_center.py @@ -0,0 +1,279 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateDataCenterBodyDataCenter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'region_id': 'str', + 'supplier_name': 'str', + 'renewable_energy': 'bool', + 'lng_lat': 'Point', + 'create_by': 'str', + 'one_frontend_id': 'str', + 's3_endpoint': 'str' + } + + attribute_map = { + 'region_id': 'regionId', + 'supplier_name': 'supplierName', + 'renewable_energy': 'renewableEnergy', + 'lng_lat': 'lngLat', + 'create_by': 'createBy', + 'one_frontend_id': 'oneFrontendId', + 's3_endpoint': 's3Endpoint' + } + + def __init__(self, region_id=None, supplier_name=None, renewable_energy=None, lng_lat=None, create_by=None, one_frontend_id=None, s3_endpoint=None, _configuration=None): # noqa: E501 + """UpdateDataCenterBodyDataCenter - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._region_id = None + self._supplier_name = None + self._renewable_energy = None + self._lng_lat = None + self._create_by = None + self._one_frontend_id = None + self._s3_endpoint = None + self.discriminator = None + + if region_id is not None: + self.region_id = region_id + if supplier_name is not None: + self.supplier_name = supplier_name + if renewable_energy is not None: + self.renewable_energy = renewable_energy + if lng_lat is not None: + self.lng_lat = lng_lat + if create_by is not None: + self.create_by = create_by + if one_frontend_id is not None: + self.one_frontend_id = one_frontend_id + if s3_endpoint is not None: + self.s3_endpoint = s3_endpoint + + @property + def region_id(self): + """Gets the region_id of this UpdateDataCenterBodyDataCenter. # noqa: E501 + + + :return: The region_id of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :rtype: str + """ + return self._region_id + + @region_id.setter + def region_id(self, region_id): + """Sets the region_id of this UpdateDataCenterBodyDataCenter. + + + :param region_id: The region_id of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :type: str + """ + + self._region_id = region_id + + @property + def supplier_name(self): + """Gets the supplier_name of this UpdateDataCenterBodyDataCenter. # noqa: E501 + + + :return: The supplier_name of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :rtype: str + """ + return self._supplier_name + + @supplier_name.setter + def supplier_name(self, supplier_name): + """Sets the supplier_name of this UpdateDataCenterBodyDataCenter. + + + :param supplier_name: The supplier_name of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :type: str + """ + + self._supplier_name = supplier_name + + @property + def renewable_energy(self): + """Gets the renewable_energy of this UpdateDataCenterBodyDataCenter. # noqa: E501 + + + :return: The renewable_energy of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :rtype: bool + """ + return self._renewable_energy + + @renewable_energy.setter + def renewable_energy(self, renewable_energy): + """Sets the renewable_energy of this UpdateDataCenterBodyDataCenter. + + + :param renewable_energy: The renewable_energy of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :type: bool + """ + + self._renewable_energy = renewable_energy + + @property + def lng_lat(self): + """Gets the lng_lat of this UpdateDataCenterBodyDataCenter. # noqa: E501 + + + :return: The lng_lat of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :rtype: Point + """ + return self._lng_lat + + @lng_lat.setter + def lng_lat(self, lng_lat): + """Sets the lng_lat of this UpdateDataCenterBodyDataCenter. + + + :param lng_lat: The lng_lat of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :type: Point + """ + + self._lng_lat = lng_lat + + @property + def create_by(self): + """Gets the create_by of this UpdateDataCenterBodyDataCenter. # noqa: E501 + + + :return: The create_by of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this UpdateDataCenterBodyDataCenter. + + + :param create_by: The create_by of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def one_frontend_id(self): + """Gets the one_frontend_id of this UpdateDataCenterBodyDataCenter. # noqa: E501 + + + :return: The one_frontend_id of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :rtype: str + """ + return self._one_frontend_id + + @one_frontend_id.setter + def one_frontend_id(self, one_frontend_id): + """Sets the one_frontend_id of this UpdateDataCenterBodyDataCenter. + + + :param one_frontend_id: The one_frontend_id of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :type: str + """ + + self._one_frontend_id = one_frontend_id + + @property + def s3_endpoint(self): + """Gets the s3_endpoint of this UpdateDataCenterBodyDataCenter. # noqa: E501 + + + :return: The s3_endpoint of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :rtype: str + """ + return self._s3_endpoint + + @s3_endpoint.setter + def s3_endpoint(self, s3_endpoint): + """Sets the s3_endpoint of this UpdateDataCenterBodyDataCenter. + + + :param s3_endpoint: The s3_endpoint of this UpdateDataCenterBodyDataCenter. # noqa: E501 + :type: str + """ + + self._s3_endpoint = s3_endpoint + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateDataCenterBodyDataCenter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateDataCenterBodyDataCenter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateDataCenterBodyDataCenter): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_host_response.py b/docs/cudo_compute/models/update_host_response.py new file mode 100644 index 0000000..9fd3863 --- /dev/null +++ b/docs/cudo_compute/models/update_host_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateHostResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """UpdateHostResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateHostResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateHostResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateHostResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_image_response.py b/docs/cudo_compute/models/update_image_response.py new file mode 100644 index 0000000..1339275 --- /dev/null +++ b/docs/cudo_compute/models/update_image_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateImageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """UpdateImageResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateImageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateImageResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateImageResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_net_response.py b/docs/cudo_compute/models/update_net_response.py new file mode 100644 index 0000000..17bfaf3 --- /dev/null +++ b/docs/cudo_compute/models/update_net_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateNetResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """UpdateNetResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateNetResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateNetResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateNetResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_private_vm_image_response.py b/docs/cudo_compute/models/update_private_vm_image_response.py new file mode 100644 index 0000000..e351ff4 --- /dev/null +++ b/docs/cudo_compute/models/update_private_vm_image_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdatePrivateVMImageResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """UpdatePrivateVMImageResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdatePrivateVMImageResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdatePrivateVMImageResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdatePrivateVMImageResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_project_body.py b/docs/cudo_compute/models/update_project_body.py new file mode 100644 index 0000000..eed95eb --- /dev/null +++ b/docs/cudo_compute/models/update_project_body.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateProjectBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project': 'UpdateProjectBodyProject', + 'update_mask': 'str' + } + + attribute_map = { + 'project': 'project', + 'update_mask': 'updateMask' + } + + def __init__(self, project=None, update_mask=None, _configuration=None): # noqa: E501 + """UpdateProjectBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project = None + self._update_mask = None + self.discriminator = None + + if project is not None: + self.project = project + if update_mask is not None: + self.update_mask = update_mask + + @property + def project(self): + """Gets the project of this UpdateProjectBody. # noqa: E501 + + + :return: The project of this UpdateProjectBody. # noqa: E501 + :rtype: UpdateProjectBodyProject + """ + return self._project + + @project.setter + def project(self, project): + """Sets the project of this UpdateProjectBody. + + + :param project: The project of this UpdateProjectBody. # noqa: E501 + :type: UpdateProjectBodyProject + """ + + self._project = project + + @property + def update_mask(self): + """Gets the update_mask of this UpdateProjectBody. # noqa: E501 + + + :return: The update_mask of this UpdateProjectBody. # noqa: E501 + :rtype: str + """ + return self._update_mask + + @update_mask.setter + def update_mask(self, update_mask): + """Sets the update_mask of this UpdateProjectBody. + + + :param update_mask: The update_mask of this UpdateProjectBody. # noqa: E501 + :type: str + """ + + self._update_mask = update_mask + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateProjectBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateProjectBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateProjectBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_project_body_project.py b/docs/cudo_compute/models/update_project_body_project.py new file mode 100644 index 0000000..528b3d0 --- /dev/null +++ b/docs/cudo_compute/models/update_project_body_project.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateProjectBodyProject(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'billing_account_id': 'str', + 'resource_count': 'int', + 'create_by': 'str' + } + + attribute_map = { + 'billing_account_id': 'billingAccountId', + 'resource_count': 'resourceCount', + 'create_by': 'createBy' + } + + def __init__(self, billing_account_id=None, resource_count=None, create_by=None, _configuration=None): # noqa: E501 + """UpdateProjectBodyProject - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._billing_account_id = None + self._resource_count = None + self._create_by = None + self.discriminator = None + + if billing_account_id is not None: + self.billing_account_id = billing_account_id + if resource_count is not None: + self.resource_count = resource_count + if create_by is not None: + self.create_by = create_by + + @property + def billing_account_id(self): + """Gets the billing_account_id of this UpdateProjectBodyProject. # noqa: E501 + + + :return: The billing_account_id of this UpdateProjectBodyProject. # noqa: E501 + :rtype: str + """ + return self._billing_account_id + + @billing_account_id.setter + def billing_account_id(self, billing_account_id): + """Sets the billing_account_id of this UpdateProjectBodyProject. + + + :param billing_account_id: The billing_account_id of this UpdateProjectBodyProject. # noqa: E501 + :type: str + """ + + self._billing_account_id = billing_account_id + + @property + def resource_count(self): + """Gets the resource_count of this UpdateProjectBodyProject. # noqa: E501 + + + :return: The resource_count of this UpdateProjectBodyProject. # noqa: E501 + :rtype: int + """ + return self._resource_count + + @resource_count.setter + def resource_count(self, resource_count): + """Sets the resource_count of this UpdateProjectBodyProject. + + + :param resource_count: The resource_count of this UpdateProjectBodyProject. # noqa: E501 + :type: int + """ + + self._resource_count = resource_count + + @property + def create_by(self): + """Gets the create_by of this UpdateProjectBodyProject. # noqa: E501 + + + :return: The create_by of this UpdateProjectBodyProject. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this UpdateProjectBodyProject. + + + :param create_by: The create_by of this UpdateProjectBodyProject. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateProjectBodyProject, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateProjectBodyProject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateProjectBodyProject): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_security_group_response.py b/docs/cudo_compute/models/update_security_group_response.py new file mode 100644 index 0000000..e3925c8 --- /dev/null +++ b/docs/cudo_compute/models/update_security_group_response.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateSecurityGroupResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'security_group': 'SecurityGroup' + } + + attribute_map = { + 'security_group': 'securityGroup' + } + + def __init__(self, security_group=None, _configuration=None): # noqa: E501 + """UpdateSecurityGroupResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._security_group = None + self.discriminator = None + + self.security_group = security_group + + @property + def security_group(self): + """Gets the security_group of this UpdateSecurityGroupResponse. # noqa: E501 + + + :return: The security_group of this UpdateSecurityGroupResponse. # noqa: E501 + :rtype: SecurityGroup + """ + return self._security_group + + @security_group.setter + def security_group(self, security_group): + """Sets the security_group of this UpdateSecurityGroupResponse. + + + :param security_group: The security_group of this UpdateSecurityGroupResponse. # noqa: E501 + :type: SecurityGroup + """ + if self._configuration.client_side_validation and security_group is None: + raise ValueError("Invalid value for `security_group`, must not be `None`") # noqa: E501 + + self._security_group = security_group + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateSecurityGroupResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateSecurityGroupResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateSecurityGroupResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_vm_expire_time_body.py b/docs/cudo_compute/models/update_vm_expire_time_body.py new file mode 100644 index 0000000..960065e --- /dev/null +++ b/docs/cudo_compute/models/update_vm_expire_time_body.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateVMExpireTimeBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'expire_time': 'datetime', + 'ttl': 'str' + } + + attribute_map = { + 'expire_time': 'expireTime', + 'ttl': 'ttl' + } + + def __init__(self, expire_time=None, ttl=None, _configuration=None): # noqa: E501 + """UpdateVMExpireTimeBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._expire_time = None + self._ttl = None + self.discriminator = None + + if expire_time is not None: + self.expire_time = expire_time + if ttl is not None: + self.ttl = ttl + + @property + def expire_time(self): + """Gets the expire_time of this UpdateVMExpireTimeBody. # noqa: E501 + + + :return: The expire_time of this UpdateVMExpireTimeBody. # noqa: E501 + :rtype: datetime + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this UpdateVMExpireTimeBody. + + + :param expire_time: The expire_time of this UpdateVMExpireTimeBody. # noqa: E501 + :type: datetime + """ + + self._expire_time = expire_time + + @property + def ttl(self): + """Gets the ttl of this UpdateVMExpireTimeBody. # noqa: E501 + + + :return: The ttl of this UpdateVMExpireTimeBody. # noqa: E501 + :rtype: str + """ + return self._ttl + + @ttl.setter + def ttl(self, ttl): + """Sets the ttl of this UpdateVMExpireTimeBody. + + + :param ttl: The ttl of this UpdateVMExpireTimeBody. # noqa: E501 + :type: str + """ + + self._ttl = ttl + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateVMExpireTimeBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateVMExpireTimeBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVMExpireTimeBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_vm_expire_time_response.py b/docs/cudo_compute/models/update_vm_expire_time_response.py new file mode 100644 index 0000000..d76804b --- /dev/null +++ b/docs/cudo_compute/models/update_vm_expire_time_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateVMExpireTimeResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'expire_time': 'datetime' + } + + attribute_map = { + 'expire_time': 'expireTime' + } + + def __init__(self, expire_time=None, _configuration=None): # noqa: E501 + """UpdateVMExpireTimeResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._expire_time = None + self.discriminator = None + + if expire_time is not None: + self.expire_time = expire_time + + @property + def expire_time(self): + """Gets the expire_time of this UpdateVMExpireTimeResponse. # noqa: E501 + + + :return: The expire_time of this UpdateVMExpireTimeResponse. # noqa: E501 + :rtype: datetime + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this UpdateVMExpireTimeResponse. + + + :param expire_time: The expire_time of this UpdateVMExpireTimeResponse. # noqa: E501 + :type: datetime + """ + + self._expire_time = expire_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateVMExpireTimeResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateVMExpireTimeResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVMExpireTimeResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_vm_metadata_body.py b/docs/cudo_compute/models/update_vm_metadata_body.py new file mode 100644 index 0000000..377b179 --- /dev/null +++ b/docs/cudo_compute/models/update_vm_metadata_body.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateVMMetadataBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'metadata': 'dict(str, str)', + 'merge': 'bool' + } + + attribute_map = { + 'metadata': 'metadata', + 'merge': 'merge' + } + + def __init__(self, metadata=None, merge=None, _configuration=None): # noqa: E501 + """UpdateVMMetadataBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._metadata = None + self._merge = None + self.discriminator = None + + if metadata is not None: + self.metadata = metadata + if merge is not None: + self.merge = merge + + @property + def metadata(self): + """Gets the metadata of this UpdateVMMetadataBody. # noqa: E501 + + + :return: The metadata of this UpdateVMMetadataBody. # noqa: E501 + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this UpdateVMMetadataBody. + + + :param metadata: The metadata of this UpdateVMMetadataBody. # noqa: E501 + :type: dict(str, str) + """ + + self._metadata = metadata + + @property + def merge(self): + """Gets the merge of this UpdateVMMetadataBody. # noqa: E501 + + + :return: The merge of this UpdateVMMetadataBody. # noqa: E501 + :rtype: bool + """ + return self._merge + + @merge.setter + def merge(self, merge): + """Sets the merge of this UpdateVMMetadataBody. + + + :param merge: The merge of this UpdateVMMetadataBody. # noqa: E501 + :type: bool + """ + + self._merge = merge + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateVMMetadataBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateVMMetadataBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVMMetadataBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_vm_metadata_response.py b/docs/cudo_compute/models/update_vm_metadata_response.py new file mode 100644 index 0000000..342c6b2 --- /dev/null +++ b/docs/cudo_compute/models/update_vm_metadata_response.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateVMMetadataResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'metadata': 'dict(str, str)' + } + + attribute_map = { + 'metadata': 'metadata' + } + + def __init__(self, metadata=None, _configuration=None): # noqa: E501 + """UpdateVMMetadataResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._metadata = None + self.discriminator = None + + if metadata is not None: + self.metadata = metadata + + @property + def metadata(self): + """Gets the metadata of this UpdateVMMetadataResponse. # noqa: E501 + + + :return: The metadata of this UpdateVMMetadataResponse. # noqa: E501 + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this UpdateVMMetadataResponse. + + + :param metadata: The metadata of this UpdateVMMetadataResponse. # noqa: E501 + :type: dict(str, str) + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateVMMetadataResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateVMMetadataResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVMMetadataResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_vm_password_body.py b/docs/cudo_compute/models/update_vm_password_body.py new file mode 100644 index 0000000..3daa394 --- /dev/null +++ b/docs/cudo_compute/models/update_vm_password_body.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateVMPasswordBody(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'password': 'str' + } + + attribute_map = { + 'password': 'password' + } + + def __init__(self, password=None, _configuration=None): # noqa: E501 + """UpdateVMPasswordBody - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._password = None + self.discriminator = None + + self.password = password + + @property + def password(self): + """Gets the password of this UpdateVMPasswordBody. # noqa: E501 + + + :return: The password of this UpdateVMPasswordBody. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this UpdateVMPasswordBody. + + + :param password: The password of this UpdateVMPasswordBody. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and password is None: + raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateVMPasswordBody, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateVMPasswordBody): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVMPasswordBody): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_vm_password_response.py b/docs/cudo_compute/models/update_vm_password_response.py new file mode 100644 index 0000000..317eae8 --- /dev/null +++ b/docs/cudo_compute/models/update_vm_password_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateVMPasswordResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """UpdateVMPasswordResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateVMPasswordResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateVMPasswordResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVMPasswordResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/update_vm_response.py b/docs/cudo_compute/models/update_vm_response.py new file mode 100644 index 0000000..ccea310 --- /dev/null +++ b/docs/cudo_compute/models/update_vm_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UpdateVMResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """UpdateVMResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UpdateVMResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateVMResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateVMResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/user_permission.py b/docs/cudo_compute/models/user_permission.py new file mode 100644 index 0000000..0baa70f --- /dev/null +++ b/docs/cudo_compute/models/user_permission.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class UserPermission(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user_id': 'str', + 'user_email': 'str', + 'user_picture': 'str', + 'role': 'str', + 'permission_role': 'Role' + } + + attribute_map = { + 'user_id': 'userId', + 'user_email': 'userEmail', + 'user_picture': 'userPicture', + 'role': 'role', + 'permission_role': 'permissionRole' + } + + def __init__(self, user_id=None, user_email=None, user_picture=None, role=None, permission_role=None, _configuration=None): # noqa: E501 + """UserPermission - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._user_id = None + self._user_email = None + self._user_picture = None + self._role = None + self._permission_role = None + self.discriminator = None + + self.user_id = user_id + self.user_email = user_email + self.user_picture = user_picture + self.role = role + self.permission_role = permission_role + + @property + def user_id(self): + """Gets the user_id of this UserPermission. # noqa: E501 + + + :return: The user_id of this UserPermission. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this UserPermission. + + + :param user_id: The user_id of this UserPermission. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_id is None: + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def user_email(self): + """Gets the user_email of this UserPermission. # noqa: E501 + + + :return: The user_email of this UserPermission. # noqa: E501 + :rtype: str + """ + return self._user_email + + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this UserPermission. + + + :param user_email: The user_email of this UserPermission. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_email is None: + raise ValueError("Invalid value for `user_email`, must not be `None`") # noqa: E501 + + self._user_email = user_email + + @property + def user_picture(self): + """Gets the user_picture of this UserPermission. # noqa: E501 + + + :return: The user_picture of this UserPermission. # noqa: E501 + :rtype: str + """ + return self._user_picture + + @user_picture.setter + def user_picture(self, user_picture): + """Sets the user_picture of this UserPermission. + + + :param user_picture: The user_picture of this UserPermission. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and user_picture is None: + raise ValueError("Invalid value for `user_picture`, must not be `None`") # noqa: E501 + + self._user_picture = user_picture + + @property + def role(self): + """Gets the role of this UserPermission. # noqa: E501 + + + :return: The role of this UserPermission. # noqa: E501 + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this UserPermission. + + + :param role: The role of this UserPermission. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and role is None: + raise ValueError("Invalid value for `role`, must not be `None`") # noqa: E501 + + self._role = role + + @property + def permission_role(self): + """Gets the permission_role of this UserPermission. # noqa: E501 + + + :return: The permission_role of this UserPermission. # noqa: E501 + :rtype: Role + """ + return self._permission_role + + @permission_role.setter + def permission_role(self, permission_role): + """Sets the permission_role of this UserPermission. + + + :param permission_role: The permission_role of this UserPermission. # noqa: E501 + :type: Role + """ + if self._configuration.client_side_validation and permission_role is None: + raise ValueError("Invalid value for `permission_role`, must not be `None`") # noqa: E501 + + self._permission_role = permission_role + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(UserPermission, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserPermission): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserPermission): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/v1_data_center.py b/docs/cudo_compute/models/v1_data_center.py new file mode 100644 index 0000000..fafac6e --- /dev/null +++ b/docs/cudo_compute/models/v1_data_center.py @@ -0,0 +1,308 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class V1DataCenter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'region_id': 'str', + 'supplier_name': 'str', + 'renewable_energy': 'bool', + 'lng_lat': 'Point', + 'create_by': 'str', + 'one_frontend_id': 'str', + 's3_endpoint': 'str' + } + + attribute_map = { + 'id': 'id', + 'region_id': 'regionId', + 'supplier_name': 'supplierName', + 'renewable_energy': 'renewableEnergy', + 'lng_lat': 'lngLat', + 'create_by': 'createBy', + 'one_frontend_id': 'oneFrontendId', + 's3_endpoint': 's3Endpoint' + } + + def __init__(self, id=None, region_id=None, supplier_name=None, renewable_energy=None, lng_lat=None, create_by=None, one_frontend_id=None, s3_endpoint=None, _configuration=None): # noqa: E501 + """V1DataCenter - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._region_id = None + self._supplier_name = None + self._renewable_energy = None + self._lng_lat = None + self._create_by = None + self._one_frontend_id = None + self._s3_endpoint = None + self.discriminator = None + + self.id = id + if region_id is not None: + self.region_id = region_id + if supplier_name is not None: + self.supplier_name = supplier_name + if renewable_energy is not None: + self.renewable_energy = renewable_energy + if lng_lat is not None: + self.lng_lat = lng_lat + if create_by is not None: + self.create_by = create_by + self.one_frontend_id = one_frontend_id + self.s3_endpoint = s3_endpoint + + @property + def id(self): + """Gets the id of this V1DataCenter. # noqa: E501 + + + :return: The id of this V1DataCenter. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this V1DataCenter. + + + :param id: The id of this V1DataCenter. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def region_id(self): + """Gets the region_id of this V1DataCenter. # noqa: E501 + + + :return: The region_id of this V1DataCenter. # noqa: E501 + :rtype: str + """ + return self._region_id + + @region_id.setter + def region_id(self, region_id): + """Sets the region_id of this V1DataCenter. + + + :param region_id: The region_id of this V1DataCenter. # noqa: E501 + :type: str + """ + + self._region_id = region_id + + @property + def supplier_name(self): + """Gets the supplier_name of this V1DataCenter. # noqa: E501 + + + :return: The supplier_name of this V1DataCenter. # noqa: E501 + :rtype: str + """ + return self._supplier_name + + @supplier_name.setter + def supplier_name(self, supplier_name): + """Sets the supplier_name of this V1DataCenter. + + + :param supplier_name: The supplier_name of this V1DataCenter. # noqa: E501 + :type: str + """ + + self._supplier_name = supplier_name + + @property + def renewable_energy(self): + """Gets the renewable_energy of this V1DataCenter. # noqa: E501 + + + :return: The renewable_energy of this V1DataCenter. # noqa: E501 + :rtype: bool + """ + return self._renewable_energy + + @renewable_energy.setter + def renewable_energy(self, renewable_energy): + """Sets the renewable_energy of this V1DataCenter. + + + :param renewable_energy: The renewable_energy of this V1DataCenter. # noqa: E501 + :type: bool + """ + + self._renewable_energy = renewable_energy + + @property + def lng_lat(self): + """Gets the lng_lat of this V1DataCenter. # noqa: E501 + + + :return: The lng_lat of this V1DataCenter. # noqa: E501 + :rtype: Point + """ + return self._lng_lat + + @lng_lat.setter + def lng_lat(self, lng_lat): + """Sets the lng_lat of this V1DataCenter. + + + :param lng_lat: The lng_lat of this V1DataCenter. # noqa: E501 + :type: Point + """ + + self._lng_lat = lng_lat + + @property + def create_by(self): + """Gets the create_by of this V1DataCenter. # noqa: E501 + + + :return: The create_by of this V1DataCenter. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this V1DataCenter. + + + :param create_by: The create_by of this V1DataCenter. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def one_frontend_id(self): + """Gets the one_frontend_id of this V1DataCenter. # noqa: E501 + + + :return: The one_frontend_id of this V1DataCenter. # noqa: E501 + :rtype: str + """ + return self._one_frontend_id + + @one_frontend_id.setter + def one_frontend_id(self, one_frontend_id): + """Sets the one_frontend_id of this V1DataCenter. + + + :param one_frontend_id: The one_frontend_id of this V1DataCenter. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and one_frontend_id is None: + raise ValueError("Invalid value for `one_frontend_id`, must not be `None`") # noqa: E501 + + self._one_frontend_id = one_frontend_id + + @property + def s3_endpoint(self): + """Gets the s3_endpoint of this V1DataCenter. # noqa: E501 + + + :return: The s3_endpoint of this V1DataCenter. # noqa: E501 + :rtype: str + """ + return self._s3_endpoint + + @s3_endpoint.setter + def s3_endpoint(self, s3_endpoint): + """Sets the s3_endpoint of this V1DataCenter. + + + :param s3_endpoint: The s3_endpoint of this V1DataCenter. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and s3_endpoint is None: + raise ValueError("Invalid value for `s3_endpoint`, must not be `None`") # noqa: E501 + + self._s3_endpoint = s3_endpoint + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1DataCenter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1DataCenter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1DataCenter): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/v1_v_router_size.py b/docs/cudo_compute/models/v1_v_router_size.py new file mode 100644 index 0000000..3fbcf69 --- /dev/null +++ b/docs/cudo_compute/models/v1_v_router_size.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class V1VRouterSize(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "VROUTER_INSTANCE_UNKNOWN" + SMALL = "VROUTER_INSTANCE_SMALL" + MEDIUM = "VROUTER_INSTANCE_MEDIUM" + LARGE = "VROUTER_INSTANCE_LARGE" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """V1VRouterSize - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1VRouterSize, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1VRouterSize): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1VRouterSize): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/virtual_machine_result.py b/docs/cudo_compute/models/virtual_machine_result.py new file mode 100644 index 0000000..df5aea4 --- /dev/null +++ b/docs/cudo_compute/models/virtual_machine_result.py @@ -0,0 +1,409 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VirtualMachineResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'str', + 'id': 'str', + 'data_center_id': 'str', + 'gpu_model_id': 'str', + 'gpus': 'int', + 'vcpus': 'int', + 'memory_gib': 'int', + 'boot_disk_size_gib': 'int', + 'boot_disk_public_image_id': 'str', + 'boot_disk_private_image_id': 'str', + 'state': 'VmState', + 'create_time': 'datetime' + } + + attribute_map = { + 'project_id': 'projectId', + 'id': 'id', + 'data_center_id': 'dataCenterId', + 'gpu_model_id': 'gpuModelId', + 'gpus': 'gpus', + 'vcpus': 'vcpus', + 'memory_gib': 'memoryGib', + 'boot_disk_size_gib': 'bootDiskSizeGib', + 'boot_disk_public_image_id': 'bootDiskPublicImageId', + 'boot_disk_private_image_id': 'bootDiskPrivateImageId', + 'state': 'state', + 'create_time': 'createTime' + } + + def __init__(self, project_id=None, id=None, data_center_id=None, gpu_model_id=None, gpus=None, vcpus=None, memory_gib=None, boot_disk_size_gib=None, boot_disk_public_image_id=None, boot_disk_private_image_id=None, state=None, create_time=None, _configuration=None): # noqa: E501 + """VirtualMachineResult - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._project_id = None + self._id = None + self._data_center_id = None + self._gpu_model_id = None + self._gpus = None + self._vcpus = None + self._memory_gib = None + self._boot_disk_size_gib = None + self._boot_disk_public_image_id = None + self._boot_disk_private_image_id = None + self._state = None + self._create_time = None + self.discriminator = None + + if project_id is not None: + self.project_id = project_id + if id is not None: + self.id = id + if data_center_id is not None: + self.data_center_id = data_center_id + if gpu_model_id is not None: + self.gpu_model_id = gpu_model_id + if gpus is not None: + self.gpus = gpus + if vcpus is not None: + self.vcpus = vcpus + if memory_gib is not None: + self.memory_gib = memory_gib + if boot_disk_size_gib is not None: + self.boot_disk_size_gib = boot_disk_size_gib + if boot_disk_public_image_id is not None: + self.boot_disk_public_image_id = boot_disk_public_image_id + if boot_disk_private_image_id is not None: + self.boot_disk_private_image_id = boot_disk_private_image_id + if state is not None: + self.state = state + if create_time is not None: + self.create_time = create_time + + @property + def project_id(self): + """Gets the project_id of this VirtualMachineResult. # noqa: E501 + + + :return: The project_id of this VirtualMachineResult. # noqa: E501 + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this VirtualMachineResult. + + + :param project_id: The project_id of this VirtualMachineResult. # noqa: E501 + :type: str + """ + + self._project_id = project_id + + @property + def id(self): + """Gets the id of this VirtualMachineResult. # noqa: E501 + + + :return: The id of this VirtualMachineResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this VirtualMachineResult. + + + :param id: The id of this VirtualMachineResult. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def data_center_id(self): + """Gets the data_center_id of this VirtualMachineResult. # noqa: E501 + + + :return: The data_center_id of this VirtualMachineResult. # noqa: E501 + :rtype: str + """ + return self._data_center_id + + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this VirtualMachineResult. + + + :param data_center_id: The data_center_id of this VirtualMachineResult. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def gpu_model_id(self): + """Gets the gpu_model_id of this VirtualMachineResult. # noqa: E501 + + + :return: The gpu_model_id of this VirtualMachineResult. # noqa: E501 + :rtype: str + """ + return self._gpu_model_id + + @gpu_model_id.setter + def gpu_model_id(self, gpu_model_id): + """Sets the gpu_model_id of this VirtualMachineResult. + + + :param gpu_model_id: The gpu_model_id of this VirtualMachineResult. # noqa: E501 + :type: str + """ + + self._gpu_model_id = gpu_model_id + + @property + def gpus(self): + """Gets the gpus of this VirtualMachineResult. # noqa: E501 + + + :return: The gpus of this VirtualMachineResult. # noqa: E501 + :rtype: int + """ + return self._gpus + + @gpus.setter + def gpus(self, gpus): + """Sets the gpus of this VirtualMachineResult. + + + :param gpus: The gpus of this VirtualMachineResult. # noqa: E501 + :type: int + """ + + self._gpus = gpus + + @property + def vcpus(self): + """Gets the vcpus of this VirtualMachineResult. # noqa: E501 + + + :return: The vcpus of this VirtualMachineResult. # noqa: E501 + :rtype: int + """ + return self._vcpus + + @vcpus.setter + def vcpus(self, vcpus): + """Sets the vcpus of this VirtualMachineResult. + + + :param vcpus: The vcpus of this VirtualMachineResult. # noqa: E501 + :type: int + """ + + self._vcpus = vcpus + + @property + def memory_gib(self): + """Gets the memory_gib of this VirtualMachineResult. # noqa: E501 + + + :return: The memory_gib of this VirtualMachineResult. # noqa: E501 + :rtype: int + """ + return self._memory_gib + + @memory_gib.setter + def memory_gib(self, memory_gib): + """Sets the memory_gib of this VirtualMachineResult. + + + :param memory_gib: The memory_gib of this VirtualMachineResult. # noqa: E501 + :type: int + """ + + self._memory_gib = memory_gib + + @property + def boot_disk_size_gib(self): + """Gets the boot_disk_size_gib of this VirtualMachineResult. # noqa: E501 + + + :return: The boot_disk_size_gib of this VirtualMachineResult. # noqa: E501 + :rtype: int + """ + return self._boot_disk_size_gib + + @boot_disk_size_gib.setter + def boot_disk_size_gib(self, boot_disk_size_gib): + """Sets the boot_disk_size_gib of this VirtualMachineResult. + + + :param boot_disk_size_gib: The boot_disk_size_gib of this VirtualMachineResult. # noqa: E501 + :type: int + """ + + self._boot_disk_size_gib = boot_disk_size_gib + + @property + def boot_disk_public_image_id(self): + """Gets the boot_disk_public_image_id of this VirtualMachineResult. # noqa: E501 + + + :return: The boot_disk_public_image_id of this VirtualMachineResult. # noqa: E501 + :rtype: str + """ + return self._boot_disk_public_image_id + + @boot_disk_public_image_id.setter + def boot_disk_public_image_id(self, boot_disk_public_image_id): + """Sets the boot_disk_public_image_id of this VirtualMachineResult. + + + :param boot_disk_public_image_id: The boot_disk_public_image_id of this VirtualMachineResult. # noqa: E501 + :type: str + """ + + self._boot_disk_public_image_id = boot_disk_public_image_id + + @property + def boot_disk_private_image_id(self): + """Gets the boot_disk_private_image_id of this VirtualMachineResult. # noqa: E501 + + + :return: The boot_disk_private_image_id of this VirtualMachineResult. # noqa: E501 + :rtype: str + """ + return self._boot_disk_private_image_id + + @boot_disk_private_image_id.setter + def boot_disk_private_image_id(self, boot_disk_private_image_id): + """Sets the boot_disk_private_image_id of this VirtualMachineResult. + + + :param boot_disk_private_image_id: The boot_disk_private_image_id of this VirtualMachineResult. # noqa: E501 + :type: str + """ + + self._boot_disk_private_image_id = boot_disk_private_image_id + + @property + def state(self): + """Gets the state of this VirtualMachineResult. # noqa: E501 + + + :return: The state of this VirtualMachineResult. # noqa: E501 + :rtype: VmState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this VirtualMachineResult. + + + :param state: The state of this VirtualMachineResult. # noqa: E501 + :type: VmState + """ + + self._state = state + + @property + def create_time(self): + """Gets the create_time of this VirtualMachineResult. # noqa: E501 + + + :return: The create_time of this VirtualMachineResult. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this VirtualMachineResult. + + + :param create_time: The create_time of this VirtualMachineResult. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VirtualMachineResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VirtualMachineResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VirtualMachineResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm.py b/docs/cudo_compute/models/vm.py new file mode 100644 index 0000000..c315a9a --- /dev/null +++ b/docs/cudo_compute/models/vm.py @@ -0,0 +1,1010 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VM(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'datacenter_id': 'str', + 'machine_type': 'str', + 'region_id': 'str', + 'region_name': 'str', + 'id': 'str', + 'external_ip_address': 'str', + 'internal_ip_address': 'str', + 'public_ip_address': 'str', + 'memory': 'int', + 'cpu_model': 'str', + 'vcpus': 'int', + 'gpu_model': 'str', + 'gpu_model_id': 'str', + 'gpu_quantity': 'int', + 'boot_disk_size_gib': 'int', + 'renewable_energy': 'bool', + 'image_id': 'str', + 'public_image_id': 'str', + 'public_image_name': 'str', + 'private_image_id': 'str', + 'image_name': 'str', + 'create_by': 'str', + 'nics': 'list[VMNIC]', + 'rules': 'list[SecurityGroupRule]', + 'security_group_ids': 'list[str]', + 'short_state': 'str', + 'boot_disk': 'Disk', + 'storage_disks': 'list[Disk]', + 'metadata': 'dict(str, str)', + 'state': 'VmState', + 'create_time': 'datetime', + 'expire_time': 'datetime', + 'price': 'VMPrice', + 'commitment_term': 'CommitmentTerm', + 'commitment_end_time': 'datetime' + } + + attribute_map = { + 'datacenter_id': 'datacenterId', + 'machine_type': 'machineType', + 'region_id': 'regionId', + 'region_name': 'regionName', + 'id': 'id', + 'external_ip_address': 'externalIpAddress', + 'internal_ip_address': 'internalIpAddress', + 'public_ip_address': 'publicIpAddress', + 'memory': 'memory', + 'cpu_model': 'cpuModel', + 'vcpus': 'vcpus', + 'gpu_model': 'gpuModel', + 'gpu_model_id': 'gpuModelId', + 'gpu_quantity': 'gpuQuantity', + 'boot_disk_size_gib': 'bootDiskSizeGib', + 'renewable_energy': 'renewableEnergy', + 'image_id': 'imageId', + 'public_image_id': 'publicImageId', + 'public_image_name': 'publicImageName', + 'private_image_id': 'privateImageId', + 'image_name': 'imageName', + 'create_by': 'createBy', + 'nics': 'nics', + 'rules': 'rules', + 'security_group_ids': 'securityGroupIds', + 'short_state': 'shortState', + 'boot_disk': 'bootDisk', + 'storage_disks': 'storageDisks', + 'metadata': 'metadata', + 'state': 'state', + 'create_time': 'createTime', + 'expire_time': 'expireTime', + 'price': 'price', + 'commitment_term': 'commitmentTerm', + 'commitment_end_time': 'commitmentEndTime' + } + + def __init__(self, datacenter_id=None, machine_type=None, region_id=None, region_name=None, id=None, external_ip_address=None, internal_ip_address=None, public_ip_address=None, memory=None, cpu_model=None, vcpus=None, gpu_model=None, gpu_model_id=None, gpu_quantity=None, boot_disk_size_gib=None, renewable_energy=None, image_id=None, public_image_id=None, public_image_name=None, private_image_id=None, image_name=None, create_by=None, nics=None, rules=None, security_group_ids=None, short_state=None, boot_disk=None, storage_disks=None, metadata=None, state=None, create_time=None, expire_time=None, price=None, commitment_term=None, commitment_end_time=None, _configuration=None): # noqa: E501 + """VM - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._datacenter_id = None + self._machine_type = None + self._region_id = None + self._region_name = None + self._id = None + self._external_ip_address = None + self._internal_ip_address = None + self._public_ip_address = None + self._memory = None + self._cpu_model = None + self._vcpus = None + self._gpu_model = None + self._gpu_model_id = None + self._gpu_quantity = None + self._boot_disk_size_gib = None + self._renewable_energy = None + self._image_id = None + self._public_image_id = None + self._public_image_name = None + self._private_image_id = None + self._image_name = None + self._create_by = None + self._nics = None + self._rules = None + self._security_group_ids = None + self._short_state = None + self._boot_disk = None + self._storage_disks = None + self._metadata = None + self._state = None + self._create_time = None + self._expire_time = None + self._price = None + self._commitment_term = None + self._commitment_end_time = None + self.discriminator = None + + if datacenter_id is not None: + self.datacenter_id = datacenter_id + if machine_type is not None: + self.machine_type = machine_type + if region_id is not None: + self.region_id = region_id + if region_name is not None: + self.region_name = region_name + if id is not None: + self.id = id + if external_ip_address is not None: + self.external_ip_address = external_ip_address + if internal_ip_address is not None: + self.internal_ip_address = internal_ip_address + if public_ip_address is not None: + self.public_ip_address = public_ip_address + if memory is not None: + self.memory = memory + if cpu_model is not None: + self.cpu_model = cpu_model + if vcpus is not None: + self.vcpus = vcpus + if gpu_model is not None: + self.gpu_model = gpu_model + if gpu_model_id is not None: + self.gpu_model_id = gpu_model_id + if gpu_quantity is not None: + self.gpu_quantity = gpu_quantity + if boot_disk_size_gib is not None: + self.boot_disk_size_gib = boot_disk_size_gib + if renewable_energy is not None: + self.renewable_energy = renewable_energy + if image_id is not None: + self.image_id = image_id + if public_image_id is not None: + self.public_image_id = public_image_id + if public_image_name is not None: + self.public_image_name = public_image_name + if private_image_id is not None: + self.private_image_id = private_image_id + if image_name is not None: + self.image_name = image_name + if create_by is not None: + self.create_by = create_by + if nics is not None: + self.nics = nics + if rules is not None: + self.rules = rules + if security_group_ids is not None: + self.security_group_ids = security_group_ids + if short_state is not None: + self.short_state = short_state + if boot_disk is not None: + self.boot_disk = boot_disk + if storage_disks is not None: + self.storage_disks = storage_disks + if metadata is not None: + self.metadata = metadata + if state is not None: + self.state = state + if create_time is not None: + self.create_time = create_time + if expire_time is not None: + self.expire_time = expire_time + self.price = price + self.commitment_term = commitment_term + self.commitment_end_time = commitment_end_time + + @property + def datacenter_id(self): + """Gets the datacenter_id of this VM. # noqa: E501 + + + :return: The datacenter_id of this VM. # noqa: E501 + :rtype: str + """ + return self._datacenter_id + + @datacenter_id.setter + def datacenter_id(self, datacenter_id): + """Sets the datacenter_id of this VM. + + + :param datacenter_id: The datacenter_id of this VM. # noqa: E501 + :type: str + """ + + self._datacenter_id = datacenter_id + + @property + def machine_type(self): + """Gets the machine_type of this VM. # noqa: E501 + + + :return: The machine_type of this VM. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this VM. + + + :param machine_type: The machine_type of this VM. # noqa: E501 + :type: str + """ + + self._machine_type = machine_type + + @property + def region_id(self): + """Gets the region_id of this VM. # noqa: E501 + + + :return: The region_id of this VM. # noqa: E501 + :rtype: str + """ + return self._region_id + + @region_id.setter + def region_id(self, region_id): + """Sets the region_id of this VM. + + + :param region_id: The region_id of this VM. # noqa: E501 + :type: str + """ + + self._region_id = region_id + + @property + def region_name(self): + """Gets the region_name of this VM. # noqa: E501 + + + :return: The region_name of this VM. # noqa: E501 + :rtype: str + """ + return self._region_name + + @region_name.setter + def region_name(self, region_name): + """Sets the region_name of this VM. + + + :param region_name: The region_name of this VM. # noqa: E501 + :type: str + """ + + self._region_name = region_name + + @property + def id(self): + """Gets the id of this VM. # noqa: E501 + + + :return: The id of this VM. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this VM. + + + :param id: The id of this VM. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def external_ip_address(self): + """Gets the external_ip_address of this VM. # noqa: E501 + + + :return: The external_ip_address of this VM. # noqa: E501 + :rtype: str + """ + return self._external_ip_address + + @external_ip_address.setter + def external_ip_address(self, external_ip_address): + """Sets the external_ip_address of this VM. + + + :param external_ip_address: The external_ip_address of this VM. # noqa: E501 + :type: str + """ + + self._external_ip_address = external_ip_address + + @property + def internal_ip_address(self): + """Gets the internal_ip_address of this VM. # noqa: E501 + + + :return: The internal_ip_address of this VM. # noqa: E501 + :rtype: str + """ + return self._internal_ip_address + + @internal_ip_address.setter + def internal_ip_address(self, internal_ip_address): + """Sets the internal_ip_address of this VM. + + + :param internal_ip_address: The internal_ip_address of this VM. # noqa: E501 + :type: str + """ + + self._internal_ip_address = internal_ip_address + + @property + def public_ip_address(self): + """Gets the public_ip_address of this VM. # noqa: E501 + + + :return: The public_ip_address of this VM. # noqa: E501 + :rtype: str + """ + return self._public_ip_address + + @public_ip_address.setter + def public_ip_address(self, public_ip_address): + """Sets the public_ip_address of this VM. + + + :param public_ip_address: The public_ip_address of this VM. # noqa: E501 + :type: str + """ + + self._public_ip_address = public_ip_address + + @property + def memory(self): + """Gets the memory of this VM. # noqa: E501 + + + :return: The memory of this VM. # noqa: E501 + :rtype: int + """ + return self._memory + + @memory.setter + def memory(self, memory): + """Sets the memory of this VM. + + + :param memory: The memory of this VM. # noqa: E501 + :type: int + """ + + self._memory = memory + + @property + def cpu_model(self): + """Gets the cpu_model of this VM. # noqa: E501 + + + :return: The cpu_model of this VM. # noqa: E501 + :rtype: str + """ + return self._cpu_model + + @cpu_model.setter + def cpu_model(self, cpu_model): + """Sets the cpu_model of this VM. + + + :param cpu_model: The cpu_model of this VM. # noqa: E501 + :type: str + """ + + self._cpu_model = cpu_model + + @property + def vcpus(self): + """Gets the vcpus of this VM. # noqa: E501 + + + :return: The vcpus of this VM. # noqa: E501 + :rtype: int + """ + return self._vcpus + + @vcpus.setter + def vcpus(self, vcpus): + """Sets the vcpus of this VM. + + + :param vcpus: The vcpus of this VM. # noqa: E501 + :type: int + """ + + self._vcpus = vcpus + + @property + def gpu_model(self): + """Gets the gpu_model of this VM. # noqa: E501 + + + :return: The gpu_model of this VM. # noqa: E501 + :rtype: str + """ + return self._gpu_model + + @gpu_model.setter + def gpu_model(self, gpu_model): + """Sets the gpu_model of this VM. + + + :param gpu_model: The gpu_model of this VM. # noqa: E501 + :type: str + """ + + self._gpu_model = gpu_model + + @property + def gpu_model_id(self): + """Gets the gpu_model_id of this VM. # noqa: E501 + + + :return: The gpu_model_id of this VM. # noqa: E501 + :rtype: str + """ + return self._gpu_model_id + + @gpu_model_id.setter + def gpu_model_id(self, gpu_model_id): + """Sets the gpu_model_id of this VM. + + + :param gpu_model_id: The gpu_model_id of this VM. # noqa: E501 + :type: str + """ + + self._gpu_model_id = gpu_model_id + + @property + def gpu_quantity(self): + """Gets the gpu_quantity of this VM. # noqa: E501 + + + :return: The gpu_quantity of this VM. # noqa: E501 + :rtype: int + """ + return self._gpu_quantity + + @gpu_quantity.setter + def gpu_quantity(self, gpu_quantity): + """Sets the gpu_quantity of this VM. + + + :param gpu_quantity: The gpu_quantity of this VM. # noqa: E501 + :type: int + """ + + self._gpu_quantity = gpu_quantity + + @property + def boot_disk_size_gib(self): + """Gets the boot_disk_size_gib of this VM. # noqa: E501 + + + :return: The boot_disk_size_gib of this VM. # noqa: E501 + :rtype: int + """ + return self._boot_disk_size_gib + + @boot_disk_size_gib.setter + def boot_disk_size_gib(self, boot_disk_size_gib): + """Sets the boot_disk_size_gib of this VM. + + + :param boot_disk_size_gib: The boot_disk_size_gib of this VM. # noqa: E501 + :type: int + """ + + self._boot_disk_size_gib = boot_disk_size_gib + + @property + def renewable_energy(self): + """Gets the renewable_energy of this VM. # noqa: E501 + + + :return: The renewable_energy of this VM. # noqa: E501 + :rtype: bool + """ + return self._renewable_energy + + @renewable_energy.setter + def renewable_energy(self, renewable_energy): + """Sets the renewable_energy of this VM. + + + :param renewable_energy: The renewable_energy of this VM. # noqa: E501 + :type: bool + """ + + self._renewable_energy = renewable_energy + + @property + def image_id(self): + """Gets the image_id of this VM. # noqa: E501 + + + :return: The image_id of this VM. # noqa: E501 + :rtype: str + """ + return self._image_id + + @image_id.setter + def image_id(self, image_id): + """Sets the image_id of this VM. + + + :param image_id: The image_id of this VM. # noqa: E501 + :type: str + """ + + self._image_id = image_id + + @property + def public_image_id(self): + """Gets the public_image_id of this VM. # noqa: E501 + + + :return: The public_image_id of this VM. # noqa: E501 + :rtype: str + """ + return self._public_image_id + + @public_image_id.setter + def public_image_id(self, public_image_id): + """Sets the public_image_id of this VM. + + + :param public_image_id: The public_image_id of this VM. # noqa: E501 + :type: str + """ + + self._public_image_id = public_image_id + + @property + def public_image_name(self): + """Gets the public_image_name of this VM. # noqa: E501 + + + :return: The public_image_name of this VM. # noqa: E501 + :rtype: str + """ + return self._public_image_name + + @public_image_name.setter + def public_image_name(self, public_image_name): + """Sets the public_image_name of this VM. + + + :param public_image_name: The public_image_name of this VM. # noqa: E501 + :type: str + """ + + self._public_image_name = public_image_name + + @property + def private_image_id(self): + """Gets the private_image_id of this VM. # noqa: E501 + + + :return: The private_image_id of this VM. # noqa: E501 + :rtype: str + """ + return self._private_image_id + + @private_image_id.setter + def private_image_id(self, private_image_id): + """Sets the private_image_id of this VM. + + + :param private_image_id: The private_image_id of this VM. # noqa: E501 + :type: str + """ + + self._private_image_id = private_image_id + + @property + def image_name(self): + """Gets the image_name of this VM. # noqa: E501 + + + :return: The image_name of this VM. # noqa: E501 + :rtype: str + """ + return self._image_name + + @image_name.setter + def image_name(self, image_name): + """Sets the image_name of this VM. + + + :param image_name: The image_name of this VM. # noqa: E501 + :type: str + """ + + self._image_name = image_name + + @property + def create_by(self): + """Gets the create_by of this VM. # noqa: E501 + + + :return: The create_by of this VM. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this VM. + + + :param create_by: The create_by of this VM. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def nics(self): + """Gets the nics of this VM. # noqa: E501 + + + :return: The nics of this VM. # noqa: E501 + :rtype: list[VMNIC] + """ + return self._nics + + @nics.setter + def nics(self, nics): + """Sets the nics of this VM. + + + :param nics: The nics of this VM. # noqa: E501 + :type: list[VMNIC] + """ + + self._nics = nics + + @property + def rules(self): + """Gets the rules of this VM. # noqa: E501 + + + :return: The rules of this VM. # noqa: E501 + :rtype: list[SecurityGroupRule] + """ + return self._rules + + @rules.setter + def rules(self, rules): + """Sets the rules of this VM. + + + :param rules: The rules of this VM. # noqa: E501 + :type: list[SecurityGroupRule] + """ + + self._rules = rules + + @property + def security_group_ids(self): + """Gets the security_group_ids of this VM. # noqa: E501 + + + :return: The security_group_ids of this VM. # noqa: E501 + :rtype: list[str] + """ + return self._security_group_ids + + @security_group_ids.setter + def security_group_ids(self, security_group_ids): + """Sets the security_group_ids of this VM. + + + :param security_group_ids: The security_group_ids of this VM. # noqa: E501 + :type: list[str] + """ + + self._security_group_ids = security_group_ids + + @property + def short_state(self): + """Gets the short_state of this VM. # noqa: E501 + + + :return: The short_state of this VM. # noqa: E501 + :rtype: str + """ + return self._short_state + + @short_state.setter + def short_state(self, short_state): + """Sets the short_state of this VM. + + + :param short_state: The short_state of this VM. # noqa: E501 + :type: str + """ + + self._short_state = short_state + + @property + def boot_disk(self): + """Gets the boot_disk of this VM. # noqa: E501 + + + :return: The boot_disk of this VM. # noqa: E501 + :rtype: Disk + """ + return self._boot_disk + + @boot_disk.setter + def boot_disk(self, boot_disk): + """Sets the boot_disk of this VM. + + + :param boot_disk: The boot_disk of this VM. # noqa: E501 + :type: Disk + """ + + self._boot_disk = boot_disk + + @property + def storage_disks(self): + """Gets the storage_disks of this VM. # noqa: E501 + + + :return: The storage_disks of this VM. # noqa: E501 + :rtype: list[Disk] + """ + return self._storage_disks + + @storage_disks.setter + def storage_disks(self, storage_disks): + """Sets the storage_disks of this VM. + + + :param storage_disks: The storage_disks of this VM. # noqa: E501 + :type: list[Disk] + """ + + self._storage_disks = storage_disks + + @property + def metadata(self): + """Gets the metadata of this VM. # noqa: E501 + + + :return: The metadata of this VM. # noqa: E501 + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this VM. + + + :param metadata: The metadata of this VM. # noqa: E501 + :type: dict(str, str) + """ + + self._metadata = metadata + + @property + def state(self): + """Gets the state of this VM. # noqa: E501 + + + :return: The state of this VM. # noqa: E501 + :rtype: VmState + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this VM. + + + :param state: The state of this VM. # noqa: E501 + :type: VmState + """ + + self._state = state + + @property + def create_time(self): + """Gets the create_time of this VM. # noqa: E501 + + + :return: The create_time of this VM. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this VM. + + + :param create_time: The create_time of this VM. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def expire_time(self): + """Gets the expire_time of this VM. # noqa: E501 + + + :return: The expire_time of this VM. # noqa: E501 + :rtype: datetime + """ + return self._expire_time + + @expire_time.setter + def expire_time(self, expire_time): + """Sets the expire_time of this VM. + + + :param expire_time: The expire_time of this VM. # noqa: E501 + :type: datetime + """ + + self._expire_time = expire_time + + @property + def price(self): + """Gets the price of this VM. # noqa: E501 + + + :return: The price of this VM. # noqa: E501 + :rtype: VMPrice + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this VM. + + + :param price: The price of this VM. # noqa: E501 + :type: VMPrice + """ + if self._configuration.client_side_validation and price is None: + raise ValueError("Invalid value for `price`, must not be `None`") # noqa: E501 + + self._price = price + + @property + def commitment_term(self): + """Gets the commitment_term of this VM. # noqa: E501 + + + :return: The commitment_term of this VM. # noqa: E501 + :rtype: CommitmentTerm + """ + return self._commitment_term + + @commitment_term.setter + def commitment_term(self, commitment_term): + """Sets the commitment_term of this VM. + + + :param commitment_term: The commitment_term of this VM. # noqa: E501 + :type: CommitmentTerm + """ + if self._configuration.client_side_validation and commitment_term is None: + raise ValueError("Invalid value for `commitment_term`, must not be `None`") # noqa: E501 + + self._commitment_term = commitment_term + + @property + def commitment_end_time(self): + """Gets the commitment_end_time of this VM. # noqa: E501 + + + :return: The commitment_end_time of this VM. # noqa: E501 + :rtype: datetime + """ + return self._commitment_end_time + + @commitment_end_time.setter + def commitment_end_time(self, commitment_end_time): + """Sets the commitment_end_time of this VM. + + + :param commitment_end_time: The commitment_end_time of this VM. # noqa: E501 + :type: datetime + """ + if self._configuration.client_side_validation and commitment_end_time is None: + raise ValueError("Invalid value for `commitment_end_time`, must not be `None`") # noqa: E501 + + self._commitment_end_time = commitment_end_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VM, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VM): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VM): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm_data_center.py b/docs/cudo_compute/models/vm_data_center.py new file mode 100644 index 0000000..9107549 --- /dev/null +++ b/docs/cudo_compute/models/vm_data_center.py @@ -0,0 +1,310 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VMDataCenter(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'region_id': 'str', + 'supplier_name': 'str', + 'renewable_energy': 'bool', + 'disk_pool_pricing': 'list[DiskStoragePriceHr]', + 'network_pricing': 'list[NetworkPriceHr]', + 'ipv4_price_hr': 'Decimal', + 'ipv4_free': 'int' + } + + attribute_map = { + 'id': 'id', + 'region_id': 'regionId', + 'supplier_name': 'supplierName', + 'renewable_energy': 'renewableEnergy', + 'disk_pool_pricing': 'diskPoolPricing', + 'network_pricing': 'networkPricing', + 'ipv4_price_hr': 'ipv4PriceHr', + 'ipv4_free': 'ipv4Free' + } + + def __init__(self, id=None, region_id=None, supplier_name=None, renewable_energy=None, disk_pool_pricing=None, network_pricing=None, ipv4_price_hr=None, ipv4_free=None, _configuration=None): # noqa: E501 + """VMDataCenter - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._id = None + self._region_id = None + self._supplier_name = None + self._renewable_energy = None + self._disk_pool_pricing = None + self._network_pricing = None + self._ipv4_price_hr = None + self._ipv4_free = None + self.discriminator = None + + self.id = id + self.region_id = region_id + self.supplier_name = supplier_name + self.renewable_energy = renewable_energy + if disk_pool_pricing is not None: + self.disk_pool_pricing = disk_pool_pricing + if network_pricing is not None: + self.network_pricing = network_pricing + if ipv4_price_hr is not None: + self.ipv4_price_hr = ipv4_price_hr + self.ipv4_free = ipv4_free + + @property + def id(self): + """Gets the id of this VMDataCenter. # noqa: E501 + + + :return: The id of this VMDataCenter. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this VMDataCenter. + + + :param id: The id of this VMDataCenter. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def region_id(self): + """Gets the region_id of this VMDataCenter. # noqa: E501 + + + :return: The region_id of this VMDataCenter. # noqa: E501 + :rtype: str + """ + return self._region_id + + @region_id.setter + def region_id(self, region_id): + """Sets the region_id of this VMDataCenter. + + + :param region_id: The region_id of this VMDataCenter. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and region_id is None: + raise ValueError("Invalid value for `region_id`, must not be `None`") # noqa: E501 + + self._region_id = region_id + + @property + def supplier_name(self): + """Gets the supplier_name of this VMDataCenter. # noqa: E501 + + + :return: The supplier_name of this VMDataCenter. # noqa: E501 + :rtype: str + """ + return self._supplier_name + + @supplier_name.setter + def supplier_name(self, supplier_name): + """Sets the supplier_name of this VMDataCenter. + + + :param supplier_name: The supplier_name of this VMDataCenter. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and supplier_name is None: + raise ValueError("Invalid value for `supplier_name`, must not be `None`") # noqa: E501 + + self._supplier_name = supplier_name + + @property + def renewable_energy(self): + """Gets the renewable_energy of this VMDataCenter. # noqa: E501 + + + :return: The renewable_energy of this VMDataCenter. # noqa: E501 + :rtype: bool + """ + return self._renewable_energy + + @renewable_energy.setter + def renewable_energy(self, renewable_energy): + """Sets the renewable_energy of this VMDataCenter. + + + :param renewable_energy: The renewable_energy of this VMDataCenter. # noqa: E501 + :type: bool + """ + if self._configuration.client_side_validation and renewable_energy is None: + raise ValueError("Invalid value for `renewable_energy`, must not be `None`") # noqa: E501 + + self._renewable_energy = renewable_energy + + @property + def disk_pool_pricing(self): + """Gets the disk_pool_pricing of this VMDataCenter. # noqa: E501 + + + :return: The disk_pool_pricing of this VMDataCenter. # noqa: E501 + :rtype: list[DiskStoragePriceHr] + """ + return self._disk_pool_pricing + + @disk_pool_pricing.setter + def disk_pool_pricing(self, disk_pool_pricing): + """Sets the disk_pool_pricing of this VMDataCenter. + + + :param disk_pool_pricing: The disk_pool_pricing of this VMDataCenter. # noqa: E501 + :type: list[DiskStoragePriceHr] + """ + + self._disk_pool_pricing = disk_pool_pricing + + @property + def network_pricing(self): + """Gets the network_pricing of this VMDataCenter. # noqa: E501 + + + :return: The network_pricing of this VMDataCenter. # noqa: E501 + :rtype: list[NetworkPriceHr] + """ + return self._network_pricing + + @network_pricing.setter + def network_pricing(self, network_pricing): + """Sets the network_pricing of this VMDataCenter. + + + :param network_pricing: The network_pricing of this VMDataCenter. # noqa: E501 + :type: list[NetworkPriceHr] + """ + + self._network_pricing = network_pricing + + @property + def ipv4_price_hr(self): + """Gets the ipv4_price_hr of this VMDataCenter. # noqa: E501 + + + :return: The ipv4_price_hr of this VMDataCenter. # noqa: E501 + :rtype: Decimal + """ + return self._ipv4_price_hr + + @ipv4_price_hr.setter + def ipv4_price_hr(self, ipv4_price_hr): + """Sets the ipv4_price_hr of this VMDataCenter. + + + :param ipv4_price_hr: The ipv4_price_hr of this VMDataCenter. # noqa: E501 + :type: Decimal + """ + + self._ipv4_price_hr = ipv4_price_hr + + @property + def ipv4_free(self): + """Gets the ipv4_free of this VMDataCenter. # noqa: E501 + + + :return: The ipv4_free of this VMDataCenter. # noqa: E501 + :rtype: int + """ + return self._ipv4_free + + @ipv4_free.setter + def ipv4_free(self, ipv4_free): + """Sets the ipv4_free of this VMDataCenter. + + + :param ipv4_free: The ipv4_free of this VMDataCenter. # noqa: E501 + :type: int + """ + if self._configuration.client_side_validation and ipv4_free is None: + raise ValueError("Invalid value for `ipv4_free`, must not be `None`") # noqa: E501 + + self._ipv4_free = ipv4_free + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VMDataCenter, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VMDataCenter): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VMDataCenter): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm_data_center_storage_class.py b/docs/cudo_compute/models/vm_data_center_storage_class.py new file mode 100644 index 0000000..ee8a5f9 --- /dev/null +++ b/docs/cudo_compute/models/vm_data_center_storage_class.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VMDataCenterStorageClass(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "STORAGE_CLASS_UNKNOWN" + LOCAL = "STORAGE_CLASS_LOCAL" + NETWORK = "STORAGE_CLASS_NETWORK" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """VMDataCenterStorageClass - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VMDataCenterStorageClass, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VMDataCenterStorageClass): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VMDataCenterStorageClass): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm_data_center_v_router_size.py b/docs/cudo_compute/models/vm_data_center_v_router_size.py new file mode 100644 index 0000000..c221ad7 --- /dev/null +++ b/docs/cudo_compute/models/vm_data_center_v_router_size.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VMDataCenterVRouterSize(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + UNKNOWN = "VROUTER_INSTANCE_UNKNOWN" + SMALL = "VROUTER_INSTANCE_SMALL" + MEDIUM = "VROUTER_INSTANCE_MEDIUM" + LARGE = "VROUTER_INSTANCE_LARGE" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """VMDataCenterVRouterSize - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VMDataCenterVRouterSize, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VMDataCenterVRouterSize): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VMDataCenterVRouterSize): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm_machine_type_machine_type_price.py b/docs/cudo_compute/models/vm_machine_type_machine_type_price.py new file mode 100644 index 0000000..5de813e --- /dev/null +++ b/docs/cudo_compute/models/vm_machine_type_machine_type_price.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VMMachineTypeMachineTypePrice(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'vcpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal', + 'gpu_price_hr': 'Decimal', + 'commitment_term': 'CommitmentTerm' + } + + attribute_map = { + 'vcpu_price_hr': 'vcpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr', + 'gpu_price_hr': 'gpuPriceHr', + 'commitment_term': 'commitmentTerm' + } + + def __init__(self, vcpu_price_hr=None, memory_gib_price_hr=None, gpu_price_hr=None, commitment_term=None, _configuration=None): # noqa: E501 + """VMMachineTypeMachineTypePrice - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._vcpu_price_hr = None + self._memory_gib_price_hr = None + self._gpu_price_hr = None + self._commitment_term = None + self.discriminator = None + + self.vcpu_price_hr = vcpu_price_hr + self.memory_gib_price_hr = memory_gib_price_hr + self.gpu_price_hr = gpu_price_hr + self.commitment_term = commitment_term + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + + + :return: The vcpu_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this VMMachineTypeMachineTypePrice. + + + :param vcpu_price_hr: The vcpu_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and vcpu_price_hr is None: + raise ValueError("Invalid value for `vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._vcpu_price_hr = vcpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + + + :return: The memory_gib_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this VMMachineTypeMachineTypePrice. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and memory_gib_price_hr is None: + raise ValueError("Invalid value for `memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._memory_gib_price_hr = memory_gib_price_hr + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + + + :return: The gpu_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this VMMachineTypeMachineTypePrice. + + + :param gpu_price_hr: The gpu_price_hr of this VMMachineTypeMachineTypePrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and gpu_price_hr is None: + raise ValueError("Invalid value for `gpu_price_hr`, must not be `None`") # noqa: E501 + + self._gpu_price_hr = gpu_price_hr + + @property + def commitment_term(self): + """Gets the commitment_term of this VMMachineTypeMachineTypePrice. # noqa: E501 + + + :return: The commitment_term of this VMMachineTypeMachineTypePrice. # noqa: E501 + :rtype: CommitmentTerm + """ + return self._commitment_term + + @commitment_term.setter + def commitment_term(self, commitment_term): + """Sets the commitment_term of this VMMachineTypeMachineTypePrice. + + + :param commitment_term: The commitment_term of this VMMachineTypeMachineTypePrice. # noqa: E501 + :type: CommitmentTerm + """ + if self._configuration.client_side_validation and commitment_term is None: + raise ValueError("Invalid value for `commitment_term`, must not be `None`") # noqa: E501 + + self._commitment_term = commitment_term + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VMMachineTypeMachineTypePrice, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VMMachineTypeMachineTypePrice): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VMMachineTypeMachineTypePrice): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm_monitoring_item.py b/docs/cudo_compute/models/vm_monitoring_item.py new file mode 100644 index 0000000..42894ce --- /dev/null +++ b/docs/cudo_compute/models/vm_monitoring_item.py @@ -0,0 +1,331 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VMMonitoringItem(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'cpu': 'float', + 'disk_rd_bytes': 'str', + 'disk_rd_iops': 'str', + 'disk_wr_bytes': 'str', + 'disk_wr_iops': 'str', + 'memory': 'str', + 'net_rx': 'str', + 'net_tx': 'str', + 'timestamp': 'str' + } + + attribute_map = { + 'cpu': 'cpu', + 'disk_rd_bytes': 'diskRdBytes', + 'disk_rd_iops': 'diskRdIops', + 'disk_wr_bytes': 'diskWrBytes', + 'disk_wr_iops': 'diskWrIops', + 'memory': 'memory', + 'net_rx': 'netRx', + 'net_tx': 'netTx', + 'timestamp': 'timestamp' + } + + def __init__(self, cpu=None, disk_rd_bytes=None, disk_rd_iops=None, disk_wr_bytes=None, disk_wr_iops=None, memory=None, net_rx=None, net_tx=None, timestamp=None, _configuration=None): # noqa: E501 + """VMMonitoringItem - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._cpu = None + self._disk_rd_bytes = None + self._disk_rd_iops = None + self._disk_wr_bytes = None + self._disk_wr_iops = None + self._memory = None + self._net_rx = None + self._net_tx = None + self._timestamp = None + self.discriminator = None + + if cpu is not None: + self.cpu = cpu + if disk_rd_bytes is not None: + self.disk_rd_bytes = disk_rd_bytes + if disk_rd_iops is not None: + self.disk_rd_iops = disk_rd_iops + if disk_wr_bytes is not None: + self.disk_wr_bytes = disk_wr_bytes + if disk_wr_iops is not None: + self.disk_wr_iops = disk_wr_iops + if memory is not None: + self.memory = memory + if net_rx is not None: + self.net_rx = net_rx + if net_tx is not None: + self.net_tx = net_tx + if timestamp is not None: + self.timestamp = timestamp + + @property + def cpu(self): + """Gets the cpu of this VMMonitoringItem. # noqa: E501 + + + :return: The cpu of this VMMonitoringItem. # noqa: E501 + :rtype: float + """ + return self._cpu + + @cpu.setter + def cpu(self, cpu): + """Sets the cpu of this VMMonitoringItem. + + + :param cpu: The cpu of this VMMonitoringItem. # noqa: E501 + :type: float + """ + + self._cpu = cpu + + @property + def disk_rd_bytes(self): + """Gets the disk_rd_bytes of this VMMonitoringItem. # noqa: E501 + + + :return: The disk_rd_bytes of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._disk_rd_bytes + + @disk_rd_bytes.setter + def disk_rd_bytes(self, disk_rd_bytes): + """Sets the disk_rd_bytes of this VMMonitoringItem. + + + :param disk_rd_bytes: The disk_rd_bytes of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._disk_rd_bytes = disk_rd_bytes + + @property + def disk_rd_iops(self): + """Gets the disk_rd_iops of this VMMonitoringItem. # noqa: E501 + + + :return: The disk_rd_iops of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._disk_rd_iops + + @disk_rd_iops.setter + def disk_rd_iops(self, disk_rd_iops): + """Sets the disk_rd_iops of this VMMonitoringItem. + + + :param disk_rd_iops: The disk_rd_iops of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._disk_rd_iops = disk_rd_iops + + @property + def disk_wr_bytes(self): + """Gets the disk_wr_bytes of this VMMonitoringItem. # noqa: E501 + + + :return: The disk_wr_bytes of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._disk_wr_bytes + + @disk_wr_bytes.setter + def disk_wr_bytes(self, disk_wr_bytes): + """Sets the disk_wr_bytes of this VMMonitoringItem. + + + :param disk_wr_bytes: The disk_wr_bytes of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._disk_wr_bytes = disk_wr_bytes + + @property + def disk_wr_iops(self): + """Gets the disk_wr_iops of this VMMonitoringItem. # noqa: E501 + + + :return: The disk_wr_iops of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._disk_wr_iops + + @disk_wr_iops.setter + def disk_wr_iops(self, disk_wr_iops): + """Sets the disk_wr_iops of this VMMonitoringItem. + + + :param disk_wr_iops: The disk_wr_iops of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._disk_wr_iops = disk_wr_iops + + @property + def memory(self): + """Gets the memory of this VMMonitoringItem. # noqa: E501 + + + :return: The memory of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._memory + + @memory.setter + def memory(self, memory): + """Sets the memory of this VMMonitoringItem. + + + :param memory: The memory of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._memory = memory + + @property + def net_rx(self): + """Gets the net_rx of this VMMonitoringItem. # noqa: E501 + + + :return: The net_rx of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._net_rx + + @net_rx.setter + def net_rx(self, net_rx): + """Sets the net_rx of this VMMonitoringItem. + + + :param net_rx: The net_rx of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._net_rx = net_rx + + @property + def net_tx(self): + """Gets the net_tx of this VMMonitoringItem. # noqa: E501 + + + :return: The net_tx of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._net_tx + + @net_tx.setter + def net_tx(self, net_tx): + """Sets the net_tx of this VMMonitoringItem. + + + :param net_tx: The net_tx of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._net_tx = net_tx + + @property + def timestamp(self): + """Gets the timestamp of this VMMonitoringItem. # noqa: E501 + + + :return: The timestamp of this VMMonitoringItem. # noqa: E501 + :rtype: str + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """Sets the timestamp of this VMMonitoringItem. + + + :param timestamp: The timestamp of this VMMonitoringItem. # noqa: E501 + :type: str + """ + + self._timestamp = timestamp + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VMMonitoringItem, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VMMonitoringItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VMMonitoringItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm_price.py b/docs/cudo_compute/models/vm_price.py new file mode 100644 index 0000000..efe022c --- /dev/null +++ b/docs/cudo_compute/models/vm_price.py @@ -0,0 +1,367 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VMPrice(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'vcpu_price_hr': 'Decimal', + 'total_vcpu_price_hr': 'Decimal', + 'memory_gib_price_hr': 'Decimal', + 'total_memory_price_hr': 'Decimal', + 'gpu_price_hr': 'Decimal', + 'total_gpu_price_hr': 'Decimal', + 'storage_gib_price_hr': 'Decimal', + 'total_storage_price_hr': 'Decimal', + 'ipv4_address_price_hr': 'Decimal', + 'total_price_hr': 'Decimal' + } + + attribute_map = { + 'vcpu_price_hr': 'vcpuPriceHr', + 'total_vcpu_price_hr': 'totalVcpuPriceHr', + 'memory_gib_price_hr': 'memoryGibPriceHr', + 'total_memory_price_hr': 'totalMemoryPriceHr', + 'gpu_price_hr': 'gpuPriceHr', + 'total_gpu_price_hr': 'totalGpuPriceHr', + 'storage_gib_price_hr': 'storageGibPriceHr', + 'total_storage_price_hr': 'totalStoragePriceHr', + 'ipv4_address_price_hr': 'ipv4AddressPriceHr', + 'total_price_hr': 'totalPriceHr' + } + + def __init__(self, vcpu_price_hr=None, total_vcpu_price_hr=None, memory_gib_price_hr=None, total_memory_price_hr=None, gpu_price_hr=None, total_gpu_price_hr=None, storage_gib_price_hr=None, total_storage_price_hr=None, ipv4_address_price_hr=None, total_price_hr=None, _configuration=None): # noqa: E501 + """VMPrice - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._vcpu_price_hr = None + self._total_vcpu_price_hr = None + self._memory_gib_price_hr = None + self._total_memory_price_hr = None + self._gpu_price_hr = None + self._total_gpu_price_hr = None + self._storage_gib_price_hr = None + self._total_storage_price_hr = None + self._ipv4_address_price_hr = None + self._total_price_hr = None + self.discriminator = None + + self.vcpu_price_hr = vcpu_price_hr + self.total_vcpu_price_hr = total_vcpu_price_hr + self.memory_gib_price_hr = memory_gib_price_hr + self.total_memory_price_hr = total_memory_price_hr + self.gpu_price_hr = gpu_price_hr + self.total_gpu_price_hr = total_gpu_price_hr + self.storage_gib_price_hr = storage_gib_price_hr + self.total_storage_price_hr = total_storage_price_hr + self.ipv4_address_price_hr = ipv4_address_price_hr + self.total_price_hr = total_price_hr + + @property + def vcpu_price_hr(self): + """Gets the vcpu_price_hr of this VMPrice. # noqa: E501 + + + :return: The vcpu_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._vcpu_price_hr + + @vcpu_price_hr.setter + def vcpu_price_hr(self, vcpu_price_hr): + """Sets the vcpu_price_hr of this VMPrice. + + + :param vcpu_price_hr: The vcpu_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and vcpu_price_hr is None: + raise ValueError("Invalid value for `vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._vcpu_price_hr = vcpu_price_hr + + @property + def total_vcpu_price_hr(self): + """Gets the total_vcpu_price_hr of this VMPrice. # noqa: E501 + + + :return: The total_vcpu_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._total_vcpu_price_hr + + @total_vcpu_price_hr.setter + def total_vcpu_price_hr(self, total_vcpu_price_hr): + """Sets the total_vcpu_price_hr of this VMPrice. + + + :param total_vcpu_price_hr: The total_vcpu_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_vcpu_price_hr is None: + raise ValueError("Invalid value for `total_vcpu_price_hr`, must not be `None`") # noqa: E501 + + self._total_vcpu_price_hr = total_vcpu_price_hr + + @property + def memory_gib_price_hr(self): + """Gets the memory_gib_price_hr of this VMPrice. # noqa: E501 + + + :return: The memory_gib_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._memory_gib_price_hr + + @memory_gib_price_hr.setter + def memory_gib_price_hr(self, memory_gib_price_hr): + """Sets the memory_gib_price_hr of this VMPrice. + + + :param memory_gib_price_hr: The memory_gib_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and memory_gib_price_hr is None: + raise ValueError("Invalid value for `memory_gib_price_hr`, must not be `None`") # noqa: E501 + + self._memory_gib_price_hr = memory_gib_price_hr + + @property + def total_memory_price_hr(self): + """Gets the total_memory_price_hr of this VMPrice. # noqa: E501 + + + :return: The total_memory_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._total_memory_price_hr + + @total_memory_price_hr.setter + def total_memory_price_hr(self, total_memory_price_hr): + """Sets the total_memory_price_hr of this VMPrice. + + + :param total_memory_price_hr: The total_memory_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_memory_price_hr is None: + raise ValueError("Invalid value for `total_memory_price_hr`, must not be `None`") # noqa: E501 + + self._total_memory_price_hr = total_memory_price_hr + + @property + def gpu_price_hr(self): + """Gets the gpu_price_hr of this VMPrice. # noqa: E501 + + + :return: The gpu_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._gpu_price_hr + + @gpu_price_hr.setter + def gpu_price_hr(self, gpu_price_hr): + """Sets the gpu_price_hr of this VMPrice. + + + :param gpu_price_hr: The gpu_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and gpu_price_hr is None: + raise ValueError("Invalid value for `gpu_price_hr`, must not be `None`") # noqa: E501 + + self._gpu_price_hr = gpu_price_hr + + @property + def total_gpu_price_hr(self): + """Gets the total_gpu_price_hr of this VMPrice. # noqa: E501 + + + :return: The total_gpu_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._total_gpu_price_hr + + @total_gpu_price_hr.setter + def total_gpu_price_hr(self, total_gpu_price_hr): + """Sets the total_gpu_price_hr of this VMPrice. + + + :param total_gpu_price_hr: The total_gpu_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_gpu_price_hr is None: + raise ValueError("Invalid value for `total_gpu_price_hr`, must not be `None`") # noqa: E501 + + self._total_gpu_price_hr = total_gpu_price_hr + + @property + def storage_gib_price_hr(self): + """Gets the storage_gib_price_hr of this VMPrice. # noqa: E501 + + + :return: The storage_gib_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._storage_gib_price_hr + + @storage_gib_price_hr.setter + def storage_gib_price_hr(self, storage_gib_price_hr): + """Sets the storage_gib_price_hr of this VMPrice. + + + :param storage_gib_price_hr: The storage_gib_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and storage_gib_price_hr is None: + raise ValueError("Invalid value for `storage_gib_price_hr`, must not be `None`") # noqa: E501 + + self._storage_gib_price_hr = storage_gib_price_hr + + @property + def total_storage_price_hr(self): + """Gets the total_storage_price_hr of this VMPrice. # noqa: E501 + + + :return: The total_storage_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._total_storage_price_hr + + @total_storage_price_hr.setter + def total_storage_price_hr(self, total_storage_price_hr): + """Sets the total_storage_price_hr of this VMPrice. + + + :param total_storage_price_hr: The total_storage_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_storage_price_hr is None: + raise ValueError("Invalid value for `total_storage_price_hr`, must not be `None`") # noqa: E501 + + self._total_storage_price_hr = total_storage_price_hr + + @property + def ipv4_address_price_hr(self): + """Gets the ipv4_address_price_hr of this VMPrice. # noqa: E501 + + + :return: The ipv4_address_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._ipv4_address_price_hr + + @ipv4_address_price_hr.setter + def ipv4_address_price_hr(self, ipv4_address_price_hr): + """Sets the ipv4_address_price_hr of this VMPrice. + + + :param ipv4_address_price_hr: The ipv4_address_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and ipv4_address_price_hr is None: + raise ValueError("Invalid value for `ipv4_address_price_hr`, must not be `None`") # noqa: E501 + + self._ipv4_address_price_hr = ipv4_address_price_hr + + @property + def total_price_hr(self): + """Gets the total_price_hr of this VMPrice. # noqa: E501 + + + :return: The total_price_hr of this VMPrice. # noqa: E501 + :rtype: Decimal + """ + return self._total_price_hr + + @total_price_hr.setter + def total_price_hr(self, total_price_hr): + """Sets the total_price_hr of this VMPrice. + + + :param total_price_hr: The total_price_hr of this VMPrice. # noqa: E501 + :type: Decimal + """ + if self._configuration.client_side_validation and total_price_hr is None: + raise ValueError("Invalid value for `total_price_hr`, must not be `None`") # noqa: E501 + + self._total_price_hr = total_price_hr + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VMPrice, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VMPrice): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VMPrice): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vm_state.py b/docs/cudo_compute/models/vm_state.py new file mode 100644 index 0000000..24d01f7 --- /dev/null +++ b/docs/cudo_compute/models/vm_state.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VmState(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + CLONING = "CLONING" + CREATING_SNAPSHOT = "CREATING_SNAPSHOT" + DELETED = "DELETED" + DELETING = "DELETING" + DELETING_SNAPSHOT = "DELETING_SNAPSHOT" + FAILED = "FAILED" + HOTPLUGGING = "HOTPLUGGING" + MIGRATING = "MIGRATING" + RECREATING = "RECREATING" + REVERTING_SNAPSHOT = "REVERTING_SNAPSHOT" + RESIZING = "RESIZING" + RESIZING_DISK = "RESIZING_DISK" + ACTIVE = "ACTIVE" + STARTING = "STARTING" + STOPPED = "STOPPED" + STOPPING = "STOPPING" + SUSPENDED = "SUSPENDED" + SUSPENDING = "SUSPENDING" + UNKNOWN = "UNKNOWN" + PENDING = "PENDING" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self, _configuration=None): # noqa: E501 + """VmState - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VmState, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VmState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VmState): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/models/vmnic.py b/docs/cudo_compute/models/vmnic.py new file mode 100644 index 0000000..d12047f --- /dev/null +++ b/docs/cudo_compute/models/vmnic.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from src.cudo_compute.configuration import Configuration + + +class VMNIC(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'network_id': 'str', + 'external_ip_address': 'str', + 'internal_ip_address': 'str', + 'network_address': 'str', + 'security_group_ids': 'list[str]' + } + + attribute_map = { + 'network_id': 'networkId', + 'external_ip_address': 'externalIpAddress', + 'internal_ip_address': 'internalIpAddress', + 'network_address': 'networkAddress', + 'security_group_ids': 'securityGroupIds' + } + + def __init__(self, network_id=None, external_ip_address=None, internal_ip_address=None, network_address=None, security_group_ids=None, _configuration=None): # noqa: E501 + """VMNIC - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._network_id = None + self._external_ip_address = None + self._internal_ip_address = None + self._network_address = None + self._security_group_ids = None + self.discriminator = None + + if network_id is not None: + self.network_id = network_id + if external_ip_address is not None: + self.external_ip_address = external_ip_address + if internal_ip_address is not None: + self.internal_ip_address = internal_ip_address + if network_address is not None: + self.network_address = network_address + if security_group_ids is not None: + self.security_group_ids = security_group_ids + + @property + def network_id(self): + """Gets the network_id of this VMNIC. # noqa: E501 + + + :return: The network_id of this VMNIC. # noqa: E501 + :rtype: str + """ + return self._network_id + + @network_id.setter + def network_id(self, network_id): + """Sets the network_id of this VMNIC. + + + :param network_id: The network_id of this VMNIC. # noqa: E501 + :type: str + """ + + self._network_id = network_id + + @property + def external_ip_address(self): + """Gets the external_ip_address of this VMNIC. # noqa: E501 + + + :return: The external_ip_address of this VMNIC. # noqa: E501 + :rtype: str + """ + return self._external_ip_address + + @external_ip_address.setter + def external_ip_address(self, external_ip_address): + """Sets the external_ip_address of this VMNIC. + + + :param external_ip_address: The external_ip_address of this VMNIC. # noqa: E501 + :type: str + """ + + self._external_ip_address = external_ip_address + + @property + def internal_ip_address(self): + """Gets the internal_ip_address of this VMNIC. # noqa: E501 + + + :return: The internal_ip_address of this VMNIC. # noqa: E501 + :rtype: str + """ + return self._internal_ip_address + + @internal_ip_address.setter + def internal_ip_address(self, internal_ip_address): + """Sets the internal_ip_address of this VMNIC. + + + :param internal_ip_address: The internal_ip_address of this VMNIC. # noqa: E501 + :type: str + """ + + self._internal_ip_address = internal_ip_address + + @property + def network_address(self): + """Gets the network_address of this VMNIC. # noqa: E501 + + + :return: The network_address of this VMNIC. # noqa: E501 + :rtype: str + """ + return self._network_address + + @network_address.setter + def network_address(self, network_address): + """Sets the network_address of this VMNIC. + + + :param network_address: The network_address of this VMNIC. # noqa: E501 + :type: str + """ + + self._network_address = network_address + + @property + def security_group_ids(self): + """Gets the security_group_ids of this VMNIC. # noqa: E501 + + + :return: The security_group_ids of this VMNIC. # noqa: E501 + :rtype: list[str] + """ + return self._security_group_ids + + @security_group_ids.setter + def security_group_ids(self, security_group_ids): + """Sets the security_group_ids of this VMNIC. + + + :param security_group_ids: The security_group_ids of this VMNIC. # noqa: E501 + :type: list[str] + """ + + self._security_group_ids = security_group_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(VMNIC, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VMNIC): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VMNIC): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/cudo_compute/rest.py b/docs/cudo_compute/rest.py new file mode 100644 index 0000000..1ec878f --- /dev/null +++ b/docs/cudo_compute/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Cudo Compute service + + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.headers + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.headers.get(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = '{}' + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/docs/src/cudo_compute/__init__.py b/docs/src/cudo_compute/__init__.py index 7f98e80..e1b7390 100644 --- a/docs/src/cudo_compute/__init__.py +++ b/docs/src/cudo_compute/__init__.py @@ -194,3 +194,7 @@ import cudo_compute.cudo_api as cudo_api import src.cudo_compute.auth_config as AuthConfig import cudo_compute.cudo_api as cudo_api +import src.cudo_compute.auth_config as AuthConfig +import cudo_compute.cudo_api as cudo_api +import src.cudo_compute.auth_config as AuthConfig +import cudo_compute.cudo_api as cudo_api diff --git a/docs/src/cudo_compute/cudo_api.py b/docs/src/cudo_compute/cudo_api.py index aeb3cb5..c11b51c 100644 --- a/docs/src/cudo_compute/cudo_api.py +++ b/docs/src/cudo_compute/cudo_api.py @@ -1,6 +1,16 @@ +from asyncio import timeout + import cudo_compute as cudo import os +from time import sleep import importlib.metadata +from concurrent.futures import ThreadPoolExecutor +from queue import Queue +import atexit +import threading + +from cudo_compute.models.create_vm_response import CreateVMResponse +from cudo_compute.models.vm import VM home = os.path.expanduser("~") @@ -63,45 +73,32 @@ def project_id_throwable(): # APIs +c, err = client() +if err: + raise Exception(err) + + def api_keys(): - c, err = client() - if err: - raise Exception(err) return cudo.APIKeysApi(c) def disks(): - c, err = client() - if err: - raise Exception(err) return cudo.DisksApi(c) def networks(): - c, err = client() - if err: - raise Exception(err) return cudo.NetworksApi(c) def object_storage(): - c, err = client() - if err: - raise Exception(err) return cudo.ObjectStorageApi(c) def permissions(): - c, err = client() - if err: - raise Exception(err) return cudo.PermissionsApi(c) def projects(): - c, err = client() - if err: - raise Exception(err) return cudo.ProjectsApi(c) @@ -113,21 +110,83 @@ def ssh_keys(): def search(): - c, err = client() - if err: - raise Exception(err) return cudo.SearchApi(c) def user(): - c, err = client() - if err: - raise Exception(err) return cudo.UserApi(c) -def virtual_machines(): - c, err = client() - if err: - raise Exception(err) +def legacy_virtual_machines(): return cudo.VirtualMachinesApi(c) + + +class PooledVirtualMachinesApi(cudo.VirtualMachinesApi): + def __init__(self, api_client=None): + self.task_queue = None + self.max_workers = 5 + self.shutdown_event = threading.Event() + self.workers_active = False + self.executor = None + atexit.register(self.stop_workers) + super().__init__(api_client) + + def create_vm(self, project_id, create_vm_body, **kwargs): + self.start_queue() + self.task_queue.put((project_id, create_vm_body)) + self.start_workers() + return CreateVMResponse(id=create_vm_body.vm_id, vm=VM()) + + def worker(self): + while self.workers_active: + if not self.task_queue: + break + req = self.task_queue.get(timeout=1) + create_vm_body = None + try: + project, create_vm_body = req + vm = super().create_vm(project, create_vm_body) + print(f"Created VM: {vm.to_dict()}") + wait = True + while wait: + res = self.get_vm(project, create_vm_body.vm_id) + if (res.vm.state == 'ACTIVE' or res.vm.state == 'FAILED' or res.vm.state == 'STOPPED' + or res.vm.state == 'SUSPENDED' or res.vm.state == 'DELETED'): + wait = False + else: + sleep(5) + except Exception as e: + if create_vm_body: + print(f"Error creating VM: {create_vm_body.vm_id} {e}") + else: + print(f"Error creating VM: {e}") + + self.task_queue.task_done() + + def start_queue(self): + if not self.task_queue: + self.task_queue = Queue() + + def start_workers(self): + if not self.workers_active: + self.workers_active = True + self.executor = ThreadPoolExecutor(max_workers=self.max_workers) + + for _ in range(self.max_workers): + self.executor.submit(self.worker) + + def stop_workers(self): + if not self.shutdown_event.is_set(): + try: + self.workers_active = False + self.shutdown_event.set() + + self.executor.shutdown(wait=False) + + except Exception as e: + print(f"Error shutting down: {e}") + +pool = PooledVirtualMachinesApi(c) + +def virtual_machines(): + return pool diff --git a/swagger/public.swagger.json b/swagger/compute.swagger.json similarity index 93% rename from swagger/public.swagger.json rename to swagger/compute.swagger.json index bd51096..ac1b272 100644 --- a/swagger/public.swagger.json +++ b/swagger/compute.swagger.json @@ -1146,6 +1146,101 @@ ] } }, + "/v1/data-centers/{dataCenterId}/commitment-schedule": { + "get": { + "operationId": "GetDataCenterCommitmentSchedule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetDataCenterCommitmentScheduleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + }, + "parameters": [ + { + "name": "dataCenterId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "required": true, + "type": "string", + "format": "date-time" + }, + { + "name": "endTime", + "in": "query", + "required": true, + "type": "string", + "format": "date-time" + } + ] + } + }, + "/v1/data-centers/{dataCenterId}/commitment-time-series": { + "get": { + "operationId": "GetDataCenterCommitmentTimeSeries", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetDataCenterCommitmentTimeSeriesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + }, + "parameters": [ + { + "name": "dataCenterId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "startTime", + "in": "query", + "required": true, + "type": "string", + "format": "date-time" + }, + { + "name": "endTime", + "in": "query", + "required": true, + "type": "string", + "format": "date-time" + }, + { + "name": "interval", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "INTERVAL_UNKNOWN", + "INTERVAL_DAY", + "INTERVAL_WEEK", + "INTERVAL_MONTH" + ], + "default": "INTERVAL_UNKNOWN" + } + ] + } + }, "/v1/data-centers/{dataCenterId}/host-count": { "get": { "summary": "Get host count", @@ -2825,7 +2920,7 @@ ] } }, - "/v1/projects/{projectId}/object-storage/activate": { + "/v1/projects/{projectId}/object-storage/activate/{dataCenterId}": { "post": { "summary": "Allow the use of S3 compatible storage in a project", "operationId": "Activate", @@ -2851,6 +2946,12 @@ "required": true, "type": "string" }, + { + "name": "dataCenterId", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", @@ -2910,7 +3011,7 @@ ] } }, - "/v1/projects/{projectId}/object-storage/buckets/{id}": { + "/v1/projects/{projectId}/object-storage/buckets/{dataCenterId}/{id}": { "get": { "summary": "Get details for a bucket", "operationId": "GetObjectStorageBucket", @@ -2935,6 +3036,12 @@ "required": true, "type": "string" }, + { + "name": "dataCenterId", + "in": "path", + "required": true, + "type": "string" + }, { "name": "id", "in": "path", @@ -2947,7 +3054,7 @@ ] } }, - "/v1/projects/{projectId}/object-storage/session-key": { + "/v1/projects/{projectId}/object-storage/session-key/{dataCenterId}": { "get": { "summary": "Generate temporary key for storage bucket access", "operationId": "GetObjectStorageSessionKey", @@ -2974,8 +3081,8 @@ }, { "name": "dataCenterId", - "in": "query", - "required": false, + "in": "path", + "required": true, "type": "string" } ], @@ -3027,7 +3134,9 @@ "tags": [ "Object Storage" ] - }, + } + }, + "/v1/projects/{projectId}/object-storage/users/{dataCenterId}": { "post": { "summary": "Create user that stores keys for storage buckets", "operationId": "CreateObjectStorageUser", @@ -3052,6 +3161,12 @@ "required": true, "type": "string" }, + { + "name": "dataCenterId", + "in": "path", + "required": true, + "type": "string" + }, { "name": "body", "in": "body", @@ -3066,7 +3181,7 @@ ] } }, - "/v1/projects/{projectId}/object-storage/users/{id}": { + "/v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}": { "delete": { "summary": "Delete object storage user", "operationId": "DeleteObjectStorageUser", @@ -3074,7 +3189,8 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteObjectStorageUserResponse" + "type": "object", + "properties": {} } }, "default": { @@ -3091,6 +3207,12 @@ "required": true, "type": "string" }, + { + "name": "dataCenterId", + "in": "path", + "required": true, + "type": "string" + }, { "name": "id", "in": "path", @@ -3126,6 +3248,12 @@ "required": true, "type": "string" }, + { + "name": "dataCenterId", + "in": "path", + "required": true, + "type": "string" + }, { "name": "id", "in": "path", @@ -3138,15 +3266,16 @@ ] } }, - "/v1/projects/{projectId}/object-storage/users/{id}/keys": { - "get": { - "summary": "List storage user keys", - "operationId": "ListObjectStorageKeys", + "/v1/projects/{projectId}/object-storage/users/{dataCenterId}/{id}/keys/{accessKey}": { + "delete": { + "summary": "Delete object storage user key", + "operationId": "DeleteObjectStorageKey", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListObjectStorageKeysResponse" + "type": "object", + "properties": {} } }, "default": { @@ -3164,24 +3293,22 @@ "type": "string" }, { - "name": "id", + "name": "dataCenterId", "in": "path", "required": true, "type": "string" }, { - "name": "pageNumber", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" + "name": "id", + "in": "path", + "required": true, + "type": "string" }, { - "name": "pageSize", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" + "name": "accessKey", + "in": "path", + "required": true, + "type": "string" } ], "tags": [ @@ -3189,15 +3316,15 @@ ] } }, - "/v1/projects/{projectId}/object-storage/users/{id}/keys/{accessKey}": { - "delete": { - "summary": "Delete object storage user key", - "operationId": "DeleteObjectStorageKey", + "/v1/projects/{projectId}/object-storage/users/{dataCenterId}/{userId}": { + "get": { + "summary": "Get details about an object storage user", + "operationId": "GetObjectStorageUser", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteObjectStorageKeyResponse" + "$ref": "#/definitions/ObjectStorageUser" } }, "default": { @@ -3215,13 +3342,13 @@ "type": "string" }, { - "name": "id", + "name": "dataCenterId", "in": "path", "required": true, "type": "string" }, { - "name": "accessKey", + "name": "userId", "in": "path", "required": true, "type": "string" @@ -3397,6 +3524,47 @@ ] } }, + "/v1/projects/{projectId}/vm/{id}/password": { + "post": { + "operationId": "UpdateVMPassword", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/UpdateVMPasswordResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + }, + "parameters": [ + { + "name": "projectId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateVMPasswordBody" + } + } + ] + } + }, "/v1/projects/{projectId}/vm/{id}/security-group/attach": { "patch": { "summary": "Attach security group to VM", @@ -4290,6 +4458,25 @@ ] } }, + "/v1/vms/machine-types": { + "get": { + "operationId": "ListVMMachineTypes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListVMMachineTypesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, "/v1/vms/machine-types-2": { "get": { "summary": "List machine types v2", @@ -4339,12 +4526,7 @@ }, "definitions": { "ActivateBody": { - "type": "object", - "properties": { - "dataCenterId": { - "type": "string" - } - } + "type": "object" }, "AddBillingAccountUserPermissionBody": { "type": "object", @@ -4817,6 +4999,20 @@ "minMemoryGib" ] }, + "CommitmentTerm": { + "type": "string", + "enum": [ + "COMMITMENT_TERM_NONE", + "COMMITMENT_TERM_1_MONTH", + "COMMITMENT_TERM_3_MONTHS", + "COMMITMENT_TERM_6_MONTHS", + "COMMITMENT_TERM_12_MONTHS", + "COMMITMENT_TERM_24_MONTHS", + "COMMITMENT_TERM_36_MONTHS", + "COMMITMENT_TERM_60_MONTHS" + ], + "default": "COMMITMENT_TERM_NONE" + }, "ConnectVMResponse": { "type": "object", "properties": { @@ -4960,7 +5156,10 @@ "id": { "type": "string" } - } + }, + "required": [ + "id" + ] }, "CreatePrivateVMImageResponse": { "type": "object", @@ -5087,6 +5286,9 @@ }, "ttl": { "type": "string" + }, + "commitmentTerm": { + "$ref": "#/definitions/CommitmentTerm" } }, "required": [ @@ -5177,33 +5379,97 @@ "createTime" ] }, - "DataCenterMachineType": { + "DataCenterCommitment": { "type": "object", "properties": { - "machineType": { - "type": "string" + "createTime": { + "type": "string", + "format": "date-time" }, - "countClusters": { - "type": "integer", - "format": "int32" + "commitmentEndTime": { + "type": "string", + "format": "date-time" }, - "countHosts": { + "vcpus": { "type": "integer", "format": "int32" }, - "countHostsActive": { + "gpus": { "type": "integer", "format": "int32" }, - "countHostsInactive": { + "memoryGib": { "type": "integer", "format": "int32" - } - }, - "required": [ - "machineType", - "countClusters", - "countHosts", + }, + "vcpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "gpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "memoryGibPriceHr": { + "$ref": "#/definitions/Decimal" + } + } + }, + "DataCenterCommitmentInterval": { + "type": "object", + "properties": { + "time": { + "type": "string", + "format": "date-time" + }, + "vcpus": { + "type": "number", + "format": "double" + }, + "vcpuRevenueUsd": { + "$ref": "#/definitions/Decimal" + }, + "gpus": { + "type": "number", + "format": "double" + }, + "gpuRevenueUsd": { + "$ref": "#/definitions/Decimal" + }, + "memoryGib": { + "type": "number", + "format": "double" + }, + "memoryRevenueUsd": { + "$ref": "#/definitions/Decimal" + } + } + }, + "DataCenterMachineType": { + "type": "object", + "properties": { + "machineType": { + "type": "string" + }, + "countClusters": { + "type": "integer", + "format": "int32" + }, + "countHosts": { + "type": "integer", + "format": "int32" + }, + "countHostsActive": { + "type": "integer", + "format": "int32" + }, + "countHostsInactive": { + "type": "integer", + "format": "int32" + } + }, + "required": [ + "machineType", + "countClusters", + "countHosts", "countHostsActive", "countHostsInactive" ] @@ -5267,12 +5533,6 @@ "DeleteNetworkResponse": { "type": "object" }, - "DeleteObjectStorageKeyResponse": { - "type": "object" - }, - "DeleteObjectStorageUserResponse": { - "type": "object" - }, "DeletePrivateVMImageResponse": { "type": "object" }, @@ -5462,6 +5722,46 @@ "spend" ] }, + "GetDataCenterCommitmentScheduleResponse": { + "type": "object", + "properties": { + "commitments": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DataCenterCommitment" + } + } + }, + "required": [ + "commitments" + ] + }, + "GetDataCenterCommitmentTimeSeriesRequest.Interval": { + "type": "string", + "enum": [ + "INTERVAL_UNKNOWN", + "INTERVAL_DAY", + "INTERVAL_WEEK", + "INTERVAL_MONTH" + ], + "default": "INTERVAL_UNKNOWN" + }, + "GetDataCenterCommitmentTimeSeriesResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DataCenterCommitmentInterval" + } + } + }, + "required": [ + "data" + ] + }, "GetDataCenterLiveUtilizationResponse": { "type": "object", "properties": { @@ -5589,6 +5889,16 @@ "resources" ] }, + "GetDataCenterRevenueTimeSeriesRequest.Interval": { + "type": "string", + "enum": [ + "INTERVAL_UNKNOWN", + "INTERVAL_DAY", + "INTERVAL_WEEK", + "INTERVAL_MONTH" + ], + "default": "INTERVAL_UNKNOWN" + }, "GetDataCenterRevenueTimeSeriesResponse": { "type": "object", "properties": { @@ -6088,16 +6398,6 @@ } } }, - "Interval": { - "type": "string", - "enum": [ - "INTERVAL_UNKNOWN", - "INTERVAL_DAY", - "INTERVAL_WEEK", - "INTERVAL_MONTH" - ], - "default": "INTERVAL_UNKNOWN" - }, "Invoice": { "type": "object", "properties": { @@ -6343,7 +6643,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/MachineTypePrice" + "$ref": "#/definitions/ListDataCenterMachineTypePricesResponse.MachineTypePrice" } } }, @@ -6351,6 +6651,37 @@ "prices" ] }, + "ListDataCenterMachineTypePricesResponse.MachineTypePrice": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "machineType": { + "type": "string" + }, + "commitmentTerm": { + "type": "string" + }, + "gpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "vcpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "memoryGibPriceHr": { + "$ref": "#/definitions/Decimal" + } + }, + "required": [ + "uid", + "machineType", + "commitmentTerm", + "gpuPriceHr", + "vcpuPriceHr", + "memoryGibPriceHr" + ] + }, "ListDataCentersResponse": { "type": "object", "properties": { @@ -6509,36 +6840,6 @@ "pageSize" ] }, - "ListObjectStorageKeysResponse": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/ObjectStorageKey" - } - }, - "totalCount": { - "type": "integer", - "format": "int32" - }, - "pageNumber": { - "type": "integer", - "format": "int32" - }, - "pageSize": { - "type": "integer", - "format": "int32" - } - }, - "required": [ - "keys", - "totalCount", - "pageNumber", - "pageSize" - ] - }, "ListObjectStorageUsersResponse": { "type": "object", "properties": { @@ -6819,7 +7120,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/VMMachineType" + "$ref": "#/definitions/ListVMMachineTypes2Response.VMMachineType" } } }, @@ -6827,32 +7128,39 @@ "machineTypes" ] }, - "ListVMsResponse": { - "type": "object", - "properties": { - "VMs": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/VM" - } - } - } - }, - "MachineTypePrice": { + "ListVMMachineTypes2Response.VMMachineType": { "type": "object", "properties": { - "uid": { + "dataCenterId": { "type": "string" }, "machineType": { "type": "string" }, - "commitmentTerm": { + "cpuModel": { "type": "string" }, - "gpuPriceHr": { - "$ref": "#/definitions/Decimal" + "gpuModel": { + "type": "string" + }, + "gpuModelId": { + "type": "string" + }, + "minVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "maxVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "minVcpuPerGpu": { + "type": "number", + "format": "double" + }, + "maxVcpuPerGpu": { + "type": "number", + "format": "double" }, "vcpuPriceHr": { "$ref": "#/definitions/Decimal" @@ -6860,50 +7168,269 @@ "memoryGibPriceHr": { "$ref": "#/definitions/Decimal" }, - "bootDiskGibPriceHr": { + "gpuPriceHr": { "$ref": "#/definitions/Decimal" }, - "ipv4PriceHr": { + "minStorageGibPriceHr": { "$ref": "#/definitions/Decimal" - } - }, - "required": [ - "uid", - "machineType", - "commitmentTerm", - "gpuPriceHr", - "vcpuPriceHr", - "memoryGibPriceHr", - "bootDiskGibPriceHr", - "ipv4PriceHr" - ] - }, - "MonitorVMResponse": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/VMMonitoringItem" - } - } - }, - "required": [ - "items" - ] - }, - "Network": { - "type": "object", - "properties": { - "id": { - "type": "string" }, - "dataCenterId": { - "type": "string" + "ipv4PriceHr": { + "$ref": "#/definitions/Decimal" }, - "ipRange": { - "type": "string" + "renewableEnergy": { + "type": "boolean" + }, + "maxVcpuFree": { + "type": "integer", + "format": "int32" + }, + "totalVcpuFree": { + "type": "integer", + "format": "int32" + }, + "maxMemoryGibFree": { + "type": "integer", + "format": "int32" + }, + "totalMemoryGibFree": { + "type": "integer", + "format": "int32" + }, + "maxGpuFree": { + "type": "integer", + "format": "int32" + }, + "totalGpuFree": { + "type": "integer", + "format": "int32" + }, + "maxStorageGibFree": { + "type": "integer", + "format": "int32" + }, + "totalStorageGibFree": { + "type": "integer", + "format": "int32" + }, + "minVcpu": { + "type": "number", + "format": "double" + }, + "minMemoryGib": { + "type": "number", + "format": "double" + } + }, + "required": [ + "dataCenterId", + "machineType", + "cpuModel", + "gpuModel", + "gpuModelId", + "minVcpuPerMemoryGib", + "maxVcpuPerMemoryGib", + "minVcpuPerGpu", + "maxVcpuPerGpu", + "vcpuPriceHr", + "memoryGibPriceHr", + "gpuPriceHr", + "minStorageGibPriceHr", + "ipv4PriceHr", + "renewableEnergy", + "maxVcpuFree", + "totalVcpuFree", + "maxMemoryGibFree", + "totalMemoryGibFree", + "maxGpuFree", + "totalGpuFree", + "maxStorageGibFree", + "totalStorageGibFree", + "minVcpu", + "minMemoryGib" + ] + }, + "ListVMMachineTypesResponse": { + "type": "object", + "properties": { + "machineTypes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ListVMMachineTypesResponse.VMMachineType" + } + } + }, + "required": [ + "machineTypes" + ] + }, + "ListVMMachineTypesResponse.VMMachineType": { + "type": "object", + "properties": { + "dataCenterId": { + "type": "string" + }, + "machineType": { + "type": "string" + }, + "cpuModel": { + "type": "string" + }, + "gpuModel": { + "type": "string" + }, + "gpuModelId": { + "type": "string" + }, + "minVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "maxVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "minVcpuPerGpu": { + "type": "number", + "format": "double" + }, + "maxVcpuPerGpu": { + "type": "number", + "format": "double" + }, + "vcpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "memoryGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "gpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "minStorageGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "ipv4PriceHr": { + "$ref": "#/definitions/Decimal" + }, + "renewableEnergy": { + "type": "boolean" + }, + "maxVcpuFree": { + "type": "integer", + "format": "int32" + }, + "totalVcpuFree": { + "type": "integer", + "format": "int32" + }, + "maxMemoryGibFree": { + "type": "integer", + "format": "int32" + }, + "totalMemoryGibFree": { + "type": "integer", + "format": "int32" + }, + "maxGpuFree": { + "type": "integer", + "format": "int32" + }, + "totalGpuFree": { + "type": "integer", + "format": "int32" + }, + "maxStorageGibFree": { + "type": "integer", + "format": "int32" + }, + "totalStorageGibFree": { + "type": "integer", + "format": "int32" + }, + "minVcpu": { + "type": "number", + "format": "double" + }, + "minMemoryGib": { + "type": "number", + "format": "double" + }, + "prices": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/VMMachineType.MachineTypePrice" + } + } + }, + "required": [ + "dataCenterId", + "machineType", + "cpuModel", + "gpuModel", + "gpuModelId", + "minVcpuPerMemoryGib", + "maxVcpuPerMemoryGib", + "minVcpuPerGpu", + "maxVcpuPerGpu", + "vcpuPriceHr", + "memoryGibPriceHr", + "gpuPriceHr", + "minStorageGibPriceHr", + "ipv4PriceHr", + "renewableEnergy", + "maxVcpuFree", + "totalVcpuFree", + "maxMemoryGibFree", + "totalMemoryGibFree", + "maxGpuFree", + "totalGpuFree", + "maxStorageGibFree", + "totalStorageGibFree", + "minVcpu", + "minMemoryGib", + "prices" + ] + }, + "ListVMsResponse": { + "type": "object", + "properties": { + "VMs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/VM" + } + } + } + }, + "MonitorVMResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/VMMonitoringItem" + } + } + }, + "required": [ + "items" + ] + }, + "Network": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "dataCenterId": { + "type": "string" + }, + "ipRange": { + "type": "string" }, "gateway": { "type": "string" @@ -7021,59 +7548,71 @@ "projectId": { "type": "string" }, - "id": { + "dataCenterId": { "type": "string" }, - "dataCenterId": { + "id": { "type": "string" }, "endpoint": { - "type": "string" + "type": "string", + "readOnly": true }, "objectCount": { "type": "string", - "format": "int64" + "format": "int64", + "readOnly": true }, "sizeBytes": { "type": "string", - "format": "int64" + "format": "int64", + "readOnly": true }, "billableBytes": { "type": "string", - "format": "int64" + "format": "int64", + "readOnly": true + }, + "storageGibPriceHr": { + "$ref": "#/definitions/Decimal", + "readOnly": true } - } + }, + "required": [ + "projectId", + "dataCenterId", + "id" + ] }, "ObjectStorageKey": { "type": "object", "properties": { - "id": { - "type": "string" - }, "accessKey": { "type": "string" }, "secretKey": { "type": "string" - }, - "createBy": { - "type": "string" - }, - "createTime": { - "type": "string", - "format": "date-time" } } }, "ObjectStorageUser": { "type": "object", "properties": { + "projectId": { + "type": "string" + }, + "dataCenterId": { + "type": "string" + }, "id": { "type": "string" }, - "keyCount": { - "type": "integer", - "format": "int32" + "keys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ObjectStorageKey" + } }, "createBy": { "type": "string" @@ -7082,7 +7621,13 @@ "type": "string", "format": "date-time" } - } + }, + "required": [ + "projectId", + "dataCenterId", + "id", + "keys" + ] }, "Package": { "type": "object", @@ -7981,6 +8526,20 @@ } } }, + "UpdateVMPasswordBody": { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + }, + "UpdateVMPasswordResponse": { + "type": "object" + }, "UpdateVMResponse": { "type": "object" }, @@ -8066,10 +8625,6 @@ "type": "integer", "format": "int64" }, - "priceHr": { - "type": "number", - "format": "float" - }, "renewableEnergy": { "type": "boolean" }, @@ -8143,8 +8698,25 @@ "type": "string", "format": "date-time", "readOnly": true + }, + "price": { + "$ref": "#/definitions/VMPrice", + "readOnly": true + }, + "commitmentTerm": { + "$ref": "#/definitions/CommitmentTerm" + }, + "commitmentEndTime": { + "type": "string", + "format": "date-time", + "readOnly": true } - } + }, + "required": [ + "price", + "commitmentTerm", + "commitmentEndTime" + ] }, "VM.NIC": { "type": "object", @@ -8233,40 +8805,9 @@ ], "default": "VROUTER_INSTANCE_UNKNOWN" }, - "VMMachineType": { + "VMMachineType.MachineTypePrice": { "type": "object", "properties": { - "dataCenterId": { - "type": "string" - }, - "machineType": { - "type": "string" - }, - "cpuModel": { - "type": "string" - }, - "gpuModel": { - "type": "string" - }, - "gpuModelId": { - "type": "string" - }, - "minVcpuPerMemoryGib": { - "type": "number", - "format": "double" - }, - "maxVcpuPerMemoryGib": { - "type": "number", - "format": "double" - }, - "minVcpuPerGpu": { - "type": "number", - "format": "double" - }, - "maxVcpuPerGpu": { - "type": "number", - "format": "double" - }, "vcpuPriceHr": { "$ref": "#/definitions/Decimal" }, @@ -8276,82 +8817,15 @@ "gpuPriceHr": { "$ref": "#/definitions/Decimal" }, - "minStorageGibPriceHr": { - "$ref": "#/definitions/Decimal" - }, - "ipv4PriceHr": { - "$ref": "#/definitions/Decimal" - }, - "renewableEnergy": { - "type": "boolean" - }, - "maxVcpuFree": { - "type": "integer", - "format": "int32" - }, - "totalVcpuFree": { - "type": "integer", - "format": "int32" - }, - "maxMemoryGibFree": { - "type": "integer", - "format": "int32" - }, - "totalMemoryGibFree": { - "type": "integer", - "format": "int32" - }, - "maxGpuFree": { - "type": "integer", - "format": "int32" - }, - "totalGpuFree": { - "type": "integer", - "format": "int32" - }, - "maxStorageGibFree": { - "type": "integer", - "format": "int32" - }, - "totalStorageGibFree": { - "type": "integer", - "format": "int32" - }, - "minVcpu": { - "type": "number", - "format": "double" - }, - "minMemoryGib": { - "type": "number", - "format": "double" + "commitmentTerm": { + "$ref": "#/definitions/CommitmentTerm" } }, "required": [ - "dataCenterId", - "machineType", - "cpuModel", - "gpuModel", - "gpuModelId", - "minVcpuPerMemoryGib", - "maxVcpuPerMemoryGib", - "minVcpuPerGpu", - "maxVcpuPerGpu", "vcpuPriceHr", "memoryGibPriceHr", "gpuPriceHr", - "minStorageGibPriceHr", - "ipv4PriceHr", - "renewableEnergy", - "maxVcpuFree", - "totalVcpuFree", - "maxMemoryGibFree", - "totalMemoryGibFree", - "maxGpuFree", - "totalGpuFree", - "maxStorageGibFree", - "totalStorageGibFree", - "minVcpu", - "minMemoryGib" + "commitmentTerm" ] }, "VMMonitoringItem": { @@ -8395,6 +8869,53 @@ } } }, + "VMPrice": { + "type": "object", + "properties": { + "vcpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "totalVcpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "memoryGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "totalMemoryPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "gpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "totalGpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "storageGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "totalStoragePriceHr": { + "$ref": "#/definitions/Decimal" + }, + "ipv4AddressPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "totalPriceHr": { + "$ref": "#/definitions/Decimal" + } + }, + "required": [ + "vcpuPriceHr", + "totalVcpuPriceHr", + "memoryGibPriceHr", + "totalMemoryPriceHr", + "gpuPriceHr", + "totalGpuPriceHr", + "storageGibPriceHr", + "totalStoragePriceHr", + "ipv4AddressPriceHr", + "totalPriceHr" + ] + }, "VirtualMachineResult": { "type": "object", "properties": { @@ -8524,4 +9045,4 @@ "default": "VROUTER_INSTANCE_UNKNOWN" } } -} \ No newline at end of file +} diff --git a/tools/swaggerfix.py b/tools/swaggerfix.py index 6ef9ebc..1c7fedd 100644 --- a/tools/swaggerfix.py +++ b/tools/swaggerfix.py @@ -15,7 +15,7 @@ def find_instances(obj, key, value, path=[]): return instances -file_path = 'swagger/public.swagger.json' +file_path = 'swagger/compute.swagger.json' with open(file_path, 'r') as file: json_data = json.load(file) From e04b54cab05a7e75189e01715c5b503758711c06 Mon Sep 17 00:00:00 2001 From: sean Date: Thu, 19 Dec 2024 15:45:21 +0000 Subject: [PATCH 2/2] update version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a188310..f7e2ba6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "cudo-compute" -version = "0.3.0" +version = "0.3.1" authors = [ { name = "Cudo Ventures", email = "dev@cudoventures.com" }, ]