diff --git a/codegen.sh b/codegen.sh index 189d13a..6bf9f11 100755 --- a/codegen.sh +++ b/codegen.sh @@ -7,9 +7,10 @@ cd swagger-codegen ./run-in-docker.sh generate -i public.swagger.json \ -l python -o /gen/out -DpackageName=src.cudo_compute cd .. -cp -r swagger-codegen/out/docs docs +cp swagger-codegen/out/README.md docs +cp -r swagger-codegen/out/docs/ docs cp -r swagger-codegen/out/src/ docs -rm -rf swagger-codegen +#rm -rf swagger-codegen cp helpers/* docs/src/cudo_compute echo "import src.cudo_compute.auth_config as AuthConfig" >> src/cudo_compute/__init__.py diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..de368ff --- /dev/null +++ b/docs/README.md @@ -0,0 +1,348 @@ +# src.cudo-compute +No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: io.swagger.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import src.cudo_compute +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import src.cudo_compute +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```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(src.cudo_compute.ApiClient(configuration)) +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) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://rest.compute.cudo.org* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*APIKeysApi* | [**delete_api_key**](docs/APIKeysApi.md#delete_api_key) | **DELETE** /v1/api-keys/{name} | Delete +*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* | [**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_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* | [**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 +*DataCentersApi* | [**count_hosts**](docs/DataCentersApi.md#count_hosts) | **GET** /v1/data-centers/{dataCenterId}/host-count | Get host count +*DataCentersApi* | [**create_data_center**](docs/DataCentersApi.md#create_data_center) | **POST** /v1/data-centers | Create data center +*DataCentersApi* | [**delete_data_center**](docs/DataCentersApi.md#delete_data_center) | **DELETE** /v1/data-centers/{id} | Delete data center +*DataCentersApi* | [**get_data_center**](docs/DataCentersApi.md#get_data_center) | **GET** /v1/data-centers/{id} | Get data center +*DataCentersApi* | [**get_data_center_live_utilization**](docs/DataCentersApi.md#get_data_center_live_utilization) | **GET** /v1/data-centers/{id}/live-utilization | Get live utilization +*DataCentersApi* | [**get_data_center_revenue_by_resource**](docs/DataCentersApi.md#get_data_center_revenue_by_resource) | **GET** /v1/data-centers/{id}/revenue-by-resource | Get revenue by resource +*DataCentersApi* | [**get_data_center_revenue_time_series**](docs/DataCentersApi.md#get_data_center_revenue_time_series) | **GET** /v1/data-centers/{id}/revenue | Get revenue time series +*DataCentersApi* | [**list_clusters**](docs/DataCentersApi.md#list_clusters) | **GET** /v1/data-centers/{dataCenterId}/clusters | List clusters +*DataCentersApi* | [**list_data_centers**](docs/DataCentersApi.md#list_data_centers) | **GET** /v1/data-centers | List data centers +*DataCentersApi* | [**list_hosts**](docs/DataCentersApi.md#list_hosts) | **GET** /v1/data-centers/{dataCenterId}/hosts | List hosts +*DataCentersApi* | [**update_data_center**](docs/DataCentersApi.md#update_data_center) | **PATCH** /v1/data-centers/{dataCenter.id} | Update data center +*DisksApi* | [**attach_storage_disk**](docs/DisksApi.md#attach_storage_disk) | **PATCH** /v1/projects/{projectId}/disk/{id}/attach | Attach storage disk to VM +*DisksApi* | [**create_disk_snapshot**](docs/DisksApi.md#create_disk_snapshot) | **POST** /v1/projects/{projectId}/disks/{id}/snapshots | Create Disk Snapshot +*DisksApi* | [**create_storage_disk**](docs/DisksApi.md#create_storage_disk) | **POST** /v1/projects/{projectId}/disks | Create storage disk +*DisksApi* | [**delete_disk_snapshot**](docs/DisksApi.md#delete_disk_snapshot) | **DELETE** /v1/projects/{projectId}/disks/{id}/snapshots | Delete Disk Snapshots +*DisksApi* | [**delete_storage_disk**](docs/DisksApi.md#delete_storage_disk) | **DELETE** /v1/projects/{projectId}/disks/{id} | Delete storage disk +*DisksApi* | [**detach_storage_disk**](docs/DisksApi.md#detach_storage_disk) | **PUT** /v1/projects/{projectId}/disk/{id}/detach | Detach storage disk from VM +*DisksApi* | [**get_disk**](docs/DisksApi.md#get_disk) | **GET** /v1/projects/{projectId}/disks/{id} | List disks +*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 +*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 +*NetworksApi* | [**delete_security_group**](docs/NetworksApi.md#delete_security_group) | **DELETE** /v1/projects/{projectId}/networks/security-groups/{id} | Delete security group +*NetworksApi* | [**get_network**](docs/NetworksApi.md#get_network) | **GET** /v1/projects/{projectId}/networks/{id} | Get network +*NetworksApi* | [**get_security_group**](docs/NetworksApi.md#get_security_group) | **GET** /v1/projects/{projectId}/networks/security-groups/{id} | Get a security group +*NetworksApi* | [**list_networks**](docs/NetworksApi.md#list_networks) | **GET** /v1/projects/{projectId}/networks | List networks +*NetworksApi* | [**list_security_groups**](docs/NetworksApi.md#list_security_groups) | **GET** /v1/projects/{projectId}/networks/security-groups | List security groups +*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* | [**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 +*PermissionsApi* | [**add_project_user_permission**](docs/PermissionsApi.md#add_project_user_permission) | **POST** /v1/projects/{projectId}/add-user-permission | Add project user +*PermissionsApi* | [**list_user_permissions**](docs/PermissionsApi.md#list_user_permissions) | **GET** /v1/auth/permissions | List +*PermissionsApi* | [**remove_billing_account_user_permission**](docs/PermissionsApi.md#remove_billing_account_user_permission) | **POST** /v1/billing-accounts/{billingAccountId}/remove-user-permission | Remove billing account user +*PermissionsApi* | [**remove_data_center_user_permission**](docs/PermissionsApi.md#remove_data_center_user_permission) | **POST** /v1/data-centers/{dataCenterId}/remove-user-permission | Remove data center user +*PermissionsApi* | [**remove_project_user_permission**](docs/PermissionsApi.md#remove_project_user_permission) | **POST** /v1/projects/{projectId}/remove-user-permission | Remove project user +*ProjectsApi* | [**create_project**](docs/ProjectsApi.md#create_project) | **POST** /v1/projects | Create +*ProjectsApi* | [**delete_project**](docs/ProjectsApi.md#delete_project) | **DELETE** /v1/projects/{id} | Delete +*ProjectsApi* | [**get_project**](docs/ProjectsApi.md#get_project) | **GET** /v1/projects/{id} | Get +*ProjectsApi* | [**list_project_ssh_keys**](docs/ProjectsApi.md#list_project_ssh_keys) | **GET** /v1/project/{projectId}/ssh-keys | List SSH keys +*ProjectsApi* | [**list_projects**](docs/ProjectsApi.md#list_projects) | **GET** /v1/projects | List +*ProjectsApi* | [**update_project**](docs/ProjectsApi.md#update_project) | **PATCH** /v1/projects/{project.id} | Update +*SSHKeysApi* | [**create_ssh_key**](docs/SSHKeysApi.md#create_ssh_key) | **POST** /v1/ssh-keys | Create +*SSHKeysApi* | [**delete_ssh_key**](docs/SSHKeysApi.md#delete_ssh_key) | **DELETE** /v1/ssh-keys/{id} | Delete +*SSHKeysApi* | [**get_ssh_key**](docs/SSHKeysApi.md#get_ssh_key) | **GET** /v1/ssh-keys/{id} | Get +*SSHKeysApi* | [**list_ssh_keys**](docs/SSHKeysApi.md#list_ssh_keys) | **GET** /v1/ssh-keys | List +*SearchApi* | [**list_regions**](docs/SearchApi.md#list_regions) | **GET** /v1/regions | Regions +*UserApi* | [**create_identity_verification_session**](docs/UserApi.md#create_identity_verification_session) | **GET** /v1/auth/create-identity-verification-session | Get identity verification session +*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /v1/auth | Delete +*UserApi* | [**get**](docs/UserApi.md#get) | **GET** /v1/auth | Get +*VirtualMachinesApi* | [**attach_security_group**](docs/VirtualMachinesApi.md#attach_security_group) | **PATCH** /v1/projects/{projectId}/vm/{id}/security-group/attach | Attach security group to VM +*VirtualMachinesApi* | [**connect_vm**](docs/VirtualMachinesApi.md#connect_vm) | **GET** /v1/projects/{projectId}/vms/{id}/connect | Connect via VNC +*VirtualMachinesApi* | [**count_vms**](docs/VirtualMachinesApi.md#count_vms) | **GET** /v1/projects/{projectId}/count-vms | Count +*VirtualMachinesApi* | [**create_private_vm_image**](docs/VirtualMachinesApi.md#create_private_vm_image) | **POST** /v1/projects/{projectId}/images | Create private VM image +*VirtualMachinesApi* | [**create_vm**](docs/VirtualMachinesApi.md#create_vm) | **POST** /v1/projects/{projectId}/vm | Create virtual machine +*VirtualMachinesApi* | [**delete_private_vm_image**](docs/VirtualMachinesApi.md#delete_private_vm_image) | **DELETE** /v1/projects/{projectId}/images/{id} | Delete private VM image +*VirtualMachinesApi* | [**detach_security_group**](docs/VirtualMachinesApi.md#detach_security_group) | **PATCH** /v1/projects/{projectId}/vm/{id}/security-group/detach | Attach security group to VM +*VirtualMachinesApi* | [**get_private_vm_image**](docs/VirtualMachinesApi.md#get_private_vm_image) | **GET** /v1/projects/{projectId}/images/{id} | Get private VM image +*VirtualMachinesApi* | [**get_vm**](docs/VirtualMachinesApi.md#get_vm) | **GET** /v1/projects/{projectId}/vms/{id} | Get +*VirtualMachinesApi* | [**list_private_vm_images**](docs/VirtualMachinesApi.md#list_private_vm_images) | **GET** /v1/projects/{projectId}/images | List private VM images +*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_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 +*VirtualMachinesApi* | [**resize_vm**](docs/VirtualMachinesApi.md#resize_vm) | **POST** /v1/projects/{projectId}/vms/{id}/resize | Resize vCPU and memory of VM +*VirtualMachinesApi* | [**resize_vm_disk**](docs/VirtualMachinesApi.md#resize_vm_disk) | **PATCH** /v1/projects/{projectId}/vms/{id}/disks | Resize a VM's disk +*VirtualMachinesApi* | [**start_vm**](docs/VirtualMachinesApi.md#start_vm) | **POST** /v1/projects/{projectId}/vms/{id}/start | Start +*VirtualMachinesApi* | [**stop_vm**](docs/VirtualMachinesApi.md#stop_vm) | **POST** /v1/projects/{projectId}/vms/{id}/stop | Stop +*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 + + +## Documentation For Models + + - [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) + - [BillingAccountSetupIntent](docs/BillingAccountSetupIntent.md) + - [BillingAccountSpendRow](docs/BillingAccountSpendRow.md) + - [Body](docs/Body.md) + - [Body1](docs/Body1.md) + - [Body10](docs/Body10.md) + - [Body11](docs/Body11.md) + - [Body12](docs/Body12.md) + - [Body2](docs/Body2.md) + - [Body3](docs/Body3.md) + - [Body4](docs/Body4.md) + - [Body5](docs/Body5.md) + - [Body6](docs/Body6.md) + - [Body7](docs/Body7.md) + - [Body8](docs/Body8.md) + - [Body9](docs/Body9.md) + - [Cluster](docs/Cluster.md) + - [ConnectVMResponse](docs/ConnectVMResponse.md) + - [CountHostsResponse](docs/CountHostsResponse.md) + - [CountVMsResponse](docs/CountVMsResponse.md) + - [CpuModelCategory](docs/CpuModelCategory.md) + - [CreateBillingAccountRequest](docs/CreateBillingAccountRequest.md) + - [CreateDiskSnapshotResponse](docs/CreateDiskSnapshotResponse.md) + - [CreateNetworkResponse](docs/CreateNetworkResponse.md) + - [CreatePrivateVMImageResponse](docs/CreatePrivateVMImageResponse.md) + - [CreateSecurityGroupResponse](docs/CreateSecurityGroupResponse.md) + - [CreateStorageDiskResponse](docs/CreateStorageDiskResponse.md) + - [CreateVMRequestNIC](docs/CreateVMRequestNIC.md) + - [CreateVMResponse](docs/CreateVMResponse.md) + - [DataCenter](docs/DataCenter.md) + - [DataCenterCategory](docs/DataCenterCategory.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) + - [DiskState](docs/DiskState.md) + - [DiskStorageClass](docs/DiskStorageClass.md) + - [DiskStoragePriceHr](docs/DiskStoragePriceHr.md) + - [DiskType](docs/DiskType.md) + - [GenerateApiKeyRequest](docs/GenerateApiKeyRequest.md) + - [GetBillingAccountDetailsResponse](docs/GetBillingAccountDetailsResponse.md) + - [GetBillingAccountSpendDetailsResponse](docs/GetBillingAccountSpendDetailsResponse.md) + - [GetBillingAccountStripeInvoicesResponse](docs/GetBillingAccountStripeInvoicesResponse.md) + - [GetDataCenterLiveUtilizationResponse](docs/GetDataCenterLiveUtilizationResponse.md) + - [GetDataCenterRevenueByResourceResponse](docs/GetDataCenterRevenueByResourceResponse.md) + - [GetDataCenterRevenueTimeSeriesResponse](docs/GetDataCenterRevenueTimeSeriesResponse.md) + - [GetDiskResponse](docs/GetDiskResponse.md) + - [GetMachineTypeLiveUtilizationResponse](docs/GetMachineTypeLiveUtilizationResponse.md) + - [GetMachineTypeResponse](docs/GetMachineTypeResponse.md) + - [GetNetworkResponse](docs/GetNetworkResponse.md) + - [GetObjectStorageSessionKeyResponse](docs/GetObjectStorageSessionKeyResponse.md) + - [GetPrivateVMImageResponse](docs/GetPrivateVMImageResponse.md) + - [GetSecurityGroupResponse](docs/GetSecurityGroupResponse.md) + - [GetVMResponse](docs/GetVMResponse.md) + - [GpuModelCategory](docs/GpuModelCategory.md) + - [Host](docs/Host.md) + - [HostConfigCategory](docs/HostConfigCategory.md) + - [IdentityVerificationSession](docs/IdentityVerificationSession.md) + - [Image](docs/Image.md) + - [Interval](docs/Interval.md) + - [Invoice](docs/Invoice.md) + - [ListApiKeysResponse](docs/ListApiKeysResponse.md) + - [ListBillingAccountsResponse](docs/ListBillingAccountsResponse.md) + - [ListClustersResponse](docs/ListClustersResponse.md) + - [ListDataCentersResponse](docs/ListDataCentersResponse.md) + - [ListDiskSnapshotsResponse](docs/ListDiskSnapshotsResponse.md) + - [ListDisksResponse](docs/ListDisksResponse.md) + - [ListHostsResponse](docs/ListHostsResponse.md) + - [ListMachineTypesResponse](docs/ListMachineTypesResponse.md) + - [ListNetworksResponse](docs/ListNetworksResponse.md) + - [ListObjectStorageBucketsResponse](docs/ListObjectStorageBucketsResponse.md) + - [ListObjectStorageKeysResponse](docs/ListObjectStorageKeysResponse.md) + - [ListObjectStorageUsersResponse](docs/ListObjectStorageUsersResponse.md) + - [ListOutstandingStripeInvoicesResponse](docs/ListOutstandingStripeInvoicesResponse.md) + - [ListPrivateVMImagesResponse](docs/ListPrivateVMImagesResponse.md) + - [ListPrivateVMImagesResponsePrivateImage](docs/ListPrivateVMImagesResponsePrivateImage.md) + - [ListProjectSshKeysResponse](docs/ListProjectSshKeysResponse.md) + - [ListProjectsResponse](docs/ListProjectsResponse.md) + - [ListPublicVMImagesResponse](docs/ListPublicVMImagesResponse.md) + - [ListRegionsResponse](docs/ListRegionsResponse.md) + - [ListSecurityGroupsResponse](docs/ListSecurityGroupsResponse.md) + - [ListSshKeysResponse](docs/ListSshKeysResponse.md) + - [ListUserPermissionsResponse](docs/ListUserPermissionsResponse.md) + - [ListVMDataCentersResponse](docs/ListVMDataCentersResponse.md) + - [ListVMDisksResponse](docs/ListVMDisksResponse.md) + - [ListVMMachineTypesRequest](docs/ListVMMachineTypesRequest.md) + - [ListVMMachineTypesResponse](docs/ListVMMachineTypesResponse.md) + - [ListVMsResponse](docs/ListVMsResponse.md) + - [MachineType](docs/MachineType.md) + - [MonitorVMResponse](docs/MonitorVMResponse.md) + - [Network](docs/Network.md) + - [NetworkPriceHr](docs/NetworkPriceHr.md) + - [NetworkState](docs/NetworkState.md) + - [ObjectStorageBucket](docs/ObjectStorageBucket.md) + - [ObjectStorageKey](docs/ObjectStorageKey.md) + - [ObjectStorageUser](docs/ObjectStorageUser.md) + - [PaymentMethodCard](docs/PaymentMethodCard.md) + - [PaymentMethodPaypal](docs/PaymentMethodPaypal.md) + - [Point](docs/Point.md) + - [Profile](docs/Profile.md) + - [Project](docs/Project.md) + - [Protocol](docs/Protocol.md) + - [RebootVMResponse](docs/RebootVMResponse.md) + - [Region](docs/Region.md) + - [RemoveBillingAccountPaymentMethodResponse](docs/RemoveBillingAccountPaymentMethodResponse.md) + - [ResizeVMDiskResponse](docs/ResizeVMDiskResponse.md) + - [ResizeVMResponse](docs/ResizeVMResponse.md) + - [RevertDiskResponse](docs/RevertDiskResponse.md) + - [Role](docs/Role.md) + - [Rule](docs/Rule.md) + - [RuleType](docs/RuleType.md) + - [SecurityGroup](docs/SecurityGroup.md) + - [SecurityGroup1](docs/SecurityGroup1.md) + - [SecurityGroupRule](docs/SecurityGroupRule.md) + - [SetBillingAccountDefaultPaymentMethodResponse](docs/SetBillingAccountDefaultPaymentMethodResponse.md) + - [Snapshot](docs/Snapshot.md) + - [SshKey](docs/SshKey.md) + - [SshKeySource](docs/SshKeySource.md) + - [StartNetworkResponse](docs/StartNetworkResponse.md) + - [StartVMResponse](docs/StartVMResponse.md) + - [Status](docs/Status.md) + - [StopNetworkResponse](docs/StopNetworkResponse.md) + - [StopVMResponse](docs/StopVMResponse.md) + - [StripeCustomer](docs/StripeCustomer.md) + - [TaxId](docs/TaxId.md) + - [TerminateVMResponse](docs/TerminateVMResponse.md) + - [Unit](docs/Unit.md) + - [UpdatePrivateVMImageResponse](docs/UpdatePrivateVMImageResponse.md) + - [UpdateSecurityGroupResponse](docs/UpdateSecurityGroupResponse.md) + - [UpdateVMMetadataResponse](docs/UpdateVMMetadataResponse.md) + - [UserPermission](docs/UserPermission.md) + - [V1PrivateImage](docs/V1PrivateImage.md) + - [V1billingaccountsbillingAccountIdBillingAccount](docs/V1billingaccountsbillingAccountIdBillingAccount.md) + - [VM](docs/VM.md) + - [VMDataCenter](docs/VMDataCenter.md) + - [VMDataCenterStorageClass](docs/VMDataCenterStorageClass.md) + - [VMMonitoringItem](docs/VMMonitoringItem.md) + - [VMNIC](docs/VMNIC.md) + - [VRouterSize](docs/VRouterSize.md) + - [VmState](docs/VmState.md) + + +## Documentation For Authorization + + All endpoints do not require authorization. + + +## Author + + + diff --git a/docs/APIKeysApi.md b/docs/docs/APIKeysApi.md similarity index 100% rename from docs/APIKeysApi.md rename to docs/docs/APIKeysApi.md diff --git a/docs/Any.md b/docs/docs/Any.md similarity index 100% rename from docs/Any.md rename to docs/docs/Any.md diff --git a/docs/ApiKey.md b/docs/docs/ApiKey.md similarity index 100% rename from docs/ApiKey.md rename to docs/docs/ApiKey.md diff --git a/docs/Body8.md b/docs/docs/AttachSecurityGroupResponse.md similarity index 83% rename from docs/Body8.md rename to docs/docs/AttachSecurityGroupResponse.md index 81899d8..7341ce6 100644 --- a/docs/Body8.md +++ b/docs/docs/AttachSecurityGroupResponse.md @@ -1,9 +1,8 @@ -# Body8 +# AttachSecurityGroupResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data_center_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/AttachStorageDiskResponse.md b/docs/docs/AttachStorageDiskResponse.md similarity index 100% rename from docs/AttachStorageDiskResponse.md rename to docs/docs/AttachStorageDiskResponse.md diff --git a/docs/docs/BillingAccount.md b/docs/docs/BillingAccount.md new file mode 100644 index 0000000..b5fd56b --- /dev/null +++ b/docs/docs/BillingAccount.md @@ -0,0 +1,20 @@ +# BillingAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_threshold** | [**Decimal**](Decimal.md) | | [optional] +**create_by** | **str** | | [optional] +**create_time** | **datetime** | | [optional] +**demand_enabled** | **bool** | | [optional] +**display_name** | **str** | | [optional] +**id** | **str** | | [optional] +**invoice_time** | **datetime** | | [optional] +**monthly_spend** | **str** | | [optional] +**stripe_ref** | **str** | | [optional] +**supply_enabled** | **bool** | | [optional] +**tax_ids** | [**list[TaxId]**](TaxId.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/docs/BillingAccountPaymentMethod.md b/docs/docs/BillingAccountPaymentMethod.md new file mode 100644 index 0000000..c1128d8 --- /dev/null +++ b/docs/docs/BillingAccountPaymentMethod.md @@ -0,0 +1,14 @@ +# BillingAccountPaymentMethod + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card** | [**PaymentMethodCard**](PaymentMethodCard.md) | | [optional] +**id** | **str** | | [optional] +**is_default** | **bool** | | [optional] +**paypal** | [**PaymentMethodPaypal**](PaymentMethodPaypal.md) | | [optional] +**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/docs/BillingAccountPaymentMethods.md b/docs/docs/BillingAccountPaymentMethods.md new file mode 100644 index 0000000..e6b5285 --- /dev/null +++ b/docs/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/Body5.md b/docs/docs/BillingAccountSetupIntent.md similarity index 72% rename from docs/Body5.md rename to docs/docs/BillingAccountSetupIntent.md index bb91a8f..788564e 100644 --- a/docs/Body5.md +++ b/docs/docs/BillingAccountSetupIntent.md @@ -1,10 +1,10 @@ -# Body5 +# BillingAccountSetupIntent ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data_center_id** | **str** | | [optional] -**disk** | [**Disk**](Disk.md) | | [optional] +**client_secret** | **str** | | +**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/docs/BillingAccountSpendRow.md b/docs/docs/BillingAccountSpendRow.md new file mode 100644 index 0000000..6d03921 --- /dev/null +++ b/docs/docs/BillingAccountSpendRow.md @@ -0,0 +1,15 @@ +# BillingAccountSpendRow + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | [**Decimal**](Decimal.md) | | +**description** | **str** | | +**project_id** | **str** | | +**quantity** | **float** | | +**unit** | [**Unit**](Unit.md) | | +**unit_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/docs/BillingApi.md b/docs/docs/BillingApi.md new file mode 100644 index 0000000..094e7f9 --- /dev/null +++ b/docs/docs/BillingApi.md @@ -0,0 +1,633 @@ +# 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 +[**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 +[**get_billing_account_stripe_invoices**](BillingApi.md#get_billing_account_stripe_invoices) | **GET** /v1/billing-accounts/invoices | Get invoices +[**list_billing_accounts**](BillingApi.md#list_billing_accounts) | **GET** /v1/billing-accounts | List billing accounts +[**list_outstanding_stripe_invoices**](BillingApi.md#list_outstanding_stripe_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(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() +body = src.cudo_compute.CreateBillingAccountRequest() # CreateBillingAccountRequest | + +try: + # Create a billing account + api_response = api_instance.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 +------------- | ------------- | ------------- | ------------- + **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) + +# **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) + +# **get_billing_account_stripe_invoices** +> GetBillingAccountStripeInvoicesResponse get_billing_account_stripe_invoices(id, page_size=page_size, starting_after=starting_after, status=status) + +Get 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: + # Get invoices + api_response = api_instance.get_billing_account_stripe_invoices(id, page_size=page_size, starting_after=starting_after, status=status) + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->get_billing_account_stripe_invoices: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + **page_size** | **int**| | [optional] + **starting_after** | **str**| | [optional] + **status** | **str**| | [optional] + +### Return type + +[**GetBillingAccountStripeInvoicesResponse**](GetBillingAccountStripeInvoicesResponse.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_stripe_invoices** +> ListOutstandingStripeInvoicesResponse list_outstanding_stripe_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_stripe_invoices() + pprint(api_response) +except ApiException as e: + print("Exception when calling BillingApi->list_outstanding_stripe_invoices: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ListOutstandingStripeInvoicesResponse**](ListOutstandingStripeInvoicesResponse.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, 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 | +body = src.cudo_compute.Body() # Body | + +try: + # Update billing account + api_response = api_instance.update_billing_account(billing_account_id, 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**| | + **body** | [**Body**](Body.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/docs/Body.md b/docs/docs/Body.md new file mode 100644 index 0000000..799ce79 --- /dev/null +++ b/docs/docs/Body.md @@ -0,0 +1,11 @@ +# Body + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_account** | [**V1billingaccountsbillingAccountIdBillingAccount**](V1billingaccountsbillingAccountIdBillingAccount.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/Body1.md b/docs/docs/Body1.md similarity index 92% rename from docs/Body1.md rename to docs/docs/Body1.md index f419932..612e4b5 100644 --- a/docs/Body1.md +++ b/docs/docs/Body1.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **data_center_id** | **str** | | [optional] **project_id** | **str** | | [optional] **role** | [**Role**](Role.md) | | -**user_id** | **str** | | +**user_email** | **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/docs/Body10.md b/docs/docs/Body10.md new file mode 100644 index 0000000..5cac263 --- /dev/null +++ b/docs/docs/Body10.md @@ -0,0 +1,10 @@ +# Body10 + +## 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/Body10.md b/docs/docs/Body11.md similarity index 97% rename from docs/Body10.md rename to docs/docs/Body11.md index 4df1f68..7f4e303 100644 --- a/docs/Body10.md +++ b/docs/docs/Body11.md @@ -1,4 +1,4 @@ -# Body10 +# Body11 ## Properties Name | Type | Description | Notes diff --git a/docs/Body11.md b/docs/docs/Body12.md similarity index 99% rename from docs/Body11.md rename to docs/docs/Body12.md index 22f4f72..d70fa1b 100644 --- a/docs/Body11.md +++ b/docs/docs/Body12.md @@ -1,4 +1,4 @@ -# Body11 +# Body12 ## Properties Name | Type | Description | Notes diff --git a/docs/Body2.md b/docs/docs/Body2.md similarity index 81% rename from docs/Body2.md rename to docs/docs/Body2.md index d13a076..1680716 100644 --- a/docs/Body2.md +++ b/docs/docs/Body2.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**billing_account_id** | **str** | | [optional] +**data_center_id** | **str** | | [optional] **project_id** | **str** | | [optional] **role** | [**Role**](Role.md) | | -**user_email** | **str** | | +**user_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/Body3.md b/docs/docs/Body3.md similarity index 93% rename from docs/Body3.md rename to docs/docs/Body3.md index e194057..411c499 100644 --- a/docs/Body3.md +++ b/docs/docs/Body3.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **billing_account_id** | **str** | | [optional] **project_id** | **str** | | [optional] **role** | [**Role**](Role.md) | | -**user_id** | **str** | | +**user_email** | **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/Body4.md b/docs/docs/Body4.md similarity index 82% rename from docs/Body4.md rename to docs/docs/Body4.md index 009298b..c59a3c5 100644 --- a/docs/Body4.md +++ b/docs/docs/Body4.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **billing_account_id** | **str** | | [optional] -**data_center_id** | **str** | | [optional] +**project_id** | **str** | | [optional] **role** | [**Role**](Role.md) | | -**user_email** | **str** | | +**user_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/Body.md b/docs/docs/Body5.md similarity index 87% rename from docs/Body.md rename to docs/docs/Body5.md index 971ad18..795809b 100644 --- a/docs/Body.md +++ b/docs/docs/Body5.md @@ -1,10 +1,10 @@ -# Body +# Body5 ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**billing_account_id** | **str** | | [optional] **data_center_id** | **str** | | [optional] -**project_id** | **str** | | [optional] **role** | [**Role**](Role.md) | | **user_email** | **str** | | diff --git a/docs/Body6.md b/docs/docs/Body6.md similarity index 75% rename from docs/Body6.md rename to docs/docs/Body6.md index 4af2156..4503646 100644 --- a/docs/Body6.md +++ b/docs/docs/Body6.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**snapshot_id** | **str** | | -**vm_id** | **str** | | +**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/docs/Body7.md b/docs/docs/Body7.md new file mode 100644 index 0000000..266db73 --- /dev/null +++ b/docs/docs/Body7.md @@ -0,0 +1,11 @@ +# Body7 + +## 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/Body7.md b/docs/docs/Body8.md similarity index 98% rename from docs/Body7.md rename to docs/docs/Body8.md index 53603ba..b15ce13 100644 --- a/docs/Body7.md +++ b/docs/docs/Body8.md @@ -1,4 +1,4 @@ -# Body7 +# Body8 ## Properties Name | Type | Description | Notes diff --git a/docs/Body9.md b/docs/docs/Body9.md similarity index 86% rename from docs/Body9.md rename to docs/docs/Body9.md index 938ccfb..f5a88f8 100644 --- a/docs/Body9.md +++ b/docs/docs/Body9.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **str** | | [optional] +**data_center_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/docs/Cluster.md b/docs/docs/Cluster.md new file mode 100644 index 0000000..d33053f --- /dev/null +++ b/docs/docs/Cluster.md @@ -0,0 +1,32 @@ +# Cluster + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu_model** | **str** | | +**create_time** | **datetime** | | +**gpu_free** | **int** | | +**gpu_model** | **str** | | +**gpu_model_pci_types** | **list[str]** | | +**gpu_price_hr** | [**Decimal**](Decimal.md) | | +**gpu_used** | **int** | | +**host_count** | **int** | | +**host_problem_count** | **int** | | +**machine_type** | **str** | | +**max_vcpu_per_gpu** | **float** | | +**max_vcpu_per_memory_gib** | **float** | | +**memory_gib_free** | **int** | | +**memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**memory_gib_used** | **int** | | +**min_vcpu_per_gpu** | **float** | | +**min_vcpu_per_memory_gib** | **float** | | +**update_time** | **datetime** | | +**vcpu_free** | **int** | | +**vcpu_per_cpu_thread** | **int** | | +**vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**vcpu_used** | **int** | | +**vm_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/ConnectVMResponse.md b/docs/docs/ConnectVMResponse.md similarity index 100% rename from docs/ConnectVMResponse.md rename to docs/docs/ConnectVMResponse.md diff --git a/docs/docs/CountHostsResponse.md b/docs/docs/CountHostsResponse.md new file mode 100644 index 0000000..87f9b72 --- /dev/null +++ b/docs/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/docs/CountVMsResponse.md similarity index 100% rename from docs/CountVMsResponse.md rename to docs/docs/CountVMsResponse.md diff --git a/docs/CpuModelCategory.md b/docs/docs/CpuModelCategory.md similarity index 100% rename from docs/CpuModelCategory.md rename to docs/docs/CpuModelCategory.md diff --git a/docs/docs/CreateBillingAccountRequest.md b/docs/docs/CreateBillingAccountRequest.md new file mode 100644 index 0000000..00449ce --- /dev/null +++ b/docs/docs/CreateBillingAccountRequest.md @@ -0,0 +1,14 @@ +# CreateBillingAccountRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**display_name** | **str** | | +**email** | **str** | | +**invoice_name** | **str** | | +**referral** | **str** | | [optional] +**tax_ids** | [**list[TaxId]**](TaxId.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/CreateDiskSnapshotResponse.md b/docs/docs/CreateDiskSnapshotResponse.md similarity index 100% rename from docs/CreateDiskSnapshotResponse.md rename to docs/docs/CreateDiskSnapshotResponse.md diff --git a/docs/CreateNetworkResponse.md b/docs/docs/CreateNetworkResponse.md similarity index 100% rename from docs/CreateNetworkResponse.md rename to docs/docs/CreateNetworkResponse.md diff --git a/docs/CreatePrivateVMImageResponse.md b/docs/docs/CreatePrivateVMImageResponse.md similarity index 100% rename from docs/CreatePrivateVMImageResponse.md rename to docs/docs/CreatePrivateVMImageResponse.md diff --git a/docs/CreateSecurityGroupResponse.md b/docs/docs/CreateSecurityGroupResponse.md similarity index 100% rename from docs/CreateSecurityGroupResponse.md rename to docs/docs/CreateSecurityGroupResponse.md diff --git a/docs/CreateStorageDiskResponse.md b/docs/docs/CreateStorageDiskResponse.md similarity index 100% rename from docs/CreateStorageDiskResponse.md rename to docs/docs/CreateStorageDiskResponse.md diff --git a/docs/CreateVMRequestNIC.md b/docs/docs/CreateVMRequestNIC.md similarity index 100% rename from docs/CreateVMRequestNIC.md rename to docs/docs/CreateVMRequestNIC.md diff --git a/docs/CreateVMResponse.md b/docs/docs/CreateVMResponse.md similarity index 100% rename from docs/CreateVMResponse.md rename to docs/docs/CreateVMResponse.md diff --git a/docs/docs/DataCenter.md b/docs/docs/DataCenter.md new file mode 100644 index 0000000..541fd1f --- /dev/null +++ b/docs/docs/DataCenter.md @@ -0,0 +1,15 @@ +# DataCenter + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**create_by** | **str** | | [optional] +**lng_lat** | [**Point**](Point.md) | | [optional] +**one_frontend_id** | **str** | | +**region_id** | **str** | | [optional] +**renewable_energy** | **bool** | | [optional] +**supplier_name** | **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/DataCenterCategory.md b/docs/docs/DataCenterCategory.md similarity index 100% rename from docs/DataCenterCategory.md rename to docs/docs/DataCenterCategory.md diff --git a/docs/docs/DataCenterRevenueResource.md b/docs/docs/DataCenterRevenueResource.md new file mode 100644 index 0000000..1708aaf --- /dev/null +++ b/docs/docs/DataCenterRevenueResource.md @@ -0,0 +1,14 @@ +# DataCenterRevenueResource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quantity** | [**Decimal**](Decimal.md) | | +**resource_id** | **str** | | +**resource_type** | **str** | | +**revenue_usd** | [**Decimal**](Decimal.md) | | +**unit** | **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/docs/DataCenterTimeRevenue.md b/docs/docs/DataCenterTimeRevenue.md new file mode 100644 index 0000000..a4e4247 --- /dev/null +++ b/docs/docs/DataCenterTimeRevenue.md @@ -0,0 +1,11 @@ +# DataCenterTimeRevenue + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**revenue_usd** | [**Decimal**](Decimal.md) | | +**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/docs/DataCentersApi.md b/docs/docs/DataCentersApi.md new file mode 100644 index 0000000..73eee4e --- /dev/null +++ b/docs/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** +> DataCenter 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.DataCenter() # DataCenter | + +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** | [**DataCenter**](DataCenter.md)| | + +### Return type + +[**DataCenter**](DataCenter.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** +> DataCenter 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 + +[**DataCenter**](DataCenter.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** +> DataCenter update_data_center(data_center_id, data_center) + +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 | +data_center = src.cudo_compute.DataCenter() # DataCenter | + +try: + # Update data center + api_response = api_instance.update_data_center(data_center_id, data_center) + 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**| | + **data_center** | [**DataCenter**](DataCenter.md)| | + +### Return type + +[**DataCenter**](DataCenter.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/docs/Decimal.md similarity index 100% rename from docs/Decimal.md rename to docs/docs/Decimal.md diff --git a/docs/DeleteDiskSnapshotResponse.md b/docs/docs/DeleteDiskSnapshotResponse.md similarity index 100% rename from docs/DeleteDiskSnapshotResponse.md rename to docs/docs/DeleteDiskSnapshotResponse.md diff --git a/docs/DeleteNetworkResponse.md b/docs/docs/DeleteNetworkResponse.md similarity index 100% rename from docs/DeleteNetworkResponse.md rename to docs/docs/DeleteNetworkResponse.md diff --git a/docs/DeleteObjectStorageKeyResponse.md b/docs/docs/DeleteObjectStorageKeyResponse.md similarity index 100% rename from docs/DeleteObjectStorageKeyResponse.md rename to docs/docs/DeleteObjectStorageKeyResponse.md diff --git a/docs/DeleteObjectStorageUserResponse.md b/docs/docs/DeleteObjectStorageUserResponse.md similarity index 100% rename from docs/DeleteObjectStorageUserResponse.md rename to docs/docs/DeleteObjectStorageUserResponse.md diff --git a/docs/DeletePrivateVMImageResponse.md b/docs/docs/DeletePrivateVMImageResponse.md similarity index 100% rename from docs/DeletePrivateVMImageResponse.md rename to docs/docs/DeletePrivateVMImageResponse.md diff --git a/docs/DeleteSecurityGroupResponse.md b/docs/docs/DeleteSecurityGroupResponse.md similarity index 100% rename from docs/DeleteSecurityGroupResponse.md rename to docs/docs/DeleteSecurityGroupResponse.md diff --git a/docs/DeleteStorageDiskResponse.md b/docs/docs/DeleteStorageDiskResponse.md similarity index 100% rename from docs/DeleteStorageDiskResponse.md rename to docs/docs/DeleteStorageDiskResponse.md diff --git a/docs/docs/DetachSecurityGroupResponse.md b/docs/docs/DetachSecurityGroupResponse.md new file mode 100644 index 0000000..b0805db --- /dev/null +++ b/docs/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/docs/DetachStorageDiskResponse.md similarity index 100% rename from docs/DetachStorageDiskResponse.md rename to docs/docs/DetachStorageDiskResponse.md diff --git a/docs/Disk.md b/docs/docs/Disk.md similarity index 100% rename from docs/Disk.md rename to docs/docs/Disk.md diff --git a/docs/DiskState.md b/docs/docs/DiskState.md similarity index 100% rename from docs/DiskState.md rename to docs/docs/DiskState.md diff --git a/docs/DiskStorageClass.md b/docs/docs/DiskStorageClass.md similarity index 100% rename from docs/DiskStorageClass.md rename to docs/docs/DiskStorageClass.md diff --git a/docs/DiskStoragePriceHr.md b/docs/docs/DiskStoragePriceHr.md similarity index 100% rename from docs/DiskStoragePriceHr.md rename to docs/docs/DiskStoragePriceHr.md diff --git a/docs/DiskType.md b/docs/docs/DiskType.md similarity index 100% rename from docs/DiskType.md rename to docs/docs/DiskType.md diff --git a/docs/DisksApi.md b/docs/docs/DisksApi.md similarity index 99% rename from docs/DisksApi.md rename to docs/docs/DisksApi.md index 71f32ba..5e3abc1 100644 --- a/docs/DisksApi.md +++ b/docs/docs/DisksApi.md @@ -83,7 +83,7 @@ from pprint import pprint api_instance = src.cudo_compute.DisksApi() project_id = 'project_id_example' # str | id = 'id_example' # str | -body = src.cudo_compute.Body6() # Body6 | +body = src.cudo_compute.Body7() # Body7 | try: # Create Disk Snapshot @@ -99,7 +99,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | **id** | **str**| | - **body** | [**Body6**](Body6.md)| | + **body** | [**Body7**](Body7.md)| | ### Return type @@ -132,7 +132,7 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.DisksApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body5() # Body5 | +body = src.cudo_compute.Body6() # Body6 | try: # Create storage disk @@ -147,7 +147,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body5**](Body5.md)| | + **body** | [**Body6**](Body6.md)| | ### Return type diff --git a/docs/GenerateApiKeyRequest.md b/docs/docs/GenerateApiKeyRequest.md similarity index 100% rename from docs/GenerateApiKeyRequest.md rename to docs/docs/GenerateApiKeyRequest.md diff --git a/docs/docs/GetBillingAccountDetailsResponse.md b/docs/docs/GetBillingAccountDetailsResponse.md new file mode 100644 index 0000000..8b111f2 --- /dev/null +++ b/docs/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/docs/GetBillingAccountSpendDetailsResponse.md b/docs/docs/GetBillingAccountSpendDetailsResponse.md new file mode 100644 index 0000000..afaee11 --- /dev/null +++ b/docs/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/docs/GetBillingAccountStripeInvoicesResponse.md b/docs/docs/GetBillingAccountStripeInvoicesResponse.md new file mode 100644 index 0000000..479497e --- /dev/null +++ b/docs/docs/GetBillingAccountStripeInvoicesResponse.md @@ -0,0 +1,11 @@ +# GetBillingAccountStripeInvoicesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_more** | **bool** | | +**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/docs/GetDataCenterLiveUtilizationResponse.md b/docs/docs/GetDataCenterLiveUtilizationResponse.md new file mode 100644 index 0000000..dcd578c --- /dev/null +++ b/docs/docs/GetDataCenterLiveUtilizationResponse.md @@ -0,0 +1,22 @@ +# GetDataCenterLiveUtilizationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu_utilization** | **float** | | +**gpu_free** | **int** | | +**gpu_total** | **int** | | +**gpu_used** | **int** | | +**gpu_utilization** | **float** | | +**memory_gib_free** | **int** | | +**memory_gib_total** | **int** | | +**memory_gib_used** | **int** | | +**memory_utilization** | **float** | | +**utilization** | **float** | | +**vcpu_free** | **int** | | +**vcpu_total** | **int** | | +**vcpu_used** | **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/docs/GetDataCenterRevenueByResourceResponse.md b/docs/docs/GetDataCenterRevenueByResourceResponse.md new file mode 100644 index 0000000..4f49050 --- /dev/null +++ b/docs/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/docs/GetDataCenterRevenueTimeSeriesResponse.md b/docs/docs/GetDataCenterRevenueTimeSeriesResponse.md new file mode 100644 index 0000000..4c8d7d0 --- /dev/null +++ b/docs/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/docs/GetDiskResponse.md similarity index 100% rename from docs/GetDiskResponse.md rename to docs/docs/GetDiskResponse.md diff --git a/docs/docs/GetMachineTypeLiveUtilizationResponse.md b/docs/docs/GetMachineTypeLiveUtilizationResponse.md new file mode 100644 index 0000000..c9a5c3a --- /dev/null +++ b/docs/docs/GetMachineTypeLiveUtilizationResponse.md @@ -0,0 +1,22 @@ +# GetMachineTypeLiveUtilizationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu_utilization** | **float** | | +**gpu_free** | **int** | | +**gpu_total** | **int** | | +**gpu_used** | **int** | | +**gpu_utilization** | **float** | | +**memory_gib_free** | **int** | | +**memory_gib_total** | **int** | | +**memory_gib_used** | **int** | | +**memory_utilization** | **float** | | +**utilization** | **float** | | +**vcpu_free** | **int** | | +**vcpu_total** | **int** | | +**vcpu_used** | **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/docs/GetMachineTypeResponse.md b/docs/docs/GetMachineTypeResponse.md new file mode 100644 index 0000000..75de946 --- /dev/null +++ b/docs/docs/GetMachineTypeResponse.md @@ -0,0 +1,27 @@ +# GetMachineTypeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count_clusters** | **int** | | +**count_hosts** | **int** | | +**count_hosts_active** | **int** | | +**count_hosts_inactive** | **int** | | +**cpu_models** | **list[str]** | | +**data_center_id** | **str** | | +**gpu_models** | **list[str]** | | +**machine_type** | **str** | | +**max_gpu_price_hr** | [**Decimal**](Decimal.md) | | +**max_memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**max_vcpu_per_gpu** | **float** | | +**max_vcpu_per_memory_gib** | **float** | | +**max_vcpu_price_hr** | [**Decimal**](Decimal.md) | | +**min_gpu_price_hr** | [**Decimal**](Decimal.md) | | +**min_memory_gib_price_hr** | [**Decimal**](Decimal.md) | | +**min_vcpu_per_gpu** | **float** | | +**min_vcpu_per_memory_gib** | **float** | | +**min_vcpu_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/GetNetworkResponse.md b/docs/docs/GetNetworkResponse.md similarity index 100% rename from docs/GetNetworkResponse.md rename to docs/docs/GetNetworkResponse.md diff --git a/docs/GetObjectStorageSessionKeyResponse.md b/docs/docs/GetObjectStorageSessionKeyResponse.md similarity index 100% rename from docs/GetObjectStorageSessionKeyResponse.md rename to docs/docs/GetObjectStorageSessionKeyResponse.md diff --git a/docs/GetPrivateVMImageResponse.md b/docs/docs/GetPrivateVMImageResponse.md similarity index 100% rename from docs/GetPrivateVMImageResponse.md rename to docs/docs/GetPrivateVMImageResponse.md diff --git a/docs/GetSecurityGroupResponse.md b/docs/docs/GetSecurityGroupResponse.md similarity index 100% rename from docs/GetSecurityGroupResponse.md rename to docs/docs/GetSecurityGroupResponse.md diff --git a/docs/GetVMResponse.md b/docs/docs/GetVMResponse.md similarity index 100% rename from docs/GetVMResponse.md rename to docs/docs/GetVMResponse.md diff --git a/docs/GpuModelCategory.md b/docs/docs/GpuModelCategory.md similarity index 100% rename from docs/GpuModelCategory.md rename to docs/docs/GpuModelCategory.md diff --git a/docs/docs/Host.md b/docs/docs/Host.md new file mode 100644 index 0000000..f775392 --- /dev/null +++ b/docs/docs/Host.md @@ -0,0 +1,24 @@ +# Host + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu_model** | **str** | | +**create_time** | **datetime** | | +**gpu_free** | **int** | | +**gpu_model** | **str** | | +**gpu_used** | **int** | | +**machine_type** | **str** | | +**memory_gib_free** | **int** | | +**memory_gib_used** | **int** | | +**name** | **str** | | +**online** | **bool** | | +**update_time** | **datetime** | | +**vcpu_free** | **int** | | +**vcpu_per_cpu_thread** | **int** | | +**vcpu_used** | **int** | | +**vm_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/HostConfigCategory.md b/docs/docs/HostConfigCategory.md similarity index 100% rename from docs/HostConfigCategory.md rename to docs/docs/HostConfigCategory.md diff --git a/docs/IdentityVerificationSession.md b/docs/docs/IdentityVerificationSession.md similarity index 100% rename from docs/IdentityVerificationSession.md rename to docs/docs/IdentityVerificationSession.md diff --git a/docs/Image.md b/docs/docs/Image.md similarity index 100% rename from docs/Image.md rename to docs/docs/Image.md diff --git a/docs/docs/Interval.md b/docs/docs/Interval.md new file mode 100644 index 0000000..6011f51 --- /dev/null +++ b/docs/docs/Interval.md @@ -0,0 +1,9 @@ +# Interval + +## 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/docs/Invoice.md b/docs/docs/Invoice.md new file mode 100644 index 0000000..db96a5d --- /dev/null +++ b/docs/docs/Invoice.md @@ -0,0 +1,25 @@ +# Invoice + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount_due** | **str** | | [optional] +**amount_paid** | **str** | | [optional] +**amount_remaining** | **str** | | [optional] +**auto_advance** | **bool** | | [optional] +**billing_reason** | **str** | | [optional] +**created** | **str** | | [optional] +**currency** | **str** | | [optional] +**description** | **str** | | [optional] +**due_date** | **str** | | [optional] +**hosted_invoice_url** | **str** | | [optional] +**id** | **str** | | [optional] +**number** | **str** | | [optional] +**paid_date** | **str** | | [optional] +**period_end** | **str** | | [optional] +**period_start** | **str** | | [optional] +**status** | **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/ListApiKeysResponse.md b/docs/docs/ListApiKeysResponse.md similarity index 100% rename from docs/ListApiKeysResponse.md rename to docs/docs/ListApiKeysResponse.md diff --git a/docs/docs/ListBillingAccountsResponse.md b/docs/docs/ListBillingAccountsResponse.md new file mode 100644 index 0000000..674a236 --- /dev/null +++ b/docs/docs/ListBillingAccountsResponse.md @@ -0,0 +1,12 @@ +# ListBillingAccountsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_accounts** | [**list[BillingAccount]**](BillingAccount.md) | | +**page_size** | **int** | | +**page_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/docs/ListClustersResponse.md b/docs/docs/ListClustersResponse.md new file mode 100644 index 0000000..c03b5ff --- /dev/null +++ b/docs/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/docs/ListDataCentersResponse.md b/docs/docs/ListDataCentersResponse.md new file mode 100644 index 0000000..b768de4 --- /dev/null +++ b/docs/docs/ListDataCentersResponse.md @@ -0,0 +1,12 @@ +# ListDataCentersResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data_centers** | [**list[DataCenter]**](DataCenter.md) | | +**page_size** | **int** | | +**page_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/ListDiskSnapshotsResponse.md b/docs/docs/ListDiskSnapshotsResponse.md similarity index 100% rename from docs/ListDiskSnapshotsResponse.md rename to docs/docs/ListDiskSnapshotsResponse.md diff --git a/docs/ListDisksResponse.md b/docs/docs/ListDisksResponse.md similarity index 100% rename from docs/ListDisksResponse.md rename to docs/docs/ListDisksResponse.md diff --git a/docs/docs/ListHostsResponse.md b/docs/docs/ListHostsResponse.md new file mode 100644 index 0000000..a932f62 --- /dev/null +++ b/docs/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/docs/ListMachineTypesResponse.md b/docs/docs/ListMachineTypesResponse.md new file mode 100644 index 0000000..d0daaf7 --- /dev/null +++ b/docs/docs/ListMachineTypesResponse.md @@ -0,0 +1,10 @@ +# ListMachineTypesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**machine_types** | [**list[MachineType]**](MachineType.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/docs/ListNetworksResponse.md similarity index 100% rename from docs/ListNetworksResponse.md rename to docs/docs/ListNetworksResponse.md diff --git a/docs/ListObjectStorageBucketsResponse.md b/docs/docs/ListObjectStorageBucketsResponse.md similarity index 100% rename from docs/ListObjectStorageBucketsResponse.md rename to docs/docs/ListObjectStorageBucketsResponse.md diff --git a/docs/ListObjectStorageKeysResponse.md b/docs/docs/ListObjectStorageKeysResponse.md similarity index 100% rename from docs/ListObjectStorageKeysResponse.md rename to docs/docs/ListObjectStorageKeysResponse.md diff --git a/docs/ListObjectStorageUsersResponse.md b/docs/docs/ListObjectStorageUsersResponse.md similarity index 100% rename from docs/ListObjectStorageUsersResponse.md rename to docs/docs/ListObjectStorageUsersResponse.md diff --git a/docs/docs/ListOutstandingStripeInvoicesResponse.md b/docs/docs/ListOutstandingStripeInvoicesResponse.md new file mode 100644 index 0000000..e65aa26 --- /dev/null +++ b/docs/docs/ListOutstandingStripeInvoicesResponse.md @@ -0,0 +1,10 @@ +# ListOutstandingStripeInvoicesResponse + +## 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/docs/ListPrivateVMImagesResponse.md similarity index 100% rename from docs/ListPrivateVMImagesResponse.md rename to docs/docs/ListPrivateVMImagesResponse.md diff --git a/docs/ListPrivateVMImagesResponsePrivateImage.md b/docs/docs/ListPrivateVMImagesResponsePrivateImage.md similarity index 100% rename from docs/ListPrivateVMImagesResponsePrivateImage.md rename to docs/docs/ListPrivateVMImagesResponsePrivateImage.md diff --git a/docs/ListProjectSshKeysResponse.md b/docs/docs/ListProjectSshKeysResponse.md similarity index 100% rename from docs/ListProjectSshKeysResponse.md rename to docs/docs/ListProjectSshKeysResponse.md diff --git a/docs/ListProjectsResponse.md b/docs/docs/ListProjectsResponse.md similarity index 100% rename from docs/ListProjectsResponse.md rename to docs/docs/ListProjectsResponse.md diff --git a/docs/ListPublicVMImagesResponse.md b/docs/docs/ListPublicVMImagesResponse.md similarity index 100% rename from docs/ListPublicVMImagesResponse.md rename to docs/docs/ListPublicVMImagesResponse.md diff --git a/docs/ListRegionsResponse.md b/docs/docs/ListRegionsResponse.md similarity index 100% rename from docs/ListRegionsResponse.md rename to docs/docs/ListRegionsResponse.md diff --git a/docs/ListSecurityGroupsResponse.md b/docs/docs/ListSecurityGroupsResponse.md similarity index 100% rename from docs/ListSecurityGroupsResponse.md rename to docs/docs/ListSecurityGroupsResponse.md diff --git a/docs/ListSshKeysResponse.md b/docs/docs/ListSshKeysResponse.md similarity index 100% rename from docs/ListSshKeysResponse.md rename to docs/docs/ListSshKeysResponse.md diff --git a/docs/ListUserPermissionsResponse.md b/docs/docs/ListUserPermissionsResponse.md similarity index 100% rename from docs/ListUserPermissionsResponse.md rename to docs/docs/ListUserPermissionsResponse.md diff --git a/docs/ListVMDataCentersResponse.md b/docs/docs/ListVMDataCentersResponse.md similarity index 100% rename from docs/ListVMDataCentersResponse.md rename to docs/docs/ListVMDataCentersResponse.md diff --git a/docs/ListVMDisksResponse.md b/docs/docs/ListVMDisksResponse.md similarity index 100% rename from docs/ListVMDisksResponse.md rename to docs/docs/ListVMDisksResponse.md diff --git a/docs/ListVMMachineTypesRequest.md b/docs/docs/ListVMMachineTypesRequest.md similarity index 100% rename from docs/ListVMMachineTypesRequest.md rename to docs/docs/ListVMMachineTypesRequest.md diff --git a/docs/ListVMMachineTypesResponse.md b/docs/docs/ListVMMachineTypesResponse.md similarity index 100% rename from docs/ListVMMachineTypesResponse.md rename to docs/docs/ListVMMachineTypesResponse.md diff --git a/docs/ListVMsResponse.md b/docs/docs/ListVMsResponse.md similarity index 100% rename from docs/ListVMsResponse.md rename to docs/docs/ListVMsResponse.md diff --git a/docs/docs/MachineType.md b/docs/docs/MachineType.md new file mode 100644 index 0000000..c03eaa7 --- /dev/null +++ b/docs/docs/MachineType.md @@ -0,0 +1,14 @@ +# MachineType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count_clusters** | **int** | | +**count_hosts** | **int** | | +**count_hosts_active** | **int** | | +**count_hosts_inactive** | **int** | | +**machine_type** | **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/docs/MachineTypesApi.md b/docs/docs/MachineTypesApi.md new file mode 100644 index 0000000..cb650fd --- /dev/null +++ b/docs/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 +[**get_machine_type_live_utilization**](MachineTypesApi.md#get_machine_type_live_utilization) | **GET** /v1/data-centers/{dataCenterId}/machine-types/{machineType}/live-utilization | Get +[**list_machine_types**](MachineTypesApi.md#list_machine_types) | **GET** /v1/data-centers/{dataCenterId}/machine-types | Get + + +# **get_machine_type** +> GetMachineTypeResponse get_machine_type(data_center_id, machine_type) + +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.MachineTypesApi() +data_center_id = 'data_center_id_example' # str | +machine_type = 'machine_type_example' # str | + +try: + # Get + 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 + +### 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 + 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) + +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.MachineTypesApi() +data_center_id = 'data_center_id_example' # str | + +try: + # Get + 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/docs/MonitorVMResponse.md similarity index 100% rename from docs/MonitorVMResponse.md rename to docs/docs/MonitorVMResponse.md diff --git a/docs/Network.md b/docs/docs/Network.md similarity index 90% rename from docs/Network.md rename to docs/docs/Network.md index 0ae7cb1..0af4454 100644 --- a/docs/Network.md +++ b/docs/docs/Network.md @@ -11,8 +11,7 @@ Name | Type | Description | Notes **init_state** | **str** | | [optional] **internal_ip_address** | **str** | | [optional] **ip_range** | **str** | | [optional] -**one_lcm_state** | **str** | | [optional] -**one_state** | **str** | | [optional] +**network_state** | [**NetworkState**](NetworkState.md) | | [optional] **price_hr** | [**Decimal**](Decimal.md) | | [optional] **short_state** | **str** | | [optional] **size** | [**VRouterSize**](VRouterSize.md) | | [optional] diff --git a/docs/NetworkPriceHr.md b/docs/docs/NetworkPriceHr.md similarity index 100% rename from docs/NetworkPriceHr.md rename to docs/docs/NetworkPriceHr.md diff --git a/docs/docs/NetworkState.md b/docs/docs/NetworkState.md new file mode 100644 index 0000000..682981e --- /dev/null +++ b/docs/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/docs/NetworksApi.md similarity index 99% rename from docs/NetworksApi.md rename to docs/docs/NetworksApi.md index e027133..1d66ca5 100644 --- a/docs/NetworksApi.md +++ b/docs/docs/NetworksApi.md @@ -33,7 +33,7 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.NetworksApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body7() # Body7 | +body = src.cudo_compute.Body8() # Body8 | try: # Create network @@ -48,7 +48,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body7**](Body7.md)| | + **body** | [**Body8**](Body8.md)| | ### Return type diff --git a/docs/ObjectStorageApi.md b/docs/docs/ObjectStorageApi.md similarity index 99% rename from docs/ObjectStorageApi.md rename to docs/docs/ObjectStorageApi.md index 705743e..8c1aa61 100644 --- a/docs/ObjectStorageApi.md +++ b/docs/docs/ObjectStorageApi.md @@ -32,7 +32,7 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.ObjectStorageApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body8() # Body8 | +body = src.cudo_compute.Body9() # Body9 | try: # Allow the use of S3 compatible storage in a project @@ -47,7 +47,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body8**](Body8.md)| | + **body** | [**Body9**](Body9.md)| | ### Return type @@ -80,7 +80,7 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.ObjectStorageApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body9() # Body9 | +body = src.cudo_compute.Body10() # Body10 | try: # Create user that stores keys for storage buckets @@ -95,7 +95,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body9**](Body9.md)| | + **body** | [**Body10**](Body10.md)| | ### Return type diff --git a/docs/ObjectStorageBucket.md b/docs/docs/ObjectStorageBucket.md similarity index 100% rename from docs/ObjectStorageBucket.md rename to docs/docs/ObjectStorageBucket.md diff --git a/docs/ObjectStorageKey.md b/docs/docs/ObjectStorageKey.md similarity index 100% rename from docs/ObjectStorageKey.md rename to docs/docs/ObjectStorageKey.md diff --git a/docs/ObjectStorageUser.md b/docs/docs/ObjectStorageUser.md similarity index 100% rename from docs/ObjectStorageUser.md rename to docs/docs/ObjectStorageUser.md diff --git a/docs/docs/PaymentMethodCard.md b/docs/docs/PaymentMethodCard.md new file mode 100644 index 0000000..ad21ca7 --- /dev/null +++ b/docs/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/docs/PaymentMethodPaypal.md b/docs/docs/PaymentMethodPaypal.md new file mode 100644 index 0000000..f3b9c37 --- /dev/null +++ b/docs/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/PermissionsApi.md b/docs/docs/PermissionsApi.md similarity index 98% rename from docs/PermissionsApi.md rename to docs/docs/PermissionsApi.md index 3ef7907..ead240e 100644 --- a/docs/PermissionsApi.md +++ b/docs/docs/PermissionsApi.md @@ -29,7 +29,7 @@ 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 | -body = src.cudo_compute.Body() # Body | +body = src.cudo_compute.Body1() # Body1 | try: # Add billing account user @@ -44,7 +44,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **billing_account_id** | **str**| | - **body** | [**Body**](Body.md)| | + **body** | [**Body1**](Body1.md)| | ### Return type @@ -77,7 +77,7 @@ 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 | -body = src.cudo_compute.Body2() # Body2 | +body = src.cudo_compute.Body3() # Body3 | try: # Add data center user @@ -92,7 +92,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data_center_id** | **str**| | - **body** | [**Body2**](Body2.md)| | + **body** | [**Body3**](Body3.md)| | ### Return type @@ -125,7 +125,7 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body4() # Body4 | +body = src.cudo_compute.Body5() # Body5 | try: # Add project user @@ -140,7 +140,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body4**](Body4.md)| | + **body** | [**Body5**](Body5.md)| | ### Return type @@ -223,7 +223,7 @@ 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 | -body = src.cudo_compute.Body1() # Body1 | +body = src.cudo_compute.Body2() # Body2 | try: # Remove billing account user @@ -238,7 +238,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **billing_account_id** | **str**| | - **body** | [**Body1**](Body1.md)| | + **body** | [**Body2**](Body2.md)| | ### Return type @@ -271,7 +271,7 @@ 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 | -body = src.cudo_compute.Body3() # Body3 | +body = src.cudo_compute.Body4() # Body4 | try: # Remove data center user @@ -286,7 +286,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data_center_id** | **str**| | - **body** | [**Body3**](Body3.md)| | + **body** | [**Body4**](Body4.md)| | ### Return type @@ -319,7 +319,7 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body10() # Body10 | +body = src.cudo_compute.Body11() # Body11 | try: # Remove project user @@ -334,7 +334,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body10**](Body10.md)| | + **body** | [**Body11**](Body11.md)| | ### Return type diff --git a/docs/docs/Point.md b/docs/docs/Point.md new file mode 100644 index 0000000..ba31394 --- /dev/null +++ b/docs/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/Profile.md b/docs/docs/Profile.md similarity index 100% rename from docs/Profile.md rename to docs/docs/Profile.md diff --git a/docs/Project.md b/docs/docs/Project.md similarity index 100% rename from docs/Project.md rename to docs/docs/Project.md diff --git a/docs/ProjectsApi.md b/docs/docs/ProjectsApi.md similarity index 100% rename from docs/ProjectsApi.md rename to docs/docs/ProjectsApi.md diff --git a/docs/Protocol.md b/docs/docs/Protocol.md similarity index 100% rename from docs/Protocol.md rename to docs/docs/Protocol.md diff --git a/docs/RebootVMResponse.md b/docs/docs/RebootVMResponse.md similarity index 100% rename from docs/RebootVMResponse.md rename to docs/docs/RebootVMResponse.md diff --git a/docs/Region.md b/docs/docs/Region.md similarity index 100% rename from docs/Region.md rename to docs/docs/Region.md diff --git a/docs/docs/RemoveBillingAccountPaymentMethodResponse.md b/docs/docs/RemoveBillingAccountPaymentMethodResponse.md new file mode 100644 index 0000000..d8f4c6f --- /dev/null +++ b/docs/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/ResizeVMDiskResponse.md b/docs/docs/ResizeVMDiskResponse.md similarity index 100% rename from docs/ResizeVMDiskResponse.md rename to docs/docs/ResizeVMDiskResponse.md diff --git a/docs/ResizeVMResponse.md b/docs/docs/ResizeVMResponse.md similarity index 100% rename from docs/ResizeVMResponse.md rename to docs/docs/ResizeVMResponse.md diff --git a/docs/RevertDiskResponse.md b/docs/docs/RevertDiskResponse.md similarity index 100% rename from docs/RevertDiskResponse.md rename to docs/docs/RevertDiskResponse.md diff --git a/docs/Role.md b/docs/docs/Role.md similarity index 100% rename from docs/Role.md rename to docs/docs/Role.md diff --git a/docs/Rule.md b/docs/docs/Rule.md similarity index 100% rename from docs/Rule.md rename to docs/docs/Rule.md diff --git a/docs/RuleType.md b/docs/docs/RuleType.md similarity index 100% rename from docs/RuleType.md rename to docs/docs/RuleType.md diff --git a/docs/SSHKeysApi.md b/docs/docs/SSHKeysApi.md similarity index 100% rename from docs/SSHKeysApi.md rename to docs/docs/SSHKeysApi.md diff --git a/docs/SearchApi.md b/docs/docs/SearchApi.md similarity index 100% rename from docs/SearchApi.md rename to docs/docs/SearchApi.md diff --git a/docs/SecurityGroup.md b/docs/docs/SecurityGroup.md similarity index 100% rename from docs/SecurityGroup.md rename to docs/docs/SecurityGroup.md diff --git a/docs/SecurityGroup1.md b/docs/docs/SecurityGroup1.md similarity index 100% rename from docs/SecurityGroup1.md rename to docs/docs/SecurityGroup1.md diff --git a/docs/SecurityGroupRule.md b/docs/docs/SecurityGroupRule.md similarity index 100% rename from docs/SecurityGroupRule.md rename to docs/docs/SecurityGroupRule.md diff --git a/docs/docs/SetBillingAccountDefaultPaymentMethodResponse.md b/docs/docs/SetBillingAccountDefaultPaymentMethodResponse.md new file mode 100644 index 0000000..00aa020 --- /dev/null +++ b/docs/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/docs/Snapshot.md similarity index 100% rename from docs/Snapshot.md rename to docs/docs/Snapshot.md diff --git a/docs/SshKey.md b/docs/docs/SshKey.md similarity index 100% rename from docs/SshKey.md rename to docs/docs/SshKey.md diff --git a/docs/SshKeySource.md b/docs/docs/SshKeySource.md similarity index 100% rename from docs/SshKeySource.md rename to docs/docs/SshKeySource.md diff --git a/docs/StartNetworkResponse.md b/docs/docs/StartNetworkResponse.md similarity index 100% rename from docs/StartNetworkResponse.md rename to docs/docs/StartNetworkResponse.md diff --git a/docs/StartVMResponse.md b/docs/docs/StartVMResponse.md similarity index 100% rename from docs/StartVMResponse.md rename to docs/docs/StartVMResponse.md diff --git a/docs/Status.md b/docs/docs/Status.md similarity index 100% rename from docs/Status.md rename to docs/docs/Status.md diff --git a/docs/StopNetworkResponse.md b/docs/docs/StopNetworkResponse.md similarity index 100% rename from docs/StopNetworkResponse.md rename to docs/docs/StopNetworkResponse.md diff --git a/docs/StopVMResponse.md b/docs/docs/StopVMResponse.md similarity index 100% rename from docs/StopVMResponse.md rename to docs/docs/StopVMResponse.md diff --git a/docs/docs/StripeCustomer.md b/docs/docs/StripeCustomer.md new file mode 100644 index 0000000..22bd1d4 --- /dev/null +++ b/docs/docs/StripeCustomer.md @@ -0,0 +1,13 @@ +# StripeCustomer + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**balance** | [**Decimal**](Decimal.md) | | [optional] +**email** | **str** | | [optional] +**id** | **str** | | [optional] +**name** | **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/docs/TaxId.md b/docs/docs/TaxId.md new file mode 100644 index 0000000..1855e9e --- /dev/null +++ b/docs/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/docs/TerminateVMResponse.md similarity index 100% rename from docs/TerminateVMResponse.md rename to docs/docs/TerminateVMResponse.md diff --git a/docs/docs/Unit.md b/docs/docs/Unit.md new file mode 100644 index 0000000..3de99a1 --- /dev/null +++ b/docs/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/UpdatePrivateVMImageResponse.md b/docs/docs/UpdatePrivateVMImageResponse.md similarity index 100% rename from docs/UpdatePrivateVMImageResponse.md rename to docs/docs/UpdatePrivateVMImageResponse.md diff --git a/docs/UpdateSecurityGroupResponse.md b/docs/docs/UpdateSecurityGroupResponse.md similarity index 100% rename from docs/UpdateSecurityGroupResponse.md rename to docs/docs/UpdateSecurityGroupResponse.md diff --git a/docs/docs/UpdateVMMetadataResponse.md b/docs/docs/UpdateVMMetadataResponse.md new file mode 100644 index 0000000..c7bde2f --- /dev/null +++ b/docs/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/UserApi.md b/docs/docs/UserApi.md similarity index 100% rename from docs/UserApi.md rename to docs/docs/UserApi.md diff --git a/docs/UserPermission.md b/docs/docs/UserPermission.md similarity index 100% rename from docs/UserPermission.md rename to docs/docs/UserPermission.md diff --git a/docs/V1PrivateImage.md b/docs/docs/V1PrivateImage.md similarity index 100% rename from docs/V1PrivateImage.md rename to docs/docs/V1PrivateImage.md diff --git a/docs/docs/V1billingaccountsbillingAccountIdBillingAccount.md b/docs/docs/V1billingaccountsbillingAccountIdBillingAccount.md new file mode 100644 index 0000000..9a8765d --- /dev/null +++ b/docs/docs/V1billingaccountsbillingAccountIdBillingAccount.md @@ -0,0 +1,19 @@ +# V1billingaccountsbillingAccountIdBillingAccount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**billing_threshold** | [**Decimal**](Decimal.md) | | [optional] +**create_by** | **str** | | [optional] +**create_time** | **datetime** | | [optional] +**demand_enabled** | **bool** | | [optional] +**display_name** | **str** | | [optional] +**invoice_time** | **datetime** | | [optional] +**monthly_spend** | **str** | | [optional] +**stripe_ref** | **str** | | [optional] +**supply_enabled** | **bool** | | [optional] +**tax_ids** | [**list[TaxId]**](TaxId.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/VM.md b/docs/docs/VM.md similarity index 96% rename from docs/VM.md rename to docs/docs/VM.md index f80f09a..b6306dc 100644 --- a/docs/VM.md +++ b/docs/docs/VM.md @@ -36,6 +36,7 @@ Name | Type | Description | Notes **short_state** | **str** | | [optional] **storage_disks** | [**list[Disk]**](Disk.md) | | [optional] **vcpus** | **int** | | [optional] +**vm_state** | [**VmState**](VmState.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/VMDataCenter.md b/docs/docs/VMDataCenter.md similarity index 100% rename from docs/VMDataCenter.md rename to docs/docs/VMDataCenter.md diff --git a/docs/VMDataCenterStorageClass.md b/docs/docs/VMDataCenterStorageClass.md similarity index 100% rename from docs/VMDataCenterStorageClass.md rename to docs/docs/VMDataCenterStorageClass.md diff --git a/docs/VMMonitoringItem.md b/docs/docs/VMMonitoringItem.md similarity index 100% rename from docs/VMMonitoringItem.md rename to docs/docs/VMMonitoringItem.md diff --git a/docs/VMNIC.md b/docs/docs/VMNIC.md similarity index 100% rename from docs/VMNIC.md rename to docs/docs/VMNIC.md diff --git a/docs/VRouterSize.md b/docs/docs/VRouterSize.md similarity index 100% rename from docs/VRouterSize.md rename to docs/docs/VRouterSize.md diff --git a/docs/VirtualMachinesApi.md b/docs/docs/VirtualMachinesApi.md similarity index 84% rename from docs/VirtualMachinesApi.md rename to docs/docs/VirtualMachinesApi.md index 670fa8c..4dbcf4b 100644 --- a/docs/VirtualMachinesApi.md +++ b/docs/docs/VirtualMachinesApi.md @@ -4,11 +4,13 @@ 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 @@ -25,8 +27,59 @@ Method | HTTP request | Description [**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) @@ -191,7 +244,7 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.VirtualMachinesApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body11() # Body11 | +body = src.cudo_compute.Body12() # Body12 | try: # Create virtual machine @@ -206,7 +259,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body11**](Body11.md)| | + **body** | [**Body12**](Body12.md)| | ### Return type @@ -271,6 +324,56 @@ No authorization required [[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) @@ -1065,3 +1168,55 @@ No authorization required [[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, metadata=metadata, merge=merge) + +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 | +metadata = 'metadata_example' # str | This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18 (optional) +merge = true # bool | (optional) + +try: + # Update VM metadata + api_response = api_instance.update_vm_metadata(project_id, id, metadata=metadata, merge=merge) + 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**| | + **metadata** | **str**| This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18 | [optional] + **merge** | **bool**| | [optional] + +### 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/docs/VmState.md b/docs/docs/VmState.md new file mode 100644 index 0000000..aa063a0 --- /dev/null +++ b/docs/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/src/cudo_compute/__init__.py b/docs/src/cudo_compute/__init__.py index 55fb986..58f57c9 100644 --- a/docs/src/cudo_compute/__init__.py +++ b/docs/src/cudo_compute/__init__.py @@ -17,7 +17,10 @@ # 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 @@ -33,11 +36,18 @@ # import models into sdk package from src.cudo_compute.models.any import Any 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_setup_intent import BillingAccountSetupIntent +from src.cudo_compute.models.billing_account_spend_row import BillingAccountSpendRow from src.cudo_compute.models.body import Body from src.cudo_compute.models.body1 import Body1 from src.cudo_compute.models.body10 import Body10 from src.cudo_compute.models.body11 import Body11 +from src.cudo_compute.models.body12 import Body12 from src.cudo_compute.models.body2 import Body2 from src.cudo_compute.models.body3 import Body3 from src.cudo_compute.models.body4 import Body4 @@ -46,9 +56,12 @@ from src.cudo_compute.models.body7 import Body7 from src.cudo_compute.models.body8 import Body8 from src.cudo_compute.models.body9 import Body9 +from src.cudo_compute.models.cluster import Cluster 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_model_category import CpuModelCategory +from src.cudo_compute.models.create_billing_account_request import CreateBillingAccountRequest from src.cudo_compute.models.create_disk_snapshot_response import CreateDiskSnapshotResponse from src.cudo_compute.models.create_network_response import CreateNetworkResponse from src.cudo_compute.models.create_private_vm_image_response import CreatePrivateVMImageResponse @@ -56,7 +69,10 @@ from src.cudo_compute.models.create_storage_disk_response import CreateStorageDiskResponse 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.data_center import DataCenter from src.cudo_compute.models.data_center_category import DataCenterCategory +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 @@ -65,6 +81,7 @@ 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_state import DiskState @@ -72,23 +89,40 @@ 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_billing_account_stripe_invoices_response import GetBillingAccountStripeInvoicesResponse +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_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_security_group_response import GetSecurityGroupResponse from src.cudo_compute.models.get_vm_response import GetVMResponse from src.cudo_compute.models.gpu_model_category import GpuModelCategory +from src.cudo_compute.models.host import Host from src.cudo_compute.models.host_config_category import HostConfigCategory from src.cudo_compute.models.identity_verification_session import IdentityVerificationSession from src.cudo_compute.models.image import Image +from src.cudo_compute.models.interval import Interval +from src.cudo_compute.models.invoice import Invoice from src.cudo_compute.models.list_api_keys_response import ListApiKeysResponse +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_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_keys_response import ListObjectStorageKeysResponse from src.cudo_compute.models.list_object_storage_users_response import ListObjectStorageUsersResponse +from src.cudo_compute.models.list_outstanding_stripe_invoices_response import ListOutstandingStripeInvoicesResponse from src.cudo_compute.models.list_private_vm_images_response import ListPrivateVMImagesResponse from src.cudo_compute.models.list_private_vm_images_response_private_image import ListPrivateVMImagesResponsePrivateImage from src.cudo_compute.models.list_project_ssh_keys_response import ListProjectSshKeysResponse @@ -103,17 +137,23 @@ from src.cudo_compute.models.list_vm_machine_types_request import ListVMMachineTypesRequest from src.cudo_compute.models.list_vm_machine_types_response import ListVMMachineTypesResponse from src.cudo_compute.models.list_vms_response import ListVMsResponse +from src.cudo_compute.models.machine_type import MachineType 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_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.payment_method_card import PaymentMethodCard +from src.cudo_compute.models.payment_method_paypal import PaymentMethodPaypal +from src.cudo_compute.models.point import Point from src.cudo_compute.models.profile import Profile from src.cudo_compute.models.project import Project from src.cudo_compute.models.protocol import Protocol from src.cudo_compute.models.reboot_vm_response import RebootVMResponse from src.cudo_compute.models.region import Region +from src.cudo_compute.models.remove_billing_account_payment_method_response import RemoveBillingAccountPaymentMethodResponse 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.revert_disk_response import RevertDiskResponse @@ -123,6 +163,7 @@ 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.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 @@ -131,14 +172,20 @@ 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.tax_id import TaxId from src.cudo_compute.models.terminate_vm_response import TerminateVMResponse +from src.cudo_compute.models.unit import Unit from src.cudo_compute.models.update_private_vm_image_response import UpdatePrivateVMImageResponse from src.cudo_compute.models.update_security_group_response import UpdateSecurityGroupResponse +from src.cudo_compute.models.update_vm_metadata_response import UpdateVMMetadataResponse from src.cudo_compute.models.user_permission import UserPermission from src.cudo_compute.models.v1_private_image import V1PrivateImage +from src.cudo_compute.models.v1billingaccountsbilling_account_id_billing_account import V1billingaccountsbillingAccountIdBillingAccount 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_monitoring_item import VMMonitoringItem from src.cudo_compute.models.vmnic import VMNIC from src.cudo_compute.models.v_router_size import VRouterSize +from src.cudo_compute.models.vm_state import VmState diff --git a/docs/src/cudo_compute/api/__init__.py b/docs/src/cudo_compute/api/__init__.py index a400d6d..fcff62b 100644 --- a/docs/src/cudo_compute/api/__init__.py +++ b/docs/src/cudo_compute/api/__init__.py @@ -4,7 +4,10 @@ # 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 diff --git a/docs/src/cudo_compute/api/billing_api.py b/docs/src/cudo_compute/api/billing_api.py new file mode 100644 index 0000000..682724f --- /dev/null +++ b/docs/src/cudo_compute/api/billing_api.py @@ -0,0 +1,1339 @@ +# 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, 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateBillingAccountRequest 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(body, **kwargs) # noqa: E501 + else: + (data) = self.create_billing_account_with_http_info(body, **kwargs) # noqa: E501 + return data + + def create_billing_account_with_http_info(self, 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(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateBillingAccountRequest body: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['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 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `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 'body' in params: + body_params = params['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 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 get_billing_account_stripe_invoices(self, id, **kwargs): # noqa: E501 + """Get 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.get_billing_account_stripe_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: GetBillingAccountStripeInvoicesResponse + 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_stripe_invoices_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.get_billing_account_stripe_invoices_with_http_info(id, **kwargs) # noqa: E501 + return data + + def get_billing_account_stripe_invoices_with_http_info(self, id, **kwargs): # noqa: E501 + """Get 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.get_billing_account_stripe_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: GetBillingAccountStripeInvoicesResponse + 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 get_billing_account_stripe_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 `get_billing_account_stripe_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='GetBillingAccountStripeInvoicesResponse', # 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_stripe_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_stripe_invoices(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListOutstandingStripeInvoicesResponse + 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_stripe_invoices_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.list_outstanding_stripe_invoices_with_http_info(**kwargs) # noqa: E501 + return data + + def list_outstanding_stripe_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_stripe_invoices_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: ListOutstandingStripeInvoicesResponse + 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_stripe_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='ListOutstandingStripeInvoicesResponse', # 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, 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, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param Body 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, body, **kwargs) # noqa: E501 + else: + (data) = self.update_billing_account_with_http_info(billing_account_id, body, **kwargs) # noqa: E501 + return data + + def update_billing_account_with_http_info(self, billing_account_id, 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, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str billing_account_id: (required) + :param Body body: (required) + :return: BillingAccount + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['billing_account_id', '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 'body' is set + if self.api_client.client_side_validation and ('body' not in params or + params['body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `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 'body' in params: + body_params = params['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/src/cudo_compute/api/data_centers_api.py b/docs/src/cudo_compute/api/data_centers_api.py new file mode 100644 index 0000000..4f6ce5c --- /dev/null +++ b/docs/src/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 DataCenter data_center: (required) + :return: DataCenter + 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 DataCenter data_center: (required) + :return: DataCenter + 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='DataCenter', # 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: DataCenter + 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: DataCenter + 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='DataCenter', # 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, data_center, **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, data_center, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param DataCenter data_center: (required) + :return: DataCenter + 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, data_center, **kwargs) # noqa: E501 + else: + (data) = self.update_data_center_with_http_info(data_center_id, data_center, **kwargs) # noqa: E501 + return data + + def update_data_center_with_http_info(self, data_center_id, data_center, **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, data_center, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str data_center_id: (required) + :param DataCenter data_center: (required) + :return: DataCenter + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['data_center_id', '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 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 '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 `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 '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/{dataCenter.id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DataCenter', # 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/src/cudo_compute/api/disks_api.py b/docs/src/cudo_compute/api/disks_api.py index c005ddf..9e48bc4 100644 --- a/docs/src/cudo_compute/api/disks_api.py +++ b/docs/src/cudo_compute/api/disks_api.py @@ -153,7 +153,7 @@ def create_disk_snapshot(self, project_id, id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) :param str id: (required) - :param Body6 body: (required) + :param Body7 body: (required) :return: CreateDiskSnapshotResponse If the method is called asynchronously, returns the request thread. @@ -176,7 +176,7 @@ def create_disk_snapshot_with_http_info(self, project_id, id, body, **kwargs): :param async_req bool :param str project_id: (required) :param str id: (required) - :param Body6 body: (required) + :param Body7 body: (required) :return: CreateDiskSnapshotResponse If the method is called asynchronously, returns the request thread. @@ -265,7 +265,7 @@ def create_storage_disk(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body5 body: (required) + :param Body6 body: (required) :return: CreateStorageDiskResponse If the method is called asynchronously, returns the request thread. @@ -287,7 +287,7 @@ def create_storage_disk_with_http_info(self, project_id, body, **kwargs): # noq :param async_req bool :param str project_id: (required) - :param Body5 body: (required) + :param Body6 body: (required) :return: CreateStorageDiskResponse If the method is called asynchronously, returns the request thread. diff --git a/docs/src/cudo_compute/api/machine_types_api.py b/docs/src/cudo_compute/api/machine_types_api.py new file mode 100644 index 0000000..8f37f85 --- /dev/null +++ b/docs/src/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 # 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 # 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 # 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 # 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 + """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.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 + """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.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/src/cudo_compute/api/networks_api.py b/docs/src/cudo_compute/api/networks_api.py index fa7070d..dfaae66 100644 --- a/docs/src/cudo_compute/api/networks_api.py +++ b/docs/src/cudo_compute/api/networks_api.py @@ -43,7 +43,7 @@ def create_network(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body7 body: (required) + :param Body8 body: (required) :return: CreateNetworkResponse If the method is called asynchronously, returns the request thread. @@ -65,7 +65,7 @@ def create_network_with_http_info(self, project_id, body, **kwargs): # noqa: E5 :param async_req bool :param str project_id: (required) - :param Body7 body: (required) + :param Body8 body: (required) :return: CreateNetworkResponse If the method is called asynchronously, returns the request thread. diff --git a/docs/src/cudo_compute/api/object_storage_api.py b/docs/src/cudo_compute/api/object_storage_api.py index c4769ac..71977a1 100644 --- a/docs/src/cudo_compute/api/object_storage_api.py +++ b/docs/src/cudo_compute/api/object_storage_api.py @@ -43,7 +43,7 @@ def activate(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body8 body: (required) + :param Body9 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -65,7 +65,7 @@ def activate_with_http_info(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body8 body: (required) + :param Body9 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -148,7 +148,7 @@ def create_object_storage_user(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body9 body: (required) + :param Body10 body: (required) :return: ObjectStorageUser If the method is called asynchronously, returns the request thread. @@ -170,7 +170,7 @@ def create_object_storage_user_with_http_info(self, project_id, body, **kwargs): :param async_req bool :param str project_id: (required) - :param Body9 body: (required) + :param Body10 body: (required) :return: ObjectStorageUser If the method is called asynchronously, returns the request thread. diff --git a/docs/src/cudo_compute/api/permissions_api.py b/docs/src/cudo_compute/api/permissions_api.py index fcee8e0..19d1477 100644 --- a/docs/src/cudo_compute/api/permissions_api.py +++ b/docs/src/cudo_compute/api/permissions_api.py @@ -43,7 +43,7 @@ def add_billing_account_user_permission(self, billing_account_id, body, **kwargs :param async_req bool :param str billing_account_id: (required) - :param Body body: (required) + :param Body1 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -65,7 +65,7 @@ def add_billing_account_user_permission_with_http_info(self, billing_account_id, :param async_req bool :param str billing_account_id: (required) - :param Body body: (required) + :param Body1 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -148,7 +148,7 @@ def add_data_center_user_permission(self, data_center_id, body, **kwargs): # no :param async_req bool :param str data_center_id: (required) - :param Body2 body: (required) + :param Body3 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -170,7 +170,7 @@ def add_data_center_user_permission_with_http_info(self, data_center_id, body, * :param async_req bool :param str data_center_id: (required) - :param Body2 body: (required) + :param Body3 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -253,7 +253,7 @@ def add_project_user_permission(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body4 body: (required) + :param Body5 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -275,7 +275,7 @@ def add_project_user_permission_with_http_info(self, project_id, body, **kwargs) :param async_req bool :param str project_id: (required) - :param Body4 body: (required) + :param Body5 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -459,7 +459,7 @@ def remove_billing_account_user_permission(self, billing_account_id, body, **kwa :param async_req bool :param str billing_account_id: (required) - :param Body1 body: (required) + :param Body2 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -481,7 +481,7 @@ def remove_billing_account_user_permission_with_http_info(self, billing_account_ :param async_req bool :param str billing_account_id: (required) - :param Body1 body: (required) + :param Body2 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -564,7 +564,7 @@ def remove_data_center_user_permission(self, data_center_id, body, **kwargs): # :param async_req bool :param str data_center_id: (required) - :param Body3 body: (required) + :param Body4 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -586,7 +586,7 @@ def remove_data_center_user_permission_with_http_info(self, data_center_id, body :param async_req bool :param str data_center_id: (required) - :param Body3 body: (required) + :param Body4 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -669,7 +669,7 @@ def remove_project_user_permission(self, project_id, body, **kwargs): # noqa: E :param async_req bool :param str project_id: (required) - :param Body10 body: (required) + :param Body11 body: (required) :return: object If the method is called asynchronously, returns the request thread. @@ -691,7 +691,7 @@ def remove_project_user_permission_with_http_info(self, project_id, body, **kwar :param async_req bool :param str project_id: (required) - :param Body10 body: (required) + :param Body11 body: (required) :return: object If the method is called asynchronously, returns the request thread. diff --git a/docs/src/cudo_compute/api/virtual_machines_api.py b/docs/src/cudo_compute/api/virtual_machines_api.py index c011e94..260cce0 100644 --- a/docs/src/cudo_compute/api/virtual_machines_api.py +++ b/docs/src/cudo_compute/api/virtual_machines_api.py @@ -33,6 +33,115 @@ def __init__(self, api_client=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 @@ -366,7 +475,7 @@ def create_vm(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body11 body: (required) + :param Body12 body: (required) :return: CreateVMResponse If the method is called asynchronously, returns the request thread. @@ -388,7 +497,7 @@ def create_vm_with_http_info(self, project_id, body, **kwargs): # noqa: E501 :param async_req bool :param str project_id: (required) - :param Body11 body: (required) + :param Body12 body: (required) :return: CreateVMResponse If the method is called asynchronously, returns the request thread. @@ -566,6 +675,115 @@ def delete_private_vm_image_with_http_info(self, project_id, id, **kwargs): # n _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 @@ -2278,3 +2496,116 @@ def update_private_vm_image_with_http_info(self, project_id, id, **kwargs): # n _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, **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, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str metadata: This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18 + :param bool merge: + :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, **kwargs) # noqa: E501 + else: + (data) = self.update_vm_metadata_with_http_info(project_id, id, **kwargs) # noqa: E501 + return data + + def update_vm_metadata_with_http_info(self, project_id, id, **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, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str project_id: (required) + :param str id: (required) + :param str metadata: This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18 + :param bool merge: + :return: UpdateVMMetadataResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['project_id', 'id', 'metadata', 'merge'] # 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 + + 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 'metadata' in params: + query_params.append(('metadata', params['metadata'])) # noqa: E501 + if 'merge' in params: + query_params.append(('merge', params['merge'])) # 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}/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/src/cudo_compute/auth_config.py b/docs/src/cudo_compute/auth_config.py new file mode 100644 index 0000000..2048d19 --- /dev/null +++ b/docs/src/cudo_compute/auth_config.py @@ -0,0 +1,47 @@ +from ruamel.yaml import YAML +import os + +home = os.path.expanduser("~") + + +def load_config(path, context_name): + key_config = None + context_config = None + error = None + + with open(path, 'r') as file: + yaml = YAML(typ='safe') + config_data = yaml.load(file) + + if config_data['configVersion'] != "v0": + error = Exception("Only config version v0 is supported") + return key_config, context_config, error + + if not context_name: + if 'current-context' in config_data: + context_name = config_data['current-context'] + else: + return key_config, context_config, Exception("No current context selected") + + if 'contexts' in config_data: + for context_data in config_data['contexts']: + if context_data['name'] == context_name: + context_config = context_data + break + + if not context_config: + error = Exception("Context not found") + return key_config, context_config, error + + if 'keys' in config_data: + for key_data in config_data['keys']: + if key_data['name'] == context_config['key']: + key_config = key_data + + if not key_config: + error = Exception("Key not found") + + return key_config, context_config, error + + + diff --git a/docs/src/cudo_compute/configuration.py b/docs/src/cudo_compute/configuration.py index e8f9688..3d9e17f 100644 --- a/docs/src/cudo_compute/configuration.py +++ b/docs/src/cudo_compute/configuration.py @@ -222,9 +222,12 @@ def get_basic_auth_token(self): :return: The token for basic HTTP authentication. """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') + 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. diff --git a/docs/src/cudo_compute/cudo_api.py b/docs/src/cudo_compute/cudo_api.py new file mode 100644 index 0000000..9f4ee71 --- /dev/null +++ b/docs/src/cudo_compute/cudo_api.py @@ -0,0 +1,114 @@ +import cudo_compute as cudo +import os + +home = os.path.expanduser("~") + + +def client(): + configuration = cudo.Configuration() + key, err = get_api_key() + + if err: + return None, err + + configuration.api_key['Authorization'] = key + # configuration.debug = True + configuration.api_key_prefix['Authorization'] = 'Bearer' + configuration.host = "https://rest.compute.cudo.org" + + client = cudo.ApiClient(configuration) + return client, None + + +def get_api_key(): + key_config, context_config, error = cudo.AuthConfig.load_config(home + '/.config/cudo/cudo.yml', "") + if not error: + return key_config['key'], None + else: + return None, error + + +def get_project_id(): + key_config, context_config, error = cudo.AuthConfig.load_config(home + '/.config/cudo/cudo.yml', "") + if not error: + return context_config['project'], None + else: + return None, error + + +def project_id(): + p, e = get_project_id() + if e is None: + return p + return '' + + +# APIs +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) + + +def ssh_keys(): + c, err = client() + if err: + raise Exception(err) + return cudo.SSHKeysApi(c) + + +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) + return cudo.VirtualMachinesApi(c) diff --git a/docs/src/cudo_compute/models/__init__.py b/docs/src/cudo_compute/models/__init__.py index 520791d..46d0b40 100644 --- a/docs/src/cudo_compute/models/__init__.py +++ b/docs/src/cudo_compute/models/__init__.py @@ -17,11 +17,18 @@ # import models into model package from src.cudo_compute.models.any import Any 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_setup_intent import BillingAccountSetupIntent +from src.cudo_compute.models.billing_account_spend_row import BillingAccountSpendRow from src.cudo_compute.models.body import Body from src.cudo_compute.models.body1 import Body1 from src.cudo_compute.models.body10 import Body10 from src.cudo_compute.models.body11 import Body11 +from src.cudo_compute.models.body12 import Body12 from src.cudo_compute.models.body2 import Body2 from src.cudo_compute.models.body3 import Body3 from src.cudo_compute.models.body4 import Body4 @@ -30,9 +37,12 @@ from src.cudo_compute.models.body7 import Body7 from src.cudo_compute.models.body8 import Body8 from src.cudo_compute.models.body9 import Body9 +from src.cudo_compute.models.cluster import Cluster 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_model_category import CpuModelCategory +from src.cudo_compute.models.create_billing_account_request import CreateBillingAccountRequest from src.cudo_compute.models.create_disk_snapshot_response import CreateDiskSnapshotResponse from src.cudo_compute.models.create_network_response import CreateNetworkResponse from src.cudo_compute.models.create_private_vm_image_response import CreatePrivateVMImageResponse @@ -40,7 +50,10 @@ from src.cudo_compute.models.create_storage_disk_response import CreateStorageDiskResponse 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.data_center import DataCenter from src.cudo_compute.models.data_center_category import DataCenterCategory +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 @@ -49,6 +62,7 @@ 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_state import DiskState @@ -56,23 +70,40 @@ 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_billing_account_stripe_invoices_response import GetBillingAccountStripeInvoicesResponse +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_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_security_group_response import GetSecurityGroupResponse from src.cudo_compute.models.get_vm_response import GetVMResponse from src.cudo_compute.models.gpu_model_category import GpuModelCategory +from src.cudo_compute.models.host import Host from src.cudo_compute.models.host_config_category import HostConfigCategory from src.cudo_compute.models.identity_verification_session import IdentityVerificationSession from src.cudo_compute.models.image import Image +from src.cudo_compute.models.interval import Interval +from src.cudo_compute.models.invoice import Invoice from src.cudo_compute.models.list_api_keys_response import ListApiKeysResponse +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_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_keys_response import ListObjectStorageKeysResponse from src.cudo_compute.models.list_object_storage_users_response import ListObjectStorageUsersResponse +from src.cudo_compute.models.list_outstanding_stripe_invoices_response import ListOutstandingStripeInvoicesResponse from src.cudo_compute.models.list_private_vm_images_response import ListPrivateVMImagesResponse from src.cudo_compute.models.list_private_vm_images_response_private_image import ListPrivateVMImagesResponsePrivateImage from src.cudo_compute.models.list_project_ssh_keys_response import ListProjectSshKeysResponse @@ -87,17 +118,23 @@ from src.cudo_compute.models.list_vm_machine_types_request import ListVMMachineTypesRequest from src.cudo_compute.models.list_vm_machine_types_response import ListVMMachineTypesResponse from src.cudo_compute.models.list_vms_response import ListVMsResponse +from src.cudo_compute.models.machine_type import MachineType 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_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.payment_method_card import PaymentMethodCard +from src.cudo_compute.models.payment_method_paypal import PaymentMethodPaypal +from src.cudo_compute.models.point import Point from src.cudo_compute.models.profile import Profile from src.cudo_compute.models.project import Project from src.cudo_compute.models.protocol import Protocol from src.cudo_compute.models.reboot_vm_response import RebootVMResponse from src.cudo_compute.models.region import Region +from src.cudo_compute.models.remove_billing_account_payment_method_response import RemoveBillingAccountPaymentMethodResponse 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.revert_disk_response import RevertDiskResponse @@ -107,6 +144,7 @@ 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.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 @@ -115,14 +153,20 @@ 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.tax_id import TaxId from src.cudo_compute.models.terminate_vm_response import TerminateVMResponse +from src.cudo_compute.models.unit import Unit from src.cudo_compute.models.update_private_vm_image_response import UpdatePrivateVMImageResponse from src.cudo_compute.models.update_security_group_response import UpdateSecurityGroupResponse +from src.cudo_compute.models.update_vm_metadata_response import UpdateVMMetadataResponse from src.cudo_compute.models.user_permission import UserPermission from src.cudo_compute.models.v1_private_image import V1PrivateImage +from src.cudo_compute.models.v1billingaccountsbilling_account_id_billing_account import V1billingaccountsbillingAccountIdBillingAccount 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_monitoring_item import VMMonitoringItem from src.cudo_compute.models.vmnic import VMNIC from src.cudo_compute.models.v_router_size import VRouterSize +from src.cudo_compute.models.vm_state import VmState diff --git a/docs/src/cudo_compute/models/attach_security_group_response.py b/docs/src/cudo_compute/models/attach_security_group_response.py new file mode 100644 index 0000000..03d60b9 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/billing_account.py b/docs/src/cudo_compute/models/billing_account.py new file mode 100644 index 0000000..a47f218 --- /dev/null +++ b/docs/src/cudo_compute/models/billing_account.py @@ -0,0 +1,383 @@ +# 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 = { + 'billing_threshold': 'Decimal', + 'create_by': 'str', + 'create_time': 'datetime', + 'demand_enabled': 'bool', + 'display_name': 'str', + 'id': 'str', + 'invoice_time': 'datetime', + 'monthly_spend': 'str', + 'stripe_ref': 'str', + 'supply_enabled': 'bool', + 'tax_ids': 'list[TaxId]' + } + + attribute_map = { + 'billing_threshold': 'billingThreshold', + 'create_by': 'createBy', + 'create_time': 'createTime', + 'demand_enabled': 'demandEnabled', + 'display_name': 'displayName', + 'id': 'id', + 'invoice_time': 'invoiceTime', + 'monthly_spend': 'monthlySpend', + 'stripe_ref': 'stripeRef', + 'supply_enabled': 'supplyEnabled', + 'tax_ids': 'taxIds' + } + + def __init__(self, billing_threshold=None, create_by=None, create_time=None, demand_enabled=None, display_name=None, id=None, invoice_time=None, monthly_spend=None, stripe_ref=None, supply_enabled=None, tax_ids=None, _configuration=None): # noqa: E501 + """BillingAccount - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._billing_threshold = None + self._create_by = None + self._create_time = None + self._demand_enabled = None + self._display_name = None + self._id = None + self._invoice_time = None + self._monthly_spend = None + self._stripe_ref = None + self._supply_enabled = None + self._tax_ids = None + self.discriminator = None + + if billing_threshold is not None: + self.billing_threshold = billing_threshold + if create_by is not None: + self.create_by = create_by + if create_time is not None: + self.create_time = create_time + if demand_enabled is not None: + self.demand_enabled = demand_enabled + if display_name is not None: + self.display_name = display_name + if id is not None: + self.id = id + if invoice_time is not None: + self.invoice_time = invoice_time + if monthly_spend is not None: + self.monthly_spend = monthly_spend + if stripe_ref is not None: + self.stripe_ref = stripe_ref + if supply_enabled is not None: + self.supply_enabled = supply_enabled + if tax_ids is not None: + self.tax_ids = tax_ids + + @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 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 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 demand_enabled(self): + """Gets the demand_enabled of this BillingAccount. # noqa: E501 + + + :return: The demand_enabled of this BillingAccount. # noqa: E501 + :rtype: bool + """ + return self._demand_enabled + + @demand_enabled.setter + def demand_enabled(self, demand_enabled): + """Sets the demand_enabled of this BillingAccount. + + + :param demand_enabled: The demand_enabled of this BillingAccount. # noqa: E501 + :type: bool + """ + + self._demand_enabled = demand_enabled + + @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 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 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 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 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 supply_enabled(self): + """Gets the supply_enabled of this BillingAccount. # noqa: E501 + + + :return: The supply_enabled of this BillingAccount. # noqa: E501 + :rtype: bool + """ + return self._supply_enabled + + @supply_enabled.setter + def supply_enabled(self, supply_enabled): + """Sets the supply_enabled of this BillingAccount. + + + :param supply_enabled: The supply_enabled of this BillingAccount. # noqa: E501 + :type: bool + """ + + self._supply_enabled = supply_enabled + + @property + def tax_ids(self): + """Gets the tax_ids of this BillingAccount. # noqa: E501 + + + :return: The tax_ids of this BillingAccount. # noqa: E501 + :rtype: list[TaxId] + """ + return self._tax_ids + + @tax_ids.setter + def tax_ids(self, tax_ids): + """Sets the tax_ids of this BillingAccount. + + + :param tax_ids: The tax_ids of this BillingAccount. # noqa: E501 + :type: list[TaxId] + """ + + self._tax_ids = tax_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(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/src/cudo_compute/models/billing_account_payment_method.py b/docs/src/cudo_compute/models/billing_account_payment_method.py new file mode 100644 index 0000000..2f5f094 --- /dev/null +++ b/docs/src/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 = { + 'card': 'PaymentMethodCard', + 'id': 'str', + 'is_default': 'bool', + 'paypal': 'PaymentMethodPaypal', + 'type': 'str' + } + + attribute_map = { + 'card': 'card', + 'id': 'id', + 'is_default': 'isDefault', + 'paypal': 'paypal', + 'type': 'type' + } + + def __init__(self, card=None, id=None, is_default=None, paypal=None, type=None, _configuration=None): # noqa: E501 + """BillingAccountPaymentMethod - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._card = None + self._id = None + self._is_default = None + self._paypal = None + self._type = None + self.discriminator = None + + if card is not None: + self.card = card + if id is not None: + self.id = id + if is_default is not None: + self.is_default = is_default + if paypal is not None: + self.paypal = paypal + if type is not None: + 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 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 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 + + @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 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 + + 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/src/cudo_compute/models/billing_account_payment_methods.py b/docs/src/cudo_compute/models/billing_account_payment_methods.py new file mode 100644 index 0000000..3fd32be --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/billing_account_setup_intent.py b/docs/src/cudo_compute/models/billing_account_setup_intent.py new file mode 100644 index 0000000..0276331 --- /dev/null +++ b/docs/src/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 = { + 'client_secret': 'str', + 'id': 'str' + } + + attribute_map = { + 'client_secret': 'clientSecret', + 'id': 'id' + } + + def __init__(self, client_secret=None, id=None, _configuration=None): # noqa: E501 + """BillingAccountSetupIntent - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._client_secret = None + self._id = None + self.discriminator = None + + self.client_secret = client_secret + 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 + + @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 + + 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/src/cudo_compute/models/billing_account_spend_row.py b/docs/src/cudo_compute/models/billing_account_spend_row.py new file mode 100644 index 0000000..5728c91 --- /dev/null +++ b/docs/src/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 = { + 'amount': 'Decimal', + 'description': 'str', + 'project_id': 'str', + 'quantity': 'float', + 'unit': 'Unit', + 'unit_amount': 'Decimal' + } + + attribute_map = { + 'amount': 'amount', + 'description': 'description', + 'project_id': 'projectId', + 'quantity': 'quantity', + 'unit': 'unit', + 'unit_amount': 'unitAmount' + } + + def __init__(self, amount=None, description=None, project_id=None, quantity=None, unit=None, unit_amount=None, _configuration=None): # noqa: E501 + """BillingAccountSpendRow - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._amount = None + self._description = None + self._project_id = None + self._quantity = None + self._unit = None + self._unit_amount = None + self.discriminator = None + + self.amount = amount + self.description = description + self.project_id = project_id + self.quantity = quantity + self.unit = unit + 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 + + @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 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 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 + + 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/src/cudo_compute/models/body.py b/docs/src/cudo_compute/models/body.py index 7f148de..e5a975d 100644 --- a/docs/src/cudo_compute/models/body.py +++ b/docs/src/cudo_compute/models/body.py @@ -33,125 +33,72 @@ class Body(object): and the value is json key in definition. """ swagger_types = { - 'data_center_id': 'str', - 'project_id': 'str', - 'role': 'Role', - 'user_email': 'str' + 'billing_account': 'V1billingaccountsbillingAccountIdBillingAccount', + 'update_mask': 'str' } attribute_map = { - 'data_center_id': 'dataCenterId', - 'project_id': 'projectId', - 'role': 'role', - 'user_email': 'userEmail' + 'billing_account': 'billingAccount', + 'update_mask': 'updateMask' } - def __init__(self, data_center_id=None, project_id=None, role=None, user_email=None, _configuration=None): # noqa: E501 + def __init__(self, billing_account=None, update_mask=None, _configuration=None): # noqa: E501 """Body - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration - self._data_center_id = None - self._project_id = None - self._role = None - self._user_email = None + self._billing_account = None + self._update_mask = None self.discriminator = None - if data_center_id is not None: - self.data_center_id = data_center_id - if project_id is not None: - self.project_id = project_id - self.role = role - self.user_email = user_email + if billing_account is not None: + self.billing_account = billing_account + self.update_mask = update_mask @property - def data_center_id(self): - """Gets the data_center_id of this Body. # noqa: E501 + def billing_account(self): + """Gets the billing_account of this Body. # noqa: E501 - :return: The data_center_id of this Body. # 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 Body. - - - :param data_center_id: The data_center_id of this Body. # noqa: E501 - :type: str - """ - - self._data_center_id = data_center_id - - @property - def project_id(self): - """Gets the project_id of this Body. # noqa: E501 - - - :return: The project_id of this Body. # noqa: E501 - :rtype: str - """ - return self._project_id - - @project_id.setter - def project_id(self, project_id): - """Sets the project_id of this Body. - - - :param project_id: The project_id of this Body. # noqa: E501 - :type: str - """ - - self._project_id = project_id - - @property - def role(self): - """Gets the role of this Body. # noqa: E501 - - - :return: The role of this Body. # noqa: E501 - :rtype: Role + :return: The billing_account of this Body. # noqa: E501 + :rtype: V1billingaccountsbillingAccountIdBillingAccount """ - return self._role + return self._billing_account - @role.setter - def role(self, role): - """Sets the role of this Body. + @billing_account.setter + def billing_account(self, billing_account): + """Sets the billing_account of this Body. - :param role: The role of this Body. # noqa: E501 - :type: Role + :param billing_account: The billing_account of this Body. # noqa: E501 + :type: V1billingaccountsbillingAccountIdBillingAccount """ - 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 + self._billing_account = billing_account @property - def user_email(self): - """Gets the user_email of this Body. # noqa: E501 + def update_mask(self): + """Gets the update_mask of this Body. # noqa: E501 - :return: The user_email of this Body. # noqa: E501 + :return: The update_mask of this Body. # noqa: E501 :rtype: str """ - return self._user_email + return self._update_mask - @user_email.setter - def user_email(self, user_email): - """Sets the user_email of this Body. + @update_mask.setter + def update_mask(self, update_mask): + """Sets the update_mask of this Body. - :param user_email: The user_email of this Body. # noqa: E501 + :param update_mask: The update_mask of this Body. # 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 + 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._user_email = user_email + self._update_mask = update_mask def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body1.py b/docs/src/cudo_compute/models/body1.py index 91e9bb2..5999d8e 100644 --- a/docs/src/cudo_compute/models/body1.py +++ b/docs/src/cudo_compute/models/body1.py @@ -36,17 +36,17 @@ class Body1(object): 'data_center_id': 'str', 'project_id': 'str', 'role': 'Role', - 'user_id': 'str' + 'user_email': 'str' } attribute_map = { 'data_center_id': 'dataCenterId', 'project_id': 'projectId', 'role': 'role', - 'user_id': 'userId' + 'user_email': 'userEmail' } - def __init__(self, data_center_id=None, project_id=None, role=None, user_id=None, _configuration=None): # noqa: E501 + def __init__(self, data_center_id=None, project_id=None, role=None, user_email=None, _configuration=None): # noqa: E501 """Body1 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() @@ -55,7 +55,7 @@ def __init__(self, data_center_id=None, project_id=None, role=None, user_id=None self._data_center_id = None self._project_id = None self._role = None - self._user_id = None + self._user_email = None self.discriminator = None if data_center_id is not None: @@ -63,7 +63,7 @@ def __init__(self, data_center_id=None, project_id=None, role=None, user_id=None if project_id is not None: self.project_id = project_id self.role = role - self.user_id = user_id + self.user_email = user_email @property def data_center_id(self): @@ -131,27 +131,27 @@ def role(self, role): self._role = role @property - def user_id(self): - """Gets the user_id of this Body1. # noqa: E501 + def user_email(self): + """Gets the user_email of this Body1. # noqa: E501 - :return: The user_id of this Body1. # noqa: E501 + :return: The user_email of this Body1. # noqa: E501 :rtype: str """ - return self._user_id + return self._user_email - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this Body1. + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this Body1. - :param user_id: The user_id of this Body1. # noqa: E501 + :param user_email: The user_email of this Body1. # 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 + 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_id = user_id + self._user_email = user_email def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body10.py b/docs/src/cudo_compute/models/body10.py index f12aa25..d4f8463 100644 --- a/docs/src/cudo_compute/models/body10.py +++ b/docs/src/cudo_compute/models/body10.py @@ -33,125 +33,45 @@ class Body10(object): and the value is json key in definition. """ swagger_types = { - 'billing_account_id': 'str', - 'data_center_id': 'str', - 'role': 'Role', - 'user_id': 'str' + 'id': 'str' } attribute_map = { - 'billing_account_id': 'billingAccountId', - 'data_center_id': 'dataCenterId', - 'role': 'role', - 'user_id': 'userId' + 'id': 'id' } - def __init__(self, billing_account_id=None, data_center_id=None, role=None, user_id=None, _configuration=None): # noqa: E501 + def __init__(self, id=None, _configuration=None): # noqa: E501 """Body10 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration - self._billing_account_id = None - self._data_center_id = None - self._role = None - self._user_id = None + self._id = None self.discriminator = None - if billing_account_id is not None: - self.billing_account_id = billing_account_id - if data_center_id is not None: - self.data_center_id = data_center_id - self.role = role - self.user_id = user_id + if id is not None: + self.id = id @property - def billing_account_id(self): - """Gets the billing_account_id of this Body10. # noqa: E501 + def id(self): + """Gets the id of this Body10. # noqa: E501 - :return: The billing_account_id of this Body10. # noqa: E501 + :return: The id of this Body10. # noqa: E501 :rtype: str """ - return self._billing_account_id + return self._id - @billing_account_id.setter - def billing_account_id(self, billing_account_id): - """Sets the billing_account_id of this Body10. + @id.setter + def id(self, id): + """Sets the id of this Body10. - :param billing_account_id: The billing_account_id of this Body10. # noqa: E501 + :param id: The id of this Body10. # noqa: E501 :type: str """ - self._billing_account_id = billing_account_id - - @property - def data_center_id(self): - """Gets the data_center_id of this Body10. # noqa: E501 - - - :return: The data_center_id of this Body10. # 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 Body10. - - - :param data_center_id: The data_center_id of this Body10. # noqa: E501 - :type: str - """ - - self._data_center_id = data_center_id - - @property - def role(self): - """Gets the role of this Body10. # noqa: E501 - - - :return: The role of this Body10. # noqa: E501 - :rtype: Role - """ - return self._role - - @role.setter - def role(self, role): - """Sets the role of this Body10. - - - :param role: The role of this Body10. # 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 - - @property - def user_id(self): - """Gets the user_id of this Body10. # noqa: E501 - - - :return: The user_id of this Body10. # noqa: E501 - :rtype: str - """ - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this Body10. - - - :param user_id: The user_id of this Body10. # 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 + self._id = id def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body11.py b/docs/src/cudo_compute/models/body11.py index f0cfd3f..c79aaf3 100644 --- a/docs/src/cudo_compute/models/body11.py +++ b/docs/src/cudo_compute/models/body11.py @@ -33,198 +33,58 @@ class Body11(object): and the value is json key in definition. """ swagger_types = { - 'boot_disk': 'Disk', - 'boot_disk_image_id': 'str', - 'cpu_model': 'str', - 'custom_ssh_keys': 'list[str]', + 'billing_account_id': 'str', 'data_center_id': 'str', - 'gpu_model': 'str', - 'gpus': 'int', - 'machine_type': 'str', - 'max_price_hr': 'Decimal', - 'memory_gib': 'int', - 'metadata': 'dict(str, str)', - 'nics': 'list[CreateVMRequestNIC]', - 'password': 'str', - 'security_group_ids': 'list[str]', - 'ssh_key_source': 'SshKeySource', - 'start_script': 'str', - 'storage_disk_ids': 'list[str]', - 'vcpus': 'int', - 'vm_id': 'str' + 'role': 'Role', + 'user_id': 'str' } attribute_map = { - 'boot_disk': 'bootDisk', - 'boot_disk_image_id': 'bootDiskImageId', - 'cpu_model': 'cpuModel', - 'custom_ssh_keys': 'customSshKeys', + 'billing_account_id': 'billingAccountId', 'data_center_id': 'dataCenterId', - 'gpu_model': 'gpuModel', - 'gpus': 'gpus', - 'machine_type': 'machineType', - 'max_price_hr': 'maxPriceHr', - 'memory_gib': 'memoryGib', - 'metadata': 'metadata', - 'nics': 'nics', - 'password': 'password', - 'security_group_ids': 'securityGroupIds', - 'ssh_key_source': 'sshKeySource', - 'start_script': 'startScript', - 'storage_disk_ids': 'storageDiskIds', - 'vcpus': 'vcpus', - 'vm_id': 'vmId' + 'role': 'role', + 'user_id': 'userId' } - def __init__(self, boot_disk=None, boot_disk_image_id=None, cpu_model=None, custom_ssh_keys=None, data_center_id=None, gpu_model=None, gpus=None, machine_type=None, max_price_hr=None, memory_gib=None, metadata=None, nics=None, password=None, security_group_ids=None, ssh_key_source=None, start_script=None, storage_disk_ids=None, vcpus=None, vm_id=None, _configuration=None): # noqa: E501 + def __init__(self, billing_account_id=None, data_center_id=None, role=None, user_id=None, _configuration=None): # noqa: E501 """Body11 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration - self._boot_disk = None - self._boot_disk_image_id = None - self._cpu_model = None - self._custom_ssh_keys = None + self._billing_account_id = None self._data_center_id = None - self._gpu_model = None - self._gpus = None - self._machine_type = None - self._max_price_hr = None - self._memory_gib = None - self._metadata = None - self._nics = None - self._password = None - self._security_group_ids = None - self._ssh_key_source = None - self._start_script = None - self._storage_disk_ids = None - self._vcpus = None - self._vm_id = None + self._role = None + self._user_id = None self.discriminator = None - if boot_disk is not None: - self.boot_disk = boot_disk - self.boot_disk_image_id = boot_disk_image_id - if cpu_model is not None: - self.cpu_model = cpu_model - if custom_ssh_keys is not None: - self.custom_ssh_keys = custom_ssh_keys + if billing_account_id is not None: + self.billing_account_id = billing_account_id if data_center_id is not None: self.data_center_id = data_center_id - if gpu_model is not None: - self.gpu_model = gpu_model - if gpus is not None: - self.gpus = gpus - if machine_type is not None: - self.machine_type = machine_type - if max_price_hr is not None: - self.max_price_hr = max_price_hr - if memory_gib is not None: - self.memory_gib = memory_gib - if metadata is not None: - self.metadata = metadata - if nics is not None: - self.nics = nics - if password is not None: - self.password = password - if security_group_ids is not None: - self.security_group_ids = security_group_ids - if ssh_key_source is not None: - self.ssh_key_source = ssh_key_source - if start_script is not None: - self.start_script = start_script - if storage_disk_ids is not None: - self.storage_disk_ids = storage_disk_ids - if vcpus is not None: - self.vcpus = vcpus - self.vm_id = vm_id + self.role = role + self.user_id = user_id @property - def boot_disk(self): - """Gets the boot_disk of this Body11. # noqa: E501 + def billing_account_id(self): + """Gets the billing_account_id of this Body11. # noqa: E501 - :return: The boot_disk of this Body11. # noqa: E501 - :rtype: Disk - """ - return self._boot_disk - - @boot_disk.setter - def boot_disk(self, boot_disk): - """Sets the boot_disk of this Body11. - - - :param boot_disk: The boot_disk of this Body11. # noqa: E501 - :type: Disk - """ - - self._boot_disk = boot_disk - - @property - def boot_disk_image_id(self): - """Gets the boot_disk_image_id of this Body11. # noqa: E501 - - - :return: The boot_disk_image_id of this Body11. # 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 Body11. - - - :param boot_disk_image_id: The boot_disk_image_id of this Body11. # 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 cpu_model(self): - """Gets the cpu_model of this Body11. # noqa: E501 - - - :return: The cpu_model of this Body11. # noqa: E501 + :return: The billing_account_id of this Body11. # noqa: E501 :rtype: str """ - return self._cpu_model + return self._billing_account_id - @cpu_model.setter - def cpu_model(self, cpu_model): - """Sets the cpu_model of this Body11. + @billing_account_id.setter + def billing_account_id(self, billing_account_id): + """Sets the billing_account_id of this Body11. - :param cpu_model: The cpu_model of this Body11. # noqa: E501 + :param billing_account_id: The billing_account_id of this Body11. # noqa: E501 :type: str """ - self._cpu_model = cpu_model - - @property - def custom_ssh_keys(self): - """Gets the custom_ssh_keys of this Body11. # noqa: E501 - - - :return: The custom_ssh_keys of this Body11. # 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 Body11. - - - :param custom_ssh_keys: The custom_ssh_keys of this Body11. # noqa: E501 - :type: list[str] - """ - - self._custom_ssh_keys = custom_ssh_keys + self._billing_account_id = billing_account_id @property def data_center_id(self): @@ -248,300 +108,50 @@ def data_center_id(self, data_center_id): self._data_center_id = data_center_id @property - def gpu_model(self): - """Gets the gpu_model of this Body11. # noqa: E501 - - - :return: The gpu_model of this Body11. # noqa: E501 - :rtype: str - """ - return self._gpu_model - - @gpu_model.setter - def gpu_model(self, gpu_model): - """Sets the gpu_model of this Body11. - - - :param gpu_model: The gpu_model of this Body11. # noqa: E501 - :type: str - """ - - self._gpu_model = gpu_model - - @property - def gpus(self): - """Gets the gpus of this Body11. # noqa: E501 - - - :return: The gpus of this Body11. # noqa: E501 - :rtype: int - """ - return self._gpus - - @gpus.setter - def gpus(self, gpus): - """Sets the gpus of this Body11. - - - :param gpus: The gpus of this Body11. # noqa: E501 - :type: int - """ - - self._gpus = gpus - - @property - def machine_type(self): - """Gets the machine_type of this Body11. # noqa: E501 - - - :return: The machine_type of this Body11. # noqa: E501 - :rtype: str - """ - return self._machine_type - - @machine_type.setter - def machine_type(self, machine_type): - """Sets the machine_type of this Body11. - - - :param machine_type: The machine_type of this Body11. # noqa: E501 - :type: str - """ - - self._machine_type = machine_type - - @property - def max_price_hr(self): - """Gets the max_price_hr of this Body11. # noqa: E501 - - - :return: The max_price_hr of this Body11. # noqa: E501 - :rtype: Decimal - """ - return self._max_price_hr - - @max_price_hr.setter - def max_price_hr(self, max_price_hr): - """Sets the max_price_hr of this Body11. - - - :param max_price_hr: The max_price_hr of this Body11. # noqa: E501 - :type: Decimal - """ - - self._max_price_hr = max_price_hr - - @property - def memory_gib(self): - """Gets the memory_gib of this Body11. # noqa: E501 - - - :return: The memory_gib of this Body11. # noqa: E501 - :rtype: int - """ - return self._memory_gib - - @memory_gib.setter - def memory_gib(self, memory_gib): - """Sets the memory_gib of this Body11. - - - :param memory_gib: The memory_gib of this Body11. # noqa: E501 - :type: int - """ - - self._memory_gib = memory_gib - - @property - def metadata(self): - """Gets the metadata of this Body11. # noqa: E501 - - - :return: The metadata of this Body11. # noqa: E501 - :rtype: dict(str, str) - """ - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Sets the metadata of this Body11. - - - :param metadata: The metadata of this Body11. # noqa: E501 - :type: dict(str, str) - """ - - self._metadata = metadata - - @property - def nics(self): - """Gets the nics of this Body11. # noqa: E501 - - - :return: The nics of this Body11. # noqa: E501 - :rtype: list[CreateVMRequestNIC] - """ - return self._nics - - @nics.setter - def nics(self, nics): - """Sets the nics of this Body11. - - - :param nics: The nics of this Body11. # noqa: E501 - :type: list[CreateVMRequestNIC] - """ - - self._nics = nics - - @property - def password(self): - """Gets the password of this Body11. # noqa: E501 - - - :return: The password of this Body11. # noqa: E501 - :rtype: str - """ - return self._password - - @password.setter - def password(self, password): - """Sets the password of this Body11. - - - :param password: The password of this Body11. # noqa: E501 - :type: str - """ - - self._password = password - - @property - def security_group_ids(self): - """Gets the security_group_ids of this Body11. # noqa: E501 - - - :return: The security_group_ids of this Body11. # 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 Body11. - - - :param security_group_ids: The security_group_ids of this Body11. # noqa: E501 - :type: list[str] - """ - - self._security_group_ids = security_group_ids - - @property - def ssh_key_source(self): - """Gets the ssh_key_source of this Body11. # noqa: E501 - - - :return: The ssh_key_source of this Body11. # 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 Body11. - - - :param ssh_key_source: The ssh_key_source of this Body11. # noqa: E501 - :type: SshKeySource - """ - - self._ssh_key_source = ssh_key_source - - @property - def start_script(self): - """Gets the start_script of this Body11. # noqa: E501 - - - :return: The start_script of this Body11. # noqa: E501 - :rtype: str - """ - return self._start_script - - @start_script.setter - def start_script(self, start_script): - """Sets the start_script of this Body11. - - - :param start_script: The start_script of this Body11. # noqa: E501 - :type: str - """ - - self._start_script = start_script - - @property - def storage_disk_ids(self): - """Gets the storage_disk_ids of this Body11. # noqa: E501 - - - :return: The storage_disk_ids of this Body11. # 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 Body11. - - - :param storage_disk_ids: The storage_disk_ids of this Body11. # noqa: E501 - :type: list[str] - """ - - self._storage_disk_ids = storage_disk_ids - - @property - def vcpus(self): - """Gets the vcpus of this Body11. # noqa: E501 + def role(self): + """Gets the role of this Body11. # noqa: E501 - :return: The vcpus of this Body11. # noqa: E501 - :rtype: int + :return: The role of this Body11. # noqa: E501 + :rtype: Role """ - return self._vcpus + return self._role - @vcpus.setter - def vcpus(self, vcpus): - """Sets the vcpus of this Body11. + @role.setter + def role(self, role): + """Sets the role of this Body11. - :param vcpus: The vcpus of this Body11. # noqa: E501 - :type: int + :param role: The role of this Body11. # 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._vcpus = vcpus + self._role = role @property - def vm_id(self): - """Gets the vm_id of this Body11. # noqa: E501 + def user_id(self): + """Gets the user_id of this Body11. # noqa: E501 - :return: The vm_id of this Body11. # noqa: E501 + :return: The user_id of this Body11. # noqa: E501 :rtype: str """ - return self._vm_id + return self._user_id - @vm_id.setter - def vm_id(self, vm_id): - """Sets the vm_id of this Body11. + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Body11. - :param vm_id: The vm_id of this Body11. # noqa: E501 + :param user_id: The user_id of this Body11. # 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 + 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._vm_id = vm_id + self._user_id = user_id def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body12.py b/docs/src/cudo_compute/models/body12.py new file mode 100644 index 0000000..6ca5cc0 --- /dev/null +++ b/docs/src/cudo_compute/models/body12.py @@ -0,0 +1,593 @@ +# 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 Body12(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 = { + 'boot_disk': 'Disk', + 'boot_disk_image_id': 'str', + 'cpu_model': 'str', + 'custom_ssh_keys': 'list[str]', + 'data_center_id': 'str', + 'gpu_model': 'str', + 'gpus': 'int', + 'machine_type': 'str', + 'max_price_hr': 'Decimal', + 'memory_gib': 'int', + 'metadata': 'dict(str, str)', + 'nics': 'list[CreateVMRequestNIC]', + 'password': 'str', + 'security_group_ids': 'list[str]', + 'ssh_key_source': 'SshKeySource', + 'start_script': 'str', + 'storage_disk_ids': 'list[str]', + 'vcpus': 'int', + 'vm_id': 'str' + } + + attribute_map = { + 'boot_disk': 'bootDisk', + 'boot_disk_image_id': 'bootDiskImageId', + 'cpu_model': 'cpuModel', + 'custom_ssh_keys': 'customSshKeys', + 'data_center_id': 'dataCenterId', + 'gpu_model': 'gpuModel', + 'gpus': 'gpus', + 'machine_type': 'machineType', + 'max_price_hr': 'maxPriceHr', + 'memory_gib': 'memoryGib', + 'metadata': 'metadata', + 'nics': 'nics', + 'password': 'password', + 'security_group_ids': 'securityGroupIds', + 'ssh_key_source': 'sshKeySource', + 'start_script': 'startScript', + 'storage_disk_ids': 'storageDiskIds', + 'vcpus': 'vcpus', + 'vm_id': 'vmId' + } + + def __init__(self, boot_disk=None, boot_disk_image_id=None, cpu_model=None, custom_ssh_keys=None, data_center_id=None, gpu_model=None, gpus=None, machine_type=None, max_price_hr=None, memory_gib=None, metadata=None, nics=None, password=None, security_group_ids=None, ssh_key_source=None, start_script=None, storage_disk_ids=None, vcpus=None, vm_id=None, _configuration=None): # noqa: E501 + """Body12 - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._boot_disk = None + self._boot_disk_image_id = None + self._cpu_model = None + self._custom_ssh_keys = None + self._data_center_id = None + self._gpu_model = None + self._gpus = None + self._machine_type = None + self._max_price_hr = None + self._memory_gib = None + self._metadata = None + self._nics = None + self._password = None + self._security_group_ids = None + self._ssh_key_source = None + self._start_script = None + self._storage_disk_ids = None + self._vcpus = None + self._vm_id = None + self.discriminator = None + + if boot_disk is not None: + self.boot_disk = boot_disk + self.boot_disk_image_id = boot_disk_image_id + if cpu_model is not None: + self.cpu_model = cpu_model + if custom_ssh_keys is not None: + self.custom_ssh_keys = custom_ssh_keys + if data_center_id is not None: + self.data_center_id = data_center_id + if gpu_model is not None: + self.gpu_model = gpu_model + if gpus is not None: + self.gpus = gpus + if machine_type is not None: + self.machine_type = machine_type + if max_price_hr is not None: + self.max_price_hr = max_price_hr + if memory_gib is not None: + self.memory_gib = memory_gib + if metadata is not None: + self.metadata = metadata + if nics is not None: + self.nics = nics + if password is not None: + self.password = password + if security_group_ids is not None: + self.security_group_ids = security_group_ids + if ssh_key_source is not None: + self.ssh_key_source = ssh_key_source + if start_script is not None: + self.start_script = start_script + if storage_disk_ids is not None: + self.storage_disk_ids = storage_disk_ids + if vcpus is not None: + self.vcpus = vcpus + self.vm_id = vm_id + + @property + def boot_disk(self): + """Gets the boot_disk of this Body12. # noqa: E501 + + + :return: The boot_disk of this Body12. # noqa: E501 + :rtype: Disk + """ + return self._boot_disk + + @boot_disk.setter + def boot_disk(self, boot_disk): + """Sets the boot_disk of this Body12. + + + :param boot_disk: The boot_disk of this Body12. # noqa: E501 + :type: Disk + """ + + self._boot_disk = boot_disk + + @property + def boot_disk_image_id(self): + """Gets the boot_disk_image_id of this Body12. # noqa: E501 + + + :return: The boot_disk_image_id of this Body12. # 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 Body12. + + + :param boot_disk_image_id: The boot_disk_image_id of this Body12. # 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 cpu_model(self): + """Gets the cpu_model of this Body12. # noqa: E501 + + + :return: The cpu_model of this Body12. # noqa: E501 + :rtype: str + """ + return self._cpu_model + + @cpu_model.setter + def cpu_model(self, cpu_model): + """Sets the cpu_model of this Body12. + + + :param cpu_model: The cpu_model of this Body12. # noqa: E501 + :type: str + """ + + self._cpu_model = cpu_model + + @property + def custom_ssh_keys(self): + """Gets the custom_ssh_keys of this Body12. # noqa: E501 + + + :return: The custom_ssh_keys of this Body12. # 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 Body12. + + + :param custom_ssh_keys: The custom_ssh_keys of this Body12. # noqa: E501 + :type: list[str] + """ + + self._custom_ssh_keys = custom_ssh_keys + + @property + def data_center_id(self): + """Gets the data_center_id of this Body12. # noqa: E501 + + + :return: The data_center_id of this Body12. # 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 Body12. + + + :param data_center_id: The data_center_id of this Body12. # noqa: E501 + :type: str + """ + + self._data_center_id = data_center_id + + @property + def gpu_model(self): + """Gets the gpu_model of this Body12. # noqa: E501 + + + :return: The gpu_model of this Body12. # noqa: E501 + :rtype: str + """ + return self._gpu_model + + @gpu_model.setter + def gpu_model(self, gpu_model): + """Sets the gpu_model of this Body12. + + + :param gpu_model: The gpu_model of this Body12. # noqa: E501 + :type: str + """ + + self._gpu_model = gpu_model + + @property + def gpus(self): + """Gets the gpus of this Body12. # noqa: E501 + + + :return: The gpus of this Body12. # noqa: E501 + :rtype: int + """ + return self._gpus + + @gpus.setter + def gpus(self, gpus): + """Sets the gpus of this Body12. + + + :param gpus: The gpus of this Body12. # noqa: E501 + :type: int + """ + + self._gpus = gpus + + @property + def machine_type(self): + """Gets the machine_type of this Body12. # noqa: E501 + + + :return: The machine_type of this Body12. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this Body12. + + + :param machine_type: The machine_type of this Body12. # noqa: E501 + :type: str + """ + + self._machine_type = machine_type + + @property + def max_price_hr(self): + """Gets the max_price_hr of this Body12. # noqa: E501 + + + :return: The max_price_hr of this Body12. # noqa: E501 + :rtype: Decimal + """ + return self._max_price_hr + + @max_price_hr.setter + def max_price_hr(self, max_price_hr): + """Sets the max_price_hr of this Body12. + + + :param max_price_hr: The max_price_hr of this Body12. # noqa: E501 + :type: Decimal + """ + + self._max_price_hr = max_price_hr + + @property + def memory_gib(self): + """Gets the memory_gib of this Body12. # noqa: E501 + + + :return: The memory_gib of this Body12. # noqa: E501 + :rtype: int + """ + return self._memory_gib + + @memory_gib.setter + def memory_gib(self, memory_gib): + """Sets the memory_gib of this Body12. + + + :param memory_gib: The memory_gib of this Body12. # noqa: E501 + :type: int + """ + + self._memory_gib = memory_gib + + @property + def metadata(self): + """Gets the metadata of this Body12. # noqa: E501 + + + :return: The metadata of this Body12. # noqa: E501 + :rtype: dict(str, str) + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this Body12. + + + :param metadata: The metadata of this Body12. # noqa: E501 + :type: dict(str, str) + """ + + self._metadata = metadata + + @property + def nics(self): + """Gets the nics of this Body12. # noqa: E501 + + + :return: The nics of this Body12. # noqa: E501 + :rtype: list[CreateVMRequestNIC] + """ + return self._nics + + @nics.setter + def nics(self, nics): + """Sets the nics of this Body12. + + + :param nics: The nics of this Body12. # noqa: E501 + :type: list[CreateVMRequestNIC] + """ + + self._nics = nics + + @property + def password(self): + """Gets the password of this Body12. # noqa: E501 + + + :return: The password of this Body12. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this Body12. + + + :param password: The password of this Body12. # noqa: E501 + :type: str + """ + + self._password = password + + @property + def security_group_ids(self): + """Gets the security_group_ids of this Body12. # noqa: E501 + + + :return: The security_group_ids of this Body12. # 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 Body12. + + + :param security_group_ids: The security_group_ids of this Body12. # noqa: E501 + :type: list[str] + """ + + self._security_group_ids = security_group_ids + + @property + def ssh_key_source(self): + """Gets the ssh_key_source of this Body12. # noqa: E501 + + + :return: The ssh_key_source of this Body12. # 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 Body12. + + + :param ssh_key_source: The ssh_key_source of this Body12. # noqa: E501 + :type: SshKeySource + """ + + self._ssh_key_source = ssh_key_source + + @property + def start_script(self): + """Gets the start_script of this Body12. # noqa: E501 + + + :return: The start_script of this Body12. # noqa: E501 + :rtype: str + """ + return self._start_script + + @start_script.setter + def start_script(self, start_script): + """Sets the start_script of this Body12. + + + :param start_script: The start_script of this Body12. # noqa: E501 + :type: str + """ + + self._start_script = start_script + + @property + def storage_disk_ids(self): + """Gets the storage_disk_ids of this Body12. # noqa: E501 + + + :return: The storage_disk_ids of this Body12. # 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 Body12. + + + :param storage_disk_ids: The storage_disk_ids of this Body12. # noqa: E501 + :type: list[str] + """ + + self._storage_disk_ids = storage_disk_ids + + @property + def vcpus(self): + """Gets the vcpus of this Body12. # noqa: E501 + + + :return: The vcpus of this Body12. # noqa: E501 + :rtype: int + """ + return self._vcpus + + @vcpus.setter + def vcpus(self, vcpus): + """Sets the vcpus of this Body12. + + + :param vcpus: The vcpus of this Body12. # noqa: E501 + :type: int + """ + + self._vcpus = vcpus + + @property + def vm_id(self): + """Gets the vm_id of this Body12. # noqa: E501 + + + :return: The vm_id of this Body12. # noqa: E501 + :rtype: str + """ + return self._vm_id + + @vm_id.setter + def vm_id(self, vm_id): + """Sets the vm_id of this Body12. + + + :param vm_id: The vm_id of this Body12. # 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(Body12, 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, Body12): + 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, Body12): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/src/cudo_compute/models/body2.py b/docs/src/cudo_compute/models/body2.py index 5879070..4765ae7 100644 --- a/docs/src/cudo_compute/models/body2.py +++ b/docs/src/cudo_compute/models/body2.py @@ -33,58 +33,58 @@ class Body2(object): and the value is json key in definition. """ swagger_types = { - 'billing_account_id': 'str', + 'data_center_id': 'str', 'project_id': 'str', 'role': 'Role', - 'user_email': 'str' + 'user_id': 'str' } attribute_map = { - 'billing_account_id': 'billingAccountId', + 'data_center_id': 'dataCenterId', 'project_id': 'projectId', 'role': 'role', - 'user_email': 'userEmail' + 'user_id': 'userId' } - def __init__(self, billing_account_id=None, project_id=None, role=None, user_email=None, _configuration=None): # noqa: E501 + def __init__(self, data_center_id=None, project_id=None, role=None, user_id=None, _configuration=None): # noqa: E501 """Body2 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration - self._billing_account_id = None + self._data_center_id = None self._project_id = None self._role = None - self._user_email = None + self._user_id = None self.discriminator = None - if billing_account_id is not None: - self.billing_account_id = billing_account_id + if data_center_id is not None: + self.data_center_id = data_center_id if project_id is not None: self.project_id = project_id self.role = role - self.user_email = user_email + self.user_id = user_id @property - def billing_account_id(self): - """Gets the billing_account_id of this Body2. # noqa: E501 + def data_center_id(self): + """Gets the data_center_id of this Body2. # noqa: E501 - :return: The billing_account_id of this Body2. # noqa: E501 + :return: The data_center_id of this Body2. # noqa: E501 :rtype: str """ - return self._billing_account_id + return self._data_center_id - @billing_account_id.setter - def billing_account_id(self, billing_account_id): - """Sets the billing_account_id of this Body2. + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this Body2. - :param billing_account_id: The billing_account_id of this Body2. # noqa: E501 + :param data_center_id: The data_center_id of this Body2. # noqa: E501 :type: str """ - self._billing_account_id = billing_account_id + self._data_center_id = data_center_id @property def project_id(self): @@ -131,27 +131,27 @@ def role(self, role): self._role = role @property - def user_email(self): - """Gets the user_email of this Body2. # noqa: E501 + def user_id(self): + """Gets the user_id of this Body2. # noqa: E501 - :return: The user_email of this Body2. # noqa: E501 + :return: The user_id of this Body2. # noqa: E501 :rtype: str """ - return self._user_email + return self._user_id - @user_email.setter - def user_email(self, user_email): - """Sets the user_email of this Body2. + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Body2. - :param user_email: The user_email of this Body2. # noqa: E501 + :param user_id: The user_id of this Body2. # 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 + 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_email = user_email + self._user_id = user_id def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body3.py b/docs/src/cudo_compute/models/body3.py index d33405f..5d0f678 100644 --- a/docs/src/cudo_compute/models/body3.py +++ b/docs/src/cudo_compute/models/body3.py @@ -36,17 +36,17 @@ class Body3(object): 'billing_account_id': 'str', 'project_id': 'str', 'role': 'Role', - 'user_id': 'str' + 'user_email': 'str' } attribute_map = { 'billing_account_id': 'billingAccountId', 'project_id': 'projectId', 'role': 'role', - 'user_id': 'userId' + 'user_email': 'userEmail' } - def __init__(self, billing_account_id=None, project_id=None, role=None, user_id=None, _configuration=None): # noqa: E501 + def __init__(self, billing_account_id=None, project_id=None, role=None, user_email=None, _configuration=None): # noqa: E501 """Body3 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() @@ -55,7 +55,7 @@ def __init__(self, billing_account_id=None, project_id=None, role=None, user_id= self._billing_account_id = None self._project_id = None self._role = None - self._user_id = None + self._user_email = None self.discriminator = None if billing_account_id is not None: @@ -63,7 +63,7 @@ def __init__(self, billing_account_id=None, project_id=None, role=None, user_id= if project_id is not None: self.project_id = project_id self.role = role - self.user_id = user_id + self.user_email = user_email @property def billing_account_id(self): @@ -131,27 +131,27 @@ def role(self, role): self._role = role @property - def user_id(self): - """Gets the user_id of this Body3. # noqa: E501 + def user_email(self): + """Gets the user_email of this Body3. # noqa: E501 - :return: The user_id of this Body3. # noqa: E501 + :return: The user_email of this Body3. # noqa: E501 :rtype: str """ - return self._user_id + return self._user_email - @user_id.setter - def user_id(self, user_id): - """Sets the user_id of this Body3. + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this Body3. - :param user_id: The user_id of this Body3. # noqa: E501 + :param user_email: The user_email of this Body3. # 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 + 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_id = user_id + self._user_email = user_email def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body4.py b/docs/src/cudo_compute/models/body4.py index db39eb1..8362d64 100644 --- a/docs/src/cudo_compute/models/body4.py +++ b/docs/src/cudo_compute/models/body4.py @@ -34,36 +34,36 @@ class Body4(object): """ swagger_types = { 'billing_account_id': 'str', - 'data_center_id': 'str', + 'project_id': 'str', 'role': 'Role', - 'user_email': 'str' + 'user_id': 'str' } attribute_map = { 'billing_account_id': 'billingAccountId', - 'data_center_id': 'dataCenterId', + 'project_id': 'projectId', 'role': 'role', - 'user_email': 'userEmail' + 'user_id': 'userId' } - def __init__(self, billing_account_id=None, data_center_id=None, role=None, user_email=None, _configuration=None): # noqa: E501 + def __init__(self, billing_account_id=None, project_id=None, role=None, user_id=None, _configuration=None): # noqa: E501 """Body4 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration self._billing_account_id = None - self._data_center_id = None + self._project_id = None self._role = None - self._user_email = None + self._user_id = None self.discriminator = None if billing_account_id is not None: self.billing_account_id = billing_account_id - if data_center_id is not None: - self.data_center_id = data_center_id + if project_id is not None: + self.project_id = project_id self.role = role - self.user_email = user_email + self.user_id = user_id @property def billing_account_id(self): @@ -87,25 +87,25 @@ def billing_account_id(self, billing_account_id): self._billing_account_id = billing_account_id @property - def data_center_id(self): - """Gets the data_center_id of this Body4. # noqa: E501 + def project_id(self): + """Gets the project_id of this Body4. # noqa: E501 - :return: The data_center_id of this Body4. # noqa: E501 + :return: The project_id of this Body4. # noqa: E501 :rtype: str """ - return self._data_center_id + return self._project_id - @data_center_id.setter - def data_center_id(self, data_center_id): - """Sets the data_center_id of this Body4. + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this Body4. - :param data_center_id: The data_center_id of this Body4. # noqa: E501 + :param project_id: The project_id of this Body4. # noqa: E501 :type: str """ - self._data_center_id = data_center_id + self._project_id = project_id @property def role(self): @@ -131,27 +131,27 @@ def role(self, role): self._role = role @property - def user_email(self): - """Gets the user_email of this Body4. # noqa: E501 + def user_id(self): + """Gets the user_id of this Body4. # noqa: E501 - :return: The user_email of this Body4. # noqa: E501 + :return: The user_id of this Body4. # noqa: E501 :rtype: str """ - return self._user_email + return self._user_id - @user_email.setter - def user_email(self, user_email): - """Sets the user_email of this Body4. + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Body4. - :param user_email: The user_email of this Body4. # noqa: E501 + :param user_id: The user_id of this Body4. # 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 + 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_email = user_email + self._user_id = user_id def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body5.py b/docs/src/cudo_compute/models/body5.py index f4a762f..66e8287 100644 --- a/docs/src/cudo_compute/models/body5.py +++ b/docs/src/cudo_compute/models/body5.py @@ -33,29 +33,58 @@ class Body5(object): and the value is json key in definition. """ swagger_types = { + 'billing_account_id': 'str', 'data_center_id': 'str', - 'disk': 'Disk' + 'role': 'Role', + 'user_email': 'str' } attribute_map = { + 'billing_account_id': 'billingAccountId', 'data_center_id': 'dataCenterId', - 'disk': 'disk' + 'role': 'role', + 'user_email': 'userEmail' } - def __init__(self, data_center_id=None, disk=None, _configuration=None): # noqa: E501 + def __init__(self, billing_account_id=None, data_center_id=None, role=None, user_email=None, _configuration=None): # noqa: E501 """Body5 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration + self._billing_account_id = None self._data_center_id = None - self._disk = None + self._role = None + self._user_email = None self.discriminator = None + if billing_account_id is not None: + self.billing_account_id = billing_account_id if data_center_id is not None: self.data_center_id = data_center_id - if disk is not None: - self.disk = disk + self.role = role + self.user_email = user_email + + @property + def billing_account_id(self): + """Gets the billing_account_id of this Body5. # noqa: E501 + + + :return: The billing_account_id of this Body5. # 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 Body5. + + + :param billing_account_id: The billing_account_id of this Body5. # noqa: E501 + :type: str + """ + + self._billing_account_id = billing_account_id @property def data_center_id(self): @@ -79,25 +108,50 @@ def data_center_id(self, data_center_id): self._data_center_id = data_center_id @property - def disk(self): - """Gets the disk of this Body5. # noqa: E501 + def role(self): + """Gets the role of this Body5. # noqa: E501 - :return: The disk of this Body5. # noqa: E501 - :rtype: Disk + :return: The role of this Body5. # noqa: E501 + :rtype: Role """ - return self._disk + return self._role - @disk.setter - def disk(self, disk): - """Sets the disk of this Body5. + @role.setter + def role(self, role): + """Sets the role of this Body5. - :param disk: The disk of this Body5. # noqa: E501 - :type: Disk + :param role: The role of this Body5. # 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 + + @property + def user_email(self): + """Gets the user_email of this Body5. # noqa: E501 + + + :return: The user_email of this Body5. # noqa: E501 + :rtype: str + """ + return self._user_email + + @user_email.setter + def user_email(self, user_email): + """Sets the user_email of this Body5. + + + :param user_email: The user_email of this Body5. # 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._disk = disk + self._user_email = user_email def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body6.py b/docs/src/cudo_compute/models/body6.py index 17679b6..fb299e2 100644 --- a/docs/src/cudo_compute/models/body6.py +++ b/docs/src/cudo_compute/models/body6.py @@ -33,73 +33,71 @@ class Body6(object): and the value is json key in definition. """ swagger_types = { - 'snapshot_id': 'str', - 'vm_id': 'str' + 'data_center_id': 'str', + 'disk': 'Disk' } attribute_map = { - 'snapshot_id': 'snapshotId', - 'vm_id': 'vmId' + 'data_center_id': 'dataCenterId', + 'disk': 'disk' } - def __init__(self, snapshot_id=None, vm_id=None, _configuration=None): # noqa: E501 + def __init__(self, data_center_id=None, disk=None, _configuration=None): # noqa: E501 """Body6 - 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._data_center_id = None + self._disk = None self.discriminator = None - self.snapshot_id = snapshot_id - self.vm_id = vm_id + if data_center_id is not None: + self.data_center_id = data_center_id + if disk is not None: + self.disk = disk @property - def snapshot_id(self): - """Gets the snapshot_id of this Body6. # noqa: E501 + def data_center_id(self): + """Gets the data_center_id of this Body6. # noqa: E501 - :return: The snapshot_id of this Body6. # noqa: E501 + :return: The data_center_id of this Body6. # noqa: E501 :rtype: str """ - return self._snapshot_id + return self._data_center_id - @snapshot_id.setter - def snapshot_id(self, snapshot_id): - """Sets the snapshot_id of this Body6. + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this Body6. - :param snapshot_id: The snapshot_id of this Body6. # noqa: E501 + :param data_center_id: The data_center_id of this Body6. # 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 + self._data_center_id = data_center_id @property - def vm_id(self): - """Gets the vm_id of this Body6. # noqa: E501 + def disk(self): + """Gets the disk of this Body6. # noqa: E501 - :return: The vm_id of this Body6. # noqa: E501 - :rtype: str + :return: The disk of this Body6. # noqa: E501 + :rtype: Disk """ - return self._vm_id + return self._disk - @vm_id.setter - def vm_id(self, vm_id): - """Sets the vm_id of this Body6. + @disk.setter + def disk(self, disk): + """Sets the disk of this Body6. - :param vm_id: The vm_id of this Body6. # noqa: E501 - :type: str + :param disk: The disk of this Body6. # noqa: E501 + :type: Disk """ - 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 + self._disk = disk def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body7.py b/docs/src/cudo_compute/models/body7.py index d7e2621..10f58d2 100644 --- a/docs/src/cudo_compute/models/body7.py +++ b/docs/src/cudo_compute/models/body7.py @@ -33,153 +33,73 @@ class Body7(object): and the value is json key in definition. """ swagger_types = { - 'cidr_prefix': 'str', - 'data_center_id': 'str', - 'id': 'str', - 'network_id': 'str', - 'vrouter_size': 'VRouterSize' + 'snapshot_id': 'str', + 'vm_id': 'str' } attribute_map = { - 'cidr_prefix': 'cidrPrefix', - 'data_center_id': 'dataCenterId', - 'id': 'id', - 'network_id': 'networkId', - 'vrouter_size': 'vrouterSize' + 'snapshot_id': 'snapshotId', + 'vm_id': 'vmId' } - def __init__(self, cidr_prefix=None, data_center_id=None, id=None, network_id=None, vrouter_size=None, _configuration=None): # noqa: E501 + def __init__(self, snapshot_id=None, vm_id=None, _configuration=None): # noqa: E501 """Body7 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration - self._cidr_prefix = None - self._data_center_id = None - self._id = None - self._network_id = None - self._vrouter_size = None + self._snapshot_id = None + self._vm_id = None self.discriminator = None - self.cidr_prefix = cidr_prefix - self.data_center_id = data_center_id - self.id = id - self.network_id = network_id - if vrouter_size is not None: - self.vrouter_size = vrouter_size + self.snapshot_id = snapshot_id + self.vm_id = vm_id @property - def cidr_prefix(self): - """Gets the cidr_prefix of this Body7. # noqa: E501 + def snapshot_id(self): + """Gets the snapshot_id of this Body7. # noqa: E501 - :return: The cidr_prefix of this Body7. # noqa: E501 + :return: The snapshot_id of this Body7. # noqa: E501 :rtype: str """ - return self._cidr_prefix + return self._snapshot_id - @cidr_prefix.setter - def cidr_prefix(self, cidr_prefix): - """Sets the cidr_prefix of this Body7. + @snapshot_id.setter + def snapshot_id(self, snapshot_id): + """Sets the snapshot_id of this Body7. - :param cidr_prefix: The cidr_prefix of this Body7. # noqa: E501 + :param snapshot_id: The snapshot_id of this Body7. # 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 + 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._cidr_prefix = cidr_prefix + self._snapshot_id = snapshot_id @property - def data_center_id(self): - """Gets the data_center_id of this Body7. # noqa: E501 + def vm_id(self): + """Gets the vm_id of this Body7. # noqa: E501 - :return: The data_center_id of this Body7. # noqa: E501 + :return: The vm_id of this Body7. # noqa: E501 :rtype: str """ - return self._data_center_id + return self._vm_id - @data_center_id.setter - def data_center_id(self, data_center_id): - """Sets the data_center_id of this Body7. + @vm_id.setter + def vm_id(self, vm_id): + """Sets the vm_id of this Body7. - :param data_center_id: The data_center_id of this Body7. # noqa: E501 + :param vm_id: The vm_id of this Body7. # 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 + 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._data_center_id = data_center_id - - @property - def id(self): - """Gets the id of this Body7. # noqa: E501 - - - :return: The id of this Body7. # noqa: E501 - :rtype: str - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Body7. - - - :param id: The id of this Body7. # 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 network_id(self): - """Gets the network_id of this Body7. # noqa: E501 - - - :return: The network_id of this Body7. # noqa: E501 - :rtype: str - """ - return self._network_id - - @network_id.setter - def network_id(self, network_id): - """Sets the network_id of this Body7. - - - :param network_id: The network_id of this Body7. # noqa: E501 - :type: str - """ - if self._configuration.client_side_validation and network_id is None: - raise ValueError("Invalid value for `network_id`, must not be `None`") # noqa: E501 - - self._network_id = network_id - - @property - def vrouter_size(self): - """Gets the vrouter_size of this Body7. # noqa: E501 - - - :return: The vrouter_size of this Body7. # noqa: E501 - :rtype: VRouterSize - """ - return self._vrouter_size - - @vrouter_size.setter - def vrouter_size(self, vrouter_size): - """Sets the vrouter_size of this Body7. - - - :param vrouter_size: The vrouter_size of this Body7. # noqa: E501 - :type: VRouterSize - """ - - self._vrouter_size = vrouter_size + self._vm_id = vm_id def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/body8.py b/docs/src/cudo_compute/models/body8.py index 3ec0419..72e488b 100644 --- a/docs/src/cudo_compute/models/body8.py +++ b/docs/src/cudo_compute/models/body8.py @@ -33,24 +33,63 @@ class Body8(object): and the value is json key in definition. """ swagger_types = { - 'data_center_id': 'str' + 'cidr_prefix': 'str', + 'data_center_id': 'str', + 'id': 'str', + 'network_id': 'str', + 'vrouter_size': 'VRouterSize' } attribute_map = { - 'data_center_id': 'dataCenterId' + 'cidr_prefix': 'cidrPrefix', + 'data_center_id': 'dataCenterId', + 'id': 'id', + 'network_id': 'networkId', + 'vrouter_size': 'vrouterSize' } - def __init__(self, data_center_id=None, _configuration=None): # noqa: E501 + def __init__(self, cidr_prefix=None, data_center_id=None, id=None, network_id=None, vrouter_size=None, _configuration=None): # noqa: E501 """Body8 - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration + self._cidr_prefix = None self._data_center_id = None + self._id = None + self._network_id = None + self._vrouter_size = None self.discriminator = None - if data_center_id is not None: - self.data_center_id = data_center_id + self.cidr_prefix = cidr_prefix + self.data_center_id = data_center_id + self.id = id + self.network_id = network_id + if vrouter_size is not None: + self.vrouter_size = vrouter_size + + @property + def cidr_prefix(self): + """Gets the cidr_prefix of this Body8. # noqa: E501 + + + :return: The cidr_prefix of this Body8. # noqa: E501 + :rtype: str + """ + return self._cidr_prefix + + @cidr_prefix.setter + def cidr_prefix(self, cidr_prefix): + """Sets the cidr_prefix of this Body8. + + + :param cidr_prefix: The cidr_prefix of this Body8. # 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 data_center_id(self): @@ -70,9 +109,78 @@ def data_center_id(self, data_center_id): :param data_center_id: The data_center_id of this Body8. # 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 Body8. # noqa: E501 + + + :return: The id of this Body8. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Body8. + + + :param id: The id of this Body8. # 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 network_id(self): + """Gets the network_id of this Body8. # noqa: E501 + + + :return: The network_id of this Body8. # noqa: E501 + :rtype: str + """ + return self._network_id + + @network_id.setter + def network_id(self, network_id): + """Sets the network_id of this Body8. + + + :param network_id: The network_id of this Body8. # noqa: E501 + :type: str + """ + if self._configuration.client_side_validation and network_id is None: + raise ValueError("Invalid value for `network_id`, must not be `None`") # noqa: E501 + + self._network_id = network_id + + @property + def vrouter_size(self): + """Gets the vrouter_size of this Body8. # noqa: E501 + + + :return: The vrouter_size of this Body8. # noqa: E501 + :rtype: VRouterSize + """ + return self._vrouter_size + + @vrouter_size.setter + def vrouter_size(self, vrouter_size): + """Sets the vrouter_size of this Body8. + + + :param vrouter_size: The vrouter_size of this Body8. # noqa: E501 + :type: VRouterSize + """ + + self._vrouter_size = vrouter_size + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/docs/src/cudo_compute/models/body9.py b/docs/src/cudo_compute/models/body9.py index ecd5242..f4cdafb 100644 --- a/docs/src/cudo_compute/models/body9.py +++ b/docs/src/cudo_compute/models/body9.py @@ -33,45 +33,45 @@ class Body9(object): and the value is json key in definition. """ swagger_types = { - 'id': 'str' + 'data_center_id': 'str' } attribute_map = { - 'id': 'id' + 'data_center_id': 'dataCenterId' } - def __init__(self, id=None, _configuration=None): # noqa: E501 + def __init__(self, data_center_id=None, _configuration=None): # noqa: E501 """Body9 - 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.discriminator = None - if id is not None: - self.id = id + if data_center_id is not None: + self.data_center_id = data_center_id @property - def id(self): - """Gets the id of this Body9. # noqa: E501 + def data_center_id(self): + """Gets the data_center_id of this Body9. # noqa: E501 - :return: The id of this Body9. # noqa: E501 + :return: The data_center_id of this Body9. # noqa: E501 :rtype: str """ - return self._id + return self._data_center_id - @id.setter - def id(self, id): - """Sets the id of this Body9. + @data_center_id.setter + def data_center_id(self, data_center_id): + """Sets the data_center_id of this Body9. - :param id: The id of this Body9. # noqa: E501 + :param data_center_id: The data_center_id of this Body9. # noqa: E501 :type: str """ - self._id = id + self._data_center_id = data_center_id def to_dict(self): """Returns the model properties as a dict""" diff --git a/docs/src/cudo_compute/models/cluster.py b/docs/src/cudo_compute/models/cluster.py new file mode 100644 index 0000000..a8723de --- /dev/null +++ b/docs/src/cudo_compute/models/cluster.py @@ -0,0 +1,718 @@ +# 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 = { + 'cpu_model': 'str', + 'create_time': 'datetime', + 'gpu_free': 'int', + 'gpu_model': 'str', + 'gpu_model_pci_types': 'list[str]', + 'gpu_price_hr': 'Decimal', + 'gpu_used': 'int', + 'host_count': 'int', + 'host_problem_count': 'int', + 'machine_type': 'str', + 'max_vcpu_per_gpu': 'float', + 'max_vcpu_per_memory_gib': 'float', + 'memory_gib_free': 'int', + 'memory_gib_price_hr': 'Decimal', + 'memory_gib_used': 'int', + 'min_vcpu_per_gpu': 'float', + 'min_vcpu_per_memory_gib': 'float', + 'update_time': 'datetime', + 'vcpu_free': 'int', + 'vcpu_per_cpu_thread': 'int', + 'vcpu_price_hr': 'Decimal', + 'vcpu_used': 'int', + 'vm_count': 'int' + } + + attribute_map = { + 'cpu_model': 'cpuModel', + 'create_time': 'createTime', + 'gpu_free': 'gpuFree', + 'gpu_model': 'gpuModel', + 'gpu_model_pci_types': 'gpuModelPciTypes', + 'gpu_price_hr': 'gpuPriceHr', + 'gpu_used': 'gpuUsed', + 'host_count': 'hostCount', + 'host_problem_count': 'hostProblemCount', + 'machine_type': 'machineType', + 'max_vcpu_per_gpu': 'maxVcpuPerGpu', + 'max_vcpu_per_memory_gib': 'maxVcpuPerMemoryGib', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_price_hr': 'memoryGibPriceHr', + 'memory_gib_used': 'memoryGibUsed', + 'min_vcpu_per_gpu': 'minVcpuPerGpu', + 'min_vcpu_per_memory_gib': 'minVcpuPerMemoryGib', + 'update_time': 'updateTime', + 'vcpu_free': 'vcpuFree', + 'vcpu_per_cpu_thread': 'vcpuPerCpuThread', + 'vcpu_price_hr': 'vcpuPriceHr', + 'vcpu_used': 'vcpuUsed', + 'vm_count': 'vmCount' + } + + def __init__(self, cpu_model=None, create_time=None, gpu_free=None, gpu_model=None, gpu_model_pci_types=None, gpu_price_hr=None, gpu_used=None, host_count=None, host_problem_count=None, machine_type=None, max_vcpu_per_gpu=None, max_vcpu_per_memory_gib=None, memory_gib_free=None, memory_gib_price_hr=None, memory_gib_used=None, min_vcpu_per_gpu=None, min_vcpu_per_memory_gib=None, update_time=None, vcpu_free=None, vcpu_per_cpu_thread=None, vcpu_price_hr=None, vcpu_used=None, vm_count=None, _configuration=None): # noqa: E501 + """Cluster - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._cpu_model = None + self._create_time = None + self._gpu_free = None + self._gpu_model = None + self._gpu_model_pci_types = None + self._gpu_price_hr = None + self._gpu_used = None + self._host_count = None + self._host_problem_count = None + self._machine_type = None + self._max_vcpu_per_gpu = None + self._max_vcpu_per_memory_gib = None + self._memory_gib_free = None + self._memory_gib_price_hr = None + self._memory_gib_used = None + self._min_vcpu_per_gpu = None + self._min_vcpu_per_memory_gib = None + self._update_time = None + self._vcpu_free = None + self._vcpu_per_cpu_thread = None + self._vcpu_price_hr = None + self._vcpu_used = None + self._vm_count = None + self.discriminator = None + + self.cpu_model = cpu_model + self.create_time = create_time + self.gpu_free = gpu_free + self.gpu_model = gpu_model + self.gpu_model_pci_types = gpu_model_pci_types + self.gpu_price_hr = gpu_price_hr + self.gpu_used = gpu_used + self.host_count = host_count + self.host_problem_count = host_problem_count + self.machine_type = machine_type + self.max_vcpu_per_gpu = max_vcpu_per_gpu + self.max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + self.memory_gib_free = memory_gib_free + self.memory_gib_price_hr = memory_gib_price_hr + self.memory_gib_used = memory_gib_used + self.min_vcpu_per_gpu = min_vcpu_per_gpu + self.min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + self.update_time = update_time + self.vcpu_free = vcpu_free + self.vcpu_per_cpu_thread = vcpu_per_cpu_thread + self.vcpu_price_hr = vcpu_price_hr + self.vcpu_used = vcpu_used + self.vm_count = vm_count + + @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 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 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_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_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 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 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 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 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 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 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_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 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 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 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 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 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_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 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 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 + + 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/src/cudo_compute/models/count_hosts_response.py b/docs/src/cudo_compute/models/count_hosts_response.py new file mode 100644 index 0000000..da672b2 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/create_billing_account_request.py b/docs/src/cudo_compute/models/create_billing_account_request.py new file mode 100644 index 0000000..6d96152 --- /dev/null +++ b/docs/src/cudo_compute/models/create_billing_account_request.py @@ -0,0 +1,230 @@ +# 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', + 'email': 'str', + 'invoice_name': 'str', + 'referral': 'str', + 'tax_ids': 'list[TaxId]' + } + + attribute_map = { + 'display_name': 'displayName', + 'email': 'email', + 'invoice_name': 'invoiceName', + 'referral': 'referral', + 'tax_ids': 'taxIds' + } + + def __init__(self, display_name=None, email=None, invoice_name=None, referral=None, tax_ids=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._email = None + self._invoice_name = None + self._referral = None + self._tax_ids = None + self.discriminator = None + + self.display_name = display_name + self.email = email + self.invoice_name = invoice_name + if referral is not None: + self.referral = referral + if tax_ids is not None: + self.tax_ids = tax_ids + + @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 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 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 + """ + if self._configuration.client_side_validation and invoice_name is None: + raise ValueError("Invalid value for `invoice_name`, must not be `None`") # noqa: E501 + + self._invoice_name = invoice_name + + @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 tax_ids(self): + """Gets the tax_ids of this CreateBillingAccountRequest. # noqa: E501 + + + :return: The tax_ids of this CreateBillingAccountRequest. # noqa: E501 + :rtype: list[TaxId] + """ + return self._tax_ids + + @tax_ids.setter + def tax_ids(self, tax_ids): + """Sets the tax_ids of this CreateBillingAccountRequest. + + + :param tax_ids: The tax_ids of this CreateBillingAccountRequest. # noqa: E501 + :type: list[TaxId] + """ + + self._tax_ids = tax_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(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/src/cudo_compute/models/data_center.py b/docs/src/cudo_compute/models/data_center.py new file mode 100644 index 0000000..03c369a --- /dev/null +++ b/docs/src/cudo_compute/models/data_center.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 DataCenter(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_by': 'str', + 'lng_lat': 'Point', + 'one_frontend_id': 'str', + 'region_id': 'str', + 'renewable_energy': 'bool', + 'supplier_name': 'str' + } + + attribute_map = { + 'create_by': 'createBy', + 'lng_lat': 'lngLat', + 'one_frontend_id': 'oneFrontendId', + 'region_id': 'regionId', + 'renewable_energy': 'renewableEnergy', + 'supplier_name': 'supplierName' + } + + def __init__(self, create_by=None, lng_lat=None, one_frontend_id=None, region_id=None, renewable_energy=None, supplier_name=None, _configuration=None): # noqa: E501 + """DataCenter - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._create_by = None + self._lng_lat = None + self._one_frontend_id = None + self._region_id = None + self._renewable_energy = None + self._supplier_name = None + self.discriminator = None + + if create_by is not None: + self.create_by = create_by + if lng_lat is not None: + self.lng_lat = lng_lat + self.one_frontend_id = one_frontend_id + if region_id is not None: + self.region_id = region_id + if renewable_energy is not None: + self.renewable_energy = renewable_energy + if supplier_name is not None: + self.supplier_name = supplier_name + + @property + def create_by(self): + """Gets the create_by of this DataCenter. # noqa: E501 + + + :return: The create_by of this DataCenter. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this DataCenter. + + + :param create_by: The create_by of this DataCenter. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def lng_lat(self): + """Gets the lng_lat of this DataCenter. # noqa: E501 + + + :return: The lng_lat of this DataCenter. # noqa: E501 + :rtype: Point + """ + return self._lng_lat + + @lng_lat.setter + def lng_lat(self, lng_lat): + """Sets the lng_lat of this DataCenter. + + + :param lng_lat: The lng_lat of this DataCenter. # noqa: E501 + :type: Point + """ + + self._lng_lat = lng_lat + + @property + def one_frontend_id(self): + """Gets the one_frontend_id of this DataCenter. # noqa: E501 + + + :return: The one_frontend_id of this DataCenter. # 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 DataCenter. + + + :param one_frontend_id: The one_frontend_id of this DataCenter. # 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 region_id(self): + """Gets the region_id of this DataCenter. # noqa: E501 + + + :return: The region_id of this DataCenter. # noqa: E501 + :rtype: str + """ + return self._region_id + + @region_id.setter + def region_id(self, region_id): + """Sets the region_id of this DataCenter. + + + :param region_id: The region_id of this DataCenter. # noqa: E501 + :type: str + """ + + self._region_id = region_id + + @property + def renewable_energy(self): + """Gets the renewable_energy of this DataCenter. # noqa: E501 + + + :return: The renewable_energy of this DataCenter. # noqa: E501 + :rtype: bool + """ + return self._renewable_energy + + @renewable_energy.setter + def renewable_energy(self, renewable_energy): + """Sets the renewable_energy of this DataCenter. + + + :param renewable_energy: The renewable_energy of this DataCenter. # noqa: E501 + :type: bool + """ + + self._renewable_energy = renewable_energy + + @property + def supplier_name(self): + """Gets the supplier_name of this DataCenter. # noqa: E501 + + + :return: The supplier_name of this DataCenter. # noqa: E501 + :rtype: str + """ + return self._supplier_name + + @supplier_name.setter + def supplier_name(self, supplier_name): + """Sets the supplier_name of this DataCenter. + + + :param supplier_name: The supplier_name of this DataCenter. # noqa: E501 + :type: str + """ + + self._supplier_name = supplier_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(DataCenter, 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, DataCenter): + 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, DataCenter): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/src/cudo_compute/models/data_center_revenue_resource.py b/docs/src/cudo_compute/models/data_center_revenue_resource.py new file mode 100644 index 0000000..e1bd11a --- /dev/null +++ b/docs/src/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 = { + 'quantity': 'Decimal', + 'resource_id': 'str', + 'resource_type': 'str', + 'revenue_usd': 'Decimal', + 'unit': 'str' + } + + attribute_map = { + 'quantity': 'quantity', + 'resource_id': 'resourceId', + 'resource_type': 'resourceType', + 'revenue_usd': 'revenueUsd', + 'unit': 'unit' + } + + def __init__(self, quantity=None, resource_id=None, resource_type=None, revenue_usd=None, unit=None, _configuration=None): # noqa: E501 + """DataCenterRevenueResource - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._quantity = None + self._resource_id = None + self._resource_type = None + self._revenue_usd = None + self._unit = None + self.discriminator = None + + self.quantity = quantity + self.resource_id = resource_id + self.resource_type = resource_type + self.revenue_usd = revenue_usd + self.unit = unit + + @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 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 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 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 + + @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 + + 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/src/cudo_compute/models/data_center_time_revenue.py b/docs/src/cudo_compute/models/data_center_time_revenue.py new file mode 100644 index 0000000..91e096f --- /dev/null +++ b/docs/src/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 = { + 'revenue_usd': 'Decimal', + 'time': 'datetime' + } + + attribute_map = { + 'revenue_usd': 'revenueUsd', + 'time': 'time' + } + + def __init__(self, revenue_usd=None, time=None, _configuration=None): # noqa: E501 + """DataCenterTimeRevenue - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._revenue_usd = None + self._time = None + self.discriminator = None + + self.revenue_usd = revenue_usd + 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 + + @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 + + 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/src/cudo_compute/models/detach_security_group_response.py b/docs/src/cudo_compute/models/detach_security_group_response.py new file mode 100644 index 0000000..135cfc9 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/get_billing_account_details_response.py b/docs/src/cudo_compute/models/get_billing_account_details_response.py new file mode 100644 index 0000000..d9f7bcd --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/get_billing_account_spend_details_response.py b/docs/src/cudo_compute/models/get_billing_account_spend_details_response.py new file mode 100644 index 0000000..0ba954a --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/get_billing_account_stripe_invoices_response.py b/docs/src/cudo_compute/models/get_billing_account_stripe_invoices_response.py new file mode 100644 index 0000000..6cdca58 --- /dev/null +++ b/docs/src/cudo_compute/models/get_billing_account_stripe_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 GetBillingAccountStripeInvoicesResponse(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 = { + 'has_more': 'bool', + 'invoices': 'list[Invoice]' + } + + attribute_map = { + 'has_more': 'hasMore', + 'invoices': 'invoices' + } + + def __init__(self, has_more=None, invoices=None, _configuration=None): # noqa: E501 + """GetBillingAccountStripeInvoicesResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._has_more = None + self._invoices = None + self.discriminator = None + + self.has_more = has_more + self.invoices = invoices + + @property + def has_more(self): + """Gets the has_more of this GetBillingAccountStripeInvoicesResponse. # noqa: E501 + + + :return: The has_more of this GetBillingAccountStripeInvoicesResponse. # noqa: E501 + :rtype: bool + """ + return self._has_more + + @has_more.setter + def has_more(self, has_more): + """Sets the has_more of this GetBillingAccountStripeInvoicesResponse. + + + :param has_more: The has_more of this GetBillingAccountStripeInvoicesResponse. # 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 + + @property + def invoices(self): + """Gets the invoices of this GetBillingAccountStripeInvoicesResponse. # noqa: E501 + + + :return: The invoices of this GetBillingAccountStripeInvoicesResponse. # noqa: E501 + :rtype: list[Invoice] + """ + return self._invoices + + @invoices.setter + def invoices(self, invoices): + """Sets the invoices of this GetBillingAccountStripeInvoicesResponse. + + + :param invoices: The invoices of this GetBillingAccountStripeInvoicesResponse. # 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(GetBillingAccountStripeInvoicesResponse, 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, GetBillingAccountStripeInvoicesResponse): + 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, GetBillingAccountStripeInvoicesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/src/cudo_compute/models/get_data_center_live_utilization_response.py b/docs/src/cudo_compute/models/get_data_center_live_utilization_response.py new file mode 100644 index 0000000..1670700 --- /dev/null +++ b/docs/src/cudo_compute/models/get_data_center_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 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 = { + 'cpu_utilization': 'float', + 'gpu_free': 'int', + 'gpu_total': 'int', + 'gpu_used': 'int', + 'gpu_utilization': 'float', + 'memory_gib_free': 'int', + 'memory_gib_total': 'int', + 'memory_gib_used': 'int', + 'memory_utilization': 'float', + 'utilization': 'float', + 'vcpu_free': 'int', + 'vcpu_total': 'int', + 'vcpu_used': 'int' + } + + attribute_map = { + 'cpu_utilization': 'cpuUtilization', + 'gpu_free': 'gpuFree', + 'gpu_total': 'gpuTotal', + 'gpu_used': 'gpuUsed', + 'gpu_utilization': 'gpuUtilization', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_total': 'memoryGibTotal', + 'memory_gib_used': 'memoryGibUsed', + 'memory_utilization': 'memoryUtilization', + 'utilization': 'utilization', + 'vcpu_free': 'vcpuFree', + 'vcpu_total': 'vcpuTotal', + 'vcpu_used': 'vcpuUsed' + } + + def __init__(self, cpu_utilization=None, gpu_free=None, gpu_total=None, gpu_used=None, gpu_utilization=None, memory_gib_free=None, memory_gib_total=None, memory_gib_used=None, memory_utilization=None, utilization=None, vcpu_free=None, vcpu_total=None, vcpu_used=None, _configuration=None): # noqa: E501 + """GetDataCenterLiveUtilizationResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._cpu_utilization = None + self._gpu_free = None + self._gpu_total = None + self._gpu_used = None + self._gpu_utilization = None + self._memory_gib_free = None + self._memory_gib_total = None + self._memory_gib_used = None + self._memory_utilization = None + self._utilization = None + self._vcpu_free = None + self._vcpu_total = None + self._vcpu_used = None + self.discriminator = None + + self.cpu_utilization = cpu_utilization + self.gpu_free = gpu_free + self.gpu_total = gpu_total + self.gpu_used = gpu_used + self.gpu_utilization = gpu_utilization + self.memory_gib_free = memory_gib_free + self.memory_gib_total = memory_gib_total + self.memory_gib_used = memory_gib_used + self.memory_utilization = memory_utilization + self.utilization = utilization + self.vcpu_free = vcpu_free + self.vcpu_total = vcpu_total + self.vcpu_used = vcpu_used + + @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 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_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_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 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_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_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 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_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 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 + + 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/src/cudo_compute/models/get_data_center_revenue_by_resource_response.py b/docs/src/cudo_compute/models/get_data_center_revenue_by_resource_response.py new file mode 100644 index 0000000..49c19cc --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/get_data_center_revenue_time_series_response.py b/docs/src/cudo_compute/models/get_data_center_revenue_time_series_response.py new file mode 100644 index 0000000..a9dca0d --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/get_machine_type_live_utilization_response.py b/docs/src/cudo_compute/models/get_machine_type_live_utilization_response.py new file mode 100644 index 0000000..27e0990 --- /dev/null +++ b/docs/src/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 = { + 'cpu_utilization': 'float', + 'gpu_free': 'int', + 'gpu_total': 'int', + 'gpu_used': 'int', + 'gpu_utilization': 'float', + 'memory_gib_free': 'int', + 'memory_gib_total': 'int', + 'memory_gib_used': 'int', + 'memory_utilization': 'float', + 'utilization': 'float', + 'vcpu_free': 'int', + 'vcpu_total': 'int', + 'vcpu_used': 'int' + } + + attribute_map = { + 'cpu_utilization': 'cpuUtilization', + 'gpu_free': 'gpuFree', + 'gpu_total': 'gpuTotal', + 'gpu_used': 'gpuUsed', + 'gpu_utilization': 'gpuUtilization', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_total': 'memoryGibTotal', + 'memory_gib_used': 'memoryGibUsed', + 'memory_utilization': 'memoryUtilization', + 'utilization': 'utilization', + 'vcpu_free': 'vcpuFree', + 'vcpu_total': 'vcpuTotal', + 'vcpu_used': 'vcpuUsed' + } + + def __init__(self, cpu_utilization=None, gpu_free=None, gpu_total=None, gpu_used=None, gpu_utilization=None, memory_gib_free=None, memory_gib_total=None, memory_gib_used=None, memory_utilization=None, utilization=None, vcpu_free=None, vcpu_total=None, vcpu_used=None, _configuration=None): # noqa: E501 + """GetMachineTypeLiveUtilizationResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._cpu_utilization = None + self._gpu_free = None + self._gpu_total = None + self._gpu_used = None + self._gpu_utilization = None + self._memory_gib_free = None + self._memory_gib_total = None + self._memory_gib_used = None + self._memory_utilization = None + self._utilization = None + self._vcpu_free = None + self._vcpu_total = None + self._vcpu_used = None + self.discriminator = None + + self.cpu_utilization = cpu_utilization + self.gpu_free = gpu_free + self.gpu_total = gpu_total + self.gpu_used = gpu_used + self.gpu_utilization = gpu_utilization + self.memory_gib_free = memory_gib_free + self.memory_gib_total = memory_gib_total + self.memory_gib_used = memory_gib_used + self.memory_utilization = memory_utilization + self.utilization = utilization + self.vcpu_free = vcpu_free + self.vcpu_total = vcpu_total + self.vcpu_used = vcpu_used + + @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 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_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_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 + + @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_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_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 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_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 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 + + 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/src/cudo_compute/models/get_machine_type_response.py b/docs/src/cudo_compute/models/get_machine_type_response.py new file mode 100644 index 0000000..48c63d4 --- /dev/null +++ b/docs/src/cudo_compute/models/get_machine_type_response.py @@ -0,0 +1,583 @@ +# 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 = { + 'count_clusters': 'int', + 'count_hosts': 'int', + 'count_hosts_active': 'int', + 'count_hosts_inactive': 'int', + 'cpu_models': 'list[str]', + 'data_center_id': 'str', + 'gpu_models': 'list[str]', + 'machine_type': 'str', + 'max_gpu_price_hr': 'Decimal', + 'max_memory_gib_price_hr': 'Decimal', + 'max_vcpu_per_gpu': 'float', + 'max_vcpu_per_memory_gib': 'float', + 'max_vcpu_price_hr': 'Decimal', + 'min_gpu_price_hr': 'Decimal', + 'min_memory_gib_price_hr': 'Decimal', + 'min_vcpu_per_gpu': 'float', + 'min_vcpu_per_memory_gib': 'float', + 'min_vcpu_price_hr': 'Decimal' + } + + attribute_map = { + 'count_clusters': 'countClusters', + 'count_hosts': 'countHosts', + 'count_hosts_active': 'countHostsActive', + 'count_hosts_inactive': 'countHostsInactive', + 'cpu_models': 'cpuModels', + 'data_center_id': 'dataCenterId', + 'gpu_models': 'gpuModels', + 'machine_type': 'machineType', + 'max_gpu_price_hr': 'maxGpuPriceHr', + 'max_memory_gib_price_hr': 'maxMemoryGibPriceHr', + 'max_vcpu_per_gpu': 'maxVcpuPerGpu', + 'max_vcpu_per_memory_gib': 'maxVcpuPerMemoryGib', + 'max_vcpu_price_hr': 'maxVcpuPriceHr', + 'min_gpu_price_hr': 'minGpuPriceHr', + 'min_memory_gib_price_hr': 'minMemoryGibPriceHr', + 'min_vcpu_per_gpu': 'minVcpuPerGpu', + 'min_vcpu_per_memory_gib': 'minVcpuPerMemoryGib', + 'min_vcpu_price_hr': 'minVcpuPriceHr' + } + + def __init__(self, count_clusters=None, count_hosts=None, count_hosts_active=None, count_hosts_inactive=None, cpu_models=None, data_center_id=None, gpu_models=None, machine_type=None, max_gpu_price_hr=None, max_memory_gib_price_hr=None, max_vcpu_per_gpu=None, max_vcpu_per_memory_gib=None, max_vcpu_price_hr=None, min_gpu_price_hr=None, min_memory_gib_price_hr=None, min_vcpu_per_gpu=None, min_vcpu_per_memory_gib=None, min_vcpu_price_hr=None, _configuration=None): # noqa: E501 + """GetMachineTypeResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._count_clusters = None + self._count_hosts = None + self._count_hosts_active = None + self._count_hosts_inactive = None + self._cpu_models = None + self._data_center_id = None + self._gpu_models = None + self._machine_type = None + self._max_gpu_price_hr = None + self._max_memory_gib_price_hr = None + self._max_vcpu_per_gpu = None + self._max_vcpu_per_memory_gib = None + self._max_vcpu_price_hr = None + self._min_gpu_price_hr = None + self._min_memory_gib_price_hr = None + self._min_vcpu_per_gpu = None + self._min_vcpu_per_memory_gib = None + self._min_vcpu_price_hr = None + self.discriminator = None + + 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.cpu_models = cpu_models + self.data_center_id = data_center_id + self.gpu_models = gpu_models + self.machine_type = machine_type + self.max_gpu_price_hr = max_gpu_price_hr + self.max_memory_gib_price_hr = max_memory_gib_price_hr + self.max_vcpu_per_gpu = max_vcpu_per_gpu + self.max_vcpu_per_memory_gib = max_vcpu_per_memory_gib + self.max_vcpu_price_hr = max_vcpu_price_hr + self.min_gpu_price_hr = min_gpu_price_hr + self.min_memory_gib_price_hr = min_memory_gib_price_hr + self.min_vcpu_per_gpu = min_vcpu_per_gpu + self.min_vcpu_per_memory_gib = min_vcpu_per_memory_gib + self.min_vcpu_price_hr = min_vcpu_price_hr + + @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 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 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 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 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 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 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 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 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 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_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 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 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 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 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 + + 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/src/cudo_compute/models/host.py b/docs/src/cudo_compute/models/host.py new file mode 100644 index 0000000..76d2f2b --- /dev/null +++ b/docs/src/cudo_compute/models/host.py @@ -0,0 +1,502 @@ +# 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 = { + 'cpu_model': 'str', + 'create_time': 'datetime', + 'gpu_free': 'int', + 'gpu_model': 'str', + 'gpu_used': 'int', + 'machine_type': 'str', + 'memory_gib_free': 'int', + 'memory_gib_used': 'int', + 'name': 'str', + 'online': 'bool', + 'update_time': 'datetime', + 'vcpu_free': 'int', + 'vcpu_per_cpu_thread': 'int', + 'vcpu_used': 'int', + 'vm_count': 'int' + } + + attribute_map = { + 'cpu_model': 'cpuModel', + 'create_time': 'createTime', + 'gpu_free': 'gpuFree', + 'gpu_model': 'gpuModel', + 'gpu_used': 'gpuUsed', + 'machine_type': 'machineType', + 'memory_gib_free': 'memoryGibFree', + 'memory_gib_used': 'memoryGibUsed', + 'name': 'name', + 'online': 'online', + 'update_time': 'updateTime', + 'vcpu_free': 'vcpuFree', + 'vcpu_per_cpu_thread': 'vcpuPerCpuThread', + 'vcpu_used': 'vcpuUsed', + 'vm_count': 'vmCount' + } + + def __init__(self, cpu_model=None, create_time=None, gpu_free=None, gpu_model=None, gpu_used=None, machine_type=None, memory_gib_free=None, memory_gib_used=None, name=None, online=None, update_time=None, vcpu_free=None, vcpu_per_cpu_thread=None, vcpu_used=None, vm_count=None, _configuration=None): # noqa: E501 + """Host - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._cpu_model = None + self._create_time = None + self._gpu_free = None + self._gpu_model = None + self._gpu_used = None + self._machine_type = None + self._memory_gib_free = None + self._memory_gib_used = None + self._name = None + self._online = None + self._update_time = None + self._vcpu_free = None + self._vcpu_per_cpu_thread = None + self._vcpu_used = None + self._vm_count = None + self.discriminator = None + + self.cpu_model = cpu_model + self.create_time = create_time + self.gpu_free = gpu_free + self.gpu_model = gpu_model + self.gpu_used = gpu_used + self.machine_type = machine_type + self.memory_gib_free = memory_gib_free + self.memory_gib_used = memory_gib_used + self.name = name + self.online = online + self.update_time = update_time + self.vcpu_free = vcpu_free + self.vcpu_per_cpu_thread = vcpu_per_cpu_thread + self.vcpu_used = vcpu_used + self.vm_count = vm_count + + @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 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 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_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_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 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 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 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 + + @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 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 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_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 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 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 + + 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/src/cudo_compute/models/interval.py b/docs/src/cudo_compute/models/interval.py new file mode 100644 index 0000000..80479dd --- /dev/null +++ b/docs/src/cudo_compute/models/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 Interval(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 + """Interval - 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(Interval, 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, Interval): + 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, Interval): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/src/cudo_compute/models/invoice.py b/docs/src/cudo_compute/models/invoice.py new file mode 100644 index 0000000..1ea97b3 --- /dev/null +++ b/docs/src/cudo_compute/models/invoice.py @@ -0,0 +1,513 @@ +# 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 = { + 'amount_due': 'str', + 'amount_paid': 'str', + 'amount_remaining': 'str', + 'auto_advance': 'bool', + 'billing_reason': 'str', + 'created': 'str', + 'currency': 'str', + 'description': 'str', + 'due_date': 'str', + 'hosted_invoice_url': 'str', + 'id': 'str', + 'number': 'str', + 'paid_date': 'str', + 'period_end': 'str', + 'period_start': 'str', + 'status': 'str' + } + + attribute_map = { + 'amount_due': 'amountDue', + 'amount_paid': 'amountPaid', + 'amount_remaining': 'amountRemaining', + 'auto_advance': 'autoAdvance', + 'billing_reason': 'billingReason', + 'created': 'created', + 'currency': 'currency', + 'description': 'description', + 'due_date': 'dueDate', + 'hosted_invoice_url': 'hostedInvoiceUrl', + 'id': 'id', + 'number': 'number', + 'paid_date': 'paidDate', + 'period_end': 'periodEnd', + 'period_start': 'periodStart', + 'status': 'status' + } + + def __init__(self, amount_due=None, amount_paid=None, amount_remaining=None, auto_advance=None, billing_reason=None, created=None, currency=None, description=None, due_date=None, hosted_invoice_url=None, id=None, number=None, paid_date=None, period_end=None, period_start=None, status=None, _configuration=None): # noqa: E501 + """Invoice - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._amount_due = None + self._amount_paid = None + self._amount_remaining = None + self._auto_advance = None + self._billing_reason = None + self._created = None + self._currency = None + self._description = None + self._due_date = None + self._hosted_invoice_url = None + self._id = None + self._number = None + self._paid_date = None + self._period_end = None + self._period_start = None + self._status = None + self.discriminator = None + + 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 auto_advance is not None: + self.auto_advance = auto_advance + if billing_reason is not None: + self.billing_reason = billing_reason + if created is not None: + self.created = created + if currency is not None: + self.currency = currency + if description is not None: + self.description = description + if due_date is not None: + self.due_date = due_date + if hosted_invoice_url is not None: + self.hosted_invoice_url = hosted_invoice_url + if id is not None: + self.id = id + if number is not None: + self.number = number + if paid_date is not None: + self.paid_date = paid_date + if period_end is not None: + self.period_end = period_end + if period_start is not None: + self.period_start = period_start + if status is not None: + self.status = status + + @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 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 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 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 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 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 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 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 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 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 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 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 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 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 + + 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/src/cudo_compute/models/list_billing_accounts_response.py b/docs/src/cudo_compute/models/list_billing_accounts_response.py new file mode 100644 index 0000000..e15e82f --- /dev/null +++ b/docs/src/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_size': 'int', + 'page_token': 'str' + } + + attribute_map = { + 'billing_accounts': 'billingAccounts', + 'page_size': 'pageSize', + 'page_token': 'pageToken' + } + + def __init__(self, billing_accounts=None, page_size=None, page_token=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_size = None + self._page_token = None + self.discriminator = None + + self.billing_accounts = billing_accounts + self.page_size = page_size + self.page_token = page_token + + @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_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 + + @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 + + 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/src/cudo_compute/models/list_clusters_response.py b/docs/src/cudo_compute/models/list_clusters_response.py new file mode 100644 index 0000000..dc6dc36 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/list_data_centers_response.py b/docs/src/cudo_compute/models/list_data_centers_response.py new file mode 100644 index 0000000..ec1e30a --- /dev/null +++ b/docs/src/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[DataCenter]', + 'page_size': 'int', + 'page_token': 'str' + } + + attribute_map = { + 'data_centers': 'dataCenters', + 'page_size': 'pageSize', + 'page_token': 'pageToken' + } + + def __init__(self, data_centers=None, page_size=None, page_token=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_size = None + self._page_token = None + self.discriminator = None + + self.data_centers = data_centers + self.page_size = page_size + self.page_token = page_token + + @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[DataCenter] + """ + 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[DataCenter] + """ + 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_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 + + @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 + + 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/src/cudo_compute/models/list_hosts_response.py b/docs/src/cudo_compute/models/list_hosts_response.py new file mode 100644 index 0000000..151a405 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/list_machine_types_response.py b/docs/src/cudo_compute/models/list_machine_types_response.py new file mode 100644 index 0000000..f50cf53 --- /dev/null +++ b/docs/src/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[MachineType]' + } + + 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[MachineType] + """ + 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[MachineType] + """ + 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/src/cudo_compute/models/list_outstanding_stripe_invoices_response.py b/docs/src/cudo_compute/models/list_outstanding_stripe_invoices_response.py new file mode 100644 index 0000000..3331206 --- /dev/null +++ b/docs/src/cudo_compute/models/list_outstanding_stripe_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 ListOutstandingStripeInvoicesResponse(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 + """ListOutstandingStripeInvoicesResponse - 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 ListOutstandingStripeInvoicesResponse. # noqa: E501 + + + :return: The invoices of this ListOutstandingStripeInvoicesResponse. # noqa: E501 + :rtype: list[Invoice] + """ + return self._invoices + + @invoices.setter + def invoices(self, invoices): + """Sets the invoices of this ListOutstandingStripeInvoicesResponse. + + + :param invoices: The invoices of this ListOutstandingStripeInvoicesResponse. # 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(ListOutstandingStripeInvoicesResponse, 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, ListOutstandingStripeInvoicesResponse): + 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, ListOutstandingStripeInvoicesResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/src/cudo_compute/models/machine_type.py b/docs/src/cudo_compute/models/machine_type.py new file mode 100644 index 0000000..8d00262 --- /dev/null +++ b/docs/src/cudo_compute/models/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 MachineType(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_clusters': 'int', + 'count_hosts': 'int', + 'count_hosts_active': 'int', + 'count_hosts_inactive': 'int', + 'machine_type': 'str' + } + + attribute_map = { + 'count_clusters': 'countClusters', + 'count_hosts': 'countHosts', + 'count_hosts_active': 'countHostsActive', + 'count_hosts_inactive': 'countHostsInactive', + 'machine_type': 'machineType' + } + + def __init__(self, count_clusters=None, count_hosts=None, count_hosts_active=None, count_hosts_inactive=None, machine_type=None, _configuration=None): # noqa: E501 + """MachineType - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._count_clusters = None + self._count_hosts = None + self._count_hosts_active = None + self._count_hosts_inactive = None + self._machine_type = None + self.discriminator = None + + 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.machine_type = machine_type + + @property + def count_clusters(self): + """Gets the count_clusters of this MachineType. # noqa: E501 + + + :return: The count_clusters of this MachineType. # noqa: E501 + :rtype: int + """ + return self._count_clusters + + @count_clusters.setter + def count_clusters(self, count_clusters): + """Sets the count_clusters of this MachineType. + + + :param count_clusters: The count_clusters of this MachineType. # 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 MachineType. # noqa: E501 + + + :return: The count_hosts of this MachineType. # noqa: E501 + :rtype: int + """ + return self._count_hosts + + @count_hosts.setter + def count_hosts(self, count_hosts): + """Sets the count_hosts of this MachineType. + + + :param count_hosts: The count_hosts of this MachineType. # 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 MachineType. # noqa: E501 + + + :return: The count_hosts_active of this MachineType. # 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 MachineType. + + + :param count_hosts_active: The count_hosts_active of this MachineType. # 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 MachineType. # noqa: E501 + + + :return: The count_hosts_inactive of this MachineType. # 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 MachineType. + + + :param count_hosts_inactive: The count_hosts_inactive of this MachineType. # 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 machine_type(self): + """Gets the machine_type of this MachineType. # noqa: E501 + + + :return: The machine_type of this MachineType. # noqa: E501 + :rtype: str + """ + return self._machine_type + + @machine_type.setter + def machine_type(self, machine_type): + """Sets the machine_type of this MachineType. + + + :param machine_type: The machine_type of this MachineType. # 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 + + 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(MachineType, 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, MachineType): + 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, MachineType): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/src/cudo_compute/models/network.py b/docs/src/cudo_compute/models/network.py index fd637c7..0fd92a3 100644 --- a/docs/src/cudo_compute/models/network.py +++ b/docs/src/cudo_compute/models/network.py @@ -41,8 +41,7 @@ class Network(object): 'init_state': 'str', 'internal_ip_address': 'str', 'ip_range': 'str', - 'one_lcm_state': 'str', - 'one_state': 'str', + 'network_state': 'NetworkState', 'price_hr': 'Decimal', 'short_state': 'str', 'size': 'VRouterSize' @@ -57,14 +56,13 @@ class Network(object): 'init_state': 'initState', 'internal_ip_address': 'internalIpAddress', 'ip_range': 'ipRange', - 'one_lcm_state': 'oneLcmState', - 'one_state': 'oneState', + 'network_state': 'networkState', 'price_hr': 'priceHr', 'short_state': 'shortState', 'size': 'size' } - def __init__(self, active_state=None, data_center_id=None, external_ip_address=None, gateway=None, id=None, init_state=None, internal_ip_address=None, ip_range=None, one_lcm_state=None, one_state=None, price_hr=None, short_state=None, size=None, _configuration=None): # noqa: E501 + def __init__(self, active_state=None, data_center_id=None, external_ip_address=None, gateway=None, id=None, init_state=None, internal_ip_address=None, ip_range=None, network_state=None, price_hr=None, short_state=None, size=None, _configuration=None): # noqa: E501 """Network - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() @@ -78,8 +76,7 @@ def __init__(self, active_state=None, data_center_id=None, external_ip_address=N self._init_state = None self._internal_ip_address = None self._ip_range = None - self._one_lcm_state = None - self._one_state = None + self._network_state = None self._price_hr = None self._short_state = None self._size = None @@ -101,10 +98,8 @@ def __init__(self, active_state=None, data_center_id=None, external_ip_address=N self.internal_ip_address = internal_ip_address if ip_range is not None: self.ip_range = ip_range - if one_lcm_state is not None: - self.one_lcm_state = one_lcm_state - if one_state is not None: - self.one_state = one_state + if network_state is not None: + self.network_state = network_state if price_hr is not None: self.price_hr = price_hr if short_state is not None: @@ -281,46 +276,25 @@ def ip_range(self, ip_range): self._ip_range = ip_range @property - def one_lcm_state(self): - """Gets the one_lcm_state of this Network. # noqa: E501 + def network_state(self): + """Gets the network_state of this Network. # noqa: E501 - :return: The one_lcm_state of this Network. # noqa: E501 - :rtype: str - """ - return self._one_lcm_state - - @one_lcm_state.setter - def one_lcm_state(self, one_lcm_state): - """Sets the one_lcm_state of this Network. - - - :param one_lcm_state: The one_lcm_state of this Network. # noqa: E501 - :type: str - """ - - self._one_lcm_state = one_lcm_state - - @property - def one_state(self): - """Gets the one_state of this Network. # noqa: E501 - - - :return: The one_state of this Network. # noqa: E501 - :rtype: str + :return: The network_state of this Network. # noqa: E501 + :rtype: NetworkState """ - return self._one_state + return self._network_state - @one_state.setter - def one_state(self, one_state): - """Sets the one_state of this Network. + @network_state.setter + def network_state(self, network_state): + """Sets the network_state of this Network. - :param one_state: The one_state of this Network. # noqa: E501 - :type: str + :param network_state: The network_state of this Network. # noqa: E501 + :type: NetworkState """ - self._one_state = one_state + self._network_state = network_state @property def price_hr(self): diff --git a/docs/src/cudo_compute/models/network_state.py b/docs/src/cudo_compute/models/network_state.py new file mode 100644 index 0000000..96bd788 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/payment_method_card.py b/docs/src/cudo_compute/models/payment_method_card.py new file mode 100644 index 0000000..64c5e92 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/payment_method_paypal.py b/docs/src/cudo_compute/models/payment_method_paypal.py new file mode 100644 index 0000000..9e9673e --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/point.py b/docs/src/cudo_compute/models/point.py new file mode 100644 index 0000000..b088918 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/remove_billing_account_payment_method_response.py b/docs/src/cudo_compute/models/remove_billing_account_payment_method_response.py new file mode 100644 index 0000000..4ac86fd --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/set_billing_account_default_payment_method_response.py b/docs/src/cudo_compute/models/set_billing_account_default_payment_method_response.py new file mode 100644 index 0000000..5b3f6d8 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/stripe_customer.py b/docs/src/cudo_compute/models/stripe_customer.py new file mode 100644 index 0000000..170ef8c --- /dev/null +++ b/docs/src/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 = { + 'balance': 'Decimal', + 'email': 'str', + 'id': 'str', + 'name': 'str' + } + + attribute_map = { + 'balance': 'balance', + 'email': 'email', + 'id': 'id', + 'name': 'name' + } + + def __init__(self, balance=None, email=None, id=None, name=None, _configuration=None): # noqa: E501 + """StripeCustomer - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._balance = None + self._email = None + self._id = None + self._name = None + self.discriminator = None + + if balance is not None: + self.balance = balance + if email is not None: + self.email = email + if id is not None: + self.id = id + if name is not None: + self.name = name + + @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 + + @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 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 + + 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/src/cudo_compute/models/tax_id.py b/docs/src/cudo_compute/models/tax_id.py new file mode 100644 index 0000000..2de7c03 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/unit.py b/docs/src/cudo_compute/models/unit.py new file mode 100644 index 0000000..32f2891 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/update_vm_metadata_response.py b/docs/src/cudo_compute/models/update_vm_metadata_response.py new file mode 100644 index 0000000..342c6b2 --- /dev/null +++ b/docs/src/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/src/cudo_compute/models/v1billingaccountsbilling_account_id_billing_account.py b/docs/src/cudo_compute/models/v1billingaccountsbilling_account_id_billing_account.py new file mode 100644 index 0000000..8494daf --- /dev/null +++ b/docs/src/cudo_compute/models/v1billingaccountsbilling_account_id_billing_account.py @@ -0,0 +1,357 @@ +# 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 V1billingaccountsbillingAccountIdBillingAccount(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_threshold': 'Decimal', + 'create_by': 'str', + 'create_time': 'datetime', + 'demand_enabled': 'bool', + 'display_name': 'str', + 'invoice_time': 'datetime', + 'monthly_spend': 'str', + 'stripe_ref': 'str', + 'supply_enabled': 'bool', + 'tax_ids': 'list[TaxId]' + } + + attribute_map = { + 'billing_threshold': 'billingThreshold', + 'create_by': 'createBy', + 'create_time': 'createTime', + 'demand_enabled': 'demandEnabled', + 'display_name': 'displayName', + 'invoice_time': 'invoiceTime', + 'monthly_spend': 'monthlySpend', + 'stripe_ref': 'stripeRef', + 'supply_enabled': 'supplyEnabled', + 'tax_ids': 'taxIds' + } + + def __init__(self, billing_threshold=None, create_by=None, create_time=None, demand_enabled=None, display_name=None, invoice_time=None, monthly_spend=None, stripe_ref=None, supply_enabled=None, tax_ids=None, _configuration=None): # noqa: E501 + """V1billingaccountsbillingAccountIdBillingAccount - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._billing_threshold = None + self._create_by = None + self._create_time = None + self._demand_enabled = None + self._display_name = None + self._invoice_time = None + self._monthly_spend = None + self._stripe_ref = None + self._supply_enabled = None + self._tax_ids = None + self.discriminator = None + + if billing_threshold is not None: + self.billing_threshold = billing_threshold + if create_by is not None: + self.create_by = create_by + if create_time is not None: + self.create_time = create_time + if demand_enabled is not None: + self.demand_enabled = demand_enabled + if display_name is not None: + self.display_name = display_name + if invoice_time is not None: + self.invoice_time = invoice_time + if monthly_spend is not None: + self.monthly_spend = monthly_spend + if stripe_ref is not None: + self.stripe_ref = stripe_ref + if supply_enabled is not None: + self.supply_enabled = supply_enabled + if tax_ids is not None: + self.tax_ids = tax_ids + + @property + def billing_threshold(self): + """Gets the billing_threshold of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The billing_threshold of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: Decimal + """ + return self._billing_threshold + + @billing_threshold.setter + def billing_threshold(self, billing_threshold): + """Sets the billing_threshold of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param billing_threshold: The billing_threshold of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: Decimal + """ + + self._billing_threshold = billing_threshold + + @property + def create_by(self): + """Gets the create_by of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The create_by of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: str + """ + return self._create_by + + @create_by.setter + def create_by(self, create_by): + """Sets the create_by of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param create_by: The create_by of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: str + """ + + self._create_by = create_by + + @property + def create_time(self): + """Gets the create_time of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The create_time of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: datetime + """ + return self._create_time + + @create_time.setter + def create_time(self, create_time): + """Sets the create_time of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param create_time: The create_time of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: datetime + """ + + self._create_time = create_time + + @property + def demand_enabled(self): + """Gets the demand_enabled of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The demand_enabled of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: bool + """ + return self._demand_enabled + + @demand_enabled.setter + def demand_enabled(self, demand_enabled): + """Sets the demand_enabled of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param demand_enabled: The demand_enabled of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: bool + """ + + self._demand_enabled = demand_enabled + + @property + def display_name(self): + """Gets the display_name of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The display_name of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param display_name: The display_name of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: str + """ + + self._display_name = display_name + + @property + def invoice_time(self): + """Gets the invoice_time of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The invoice_time of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: datetime + """ + return self._invoice_time + + @invoice_time.setter + def invoice_time(self, invoice_time): + """Sets the invoice_time of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param invoice_time: The invoice_time of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: datetime + """ + + self._invoice_time = invoice_time + + @property + def monthly_spend(self): + """Gets the monthly_spend of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The monthly_spend of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: str + """ + return self._monthly_spend + + @monthly_spend.setter + def monthly_spend(self, monthly_spend): + """Sets the monthly_spend of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param monthly_spend: The monthly_spend of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: str + """ + + self._monthly_spend = monthly_spend + + @property + def stripe_ref(self): + """Gets the stripe_ref of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The stripe_ref of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: str + """ + return self._stripe_ref + + @stripe_ref.setter + def stripe_ref(self, stripe_ref): + """Sets the stripe_ref of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param stripe_ref: The stripe_ref of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: str + """ + + self._stripe_ref = stripe_ref + + @property + def supply_enabled(self): + """Gets the supply_enabled of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The supply_enabled of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: bool + """ + return self._supply_enabled + + @supply_enabled.setter + def supply_enabled(self, supply_enabled): + """Sets the supply_enabled of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param supply_enabled: The supply_enabled of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: bool + """ + + self._supply_enabled = supply_enabled + + @property + def tax_ids(self): + """Gets the tax_ids of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + + + :return: The tax_ids of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :rtype: list[TaxId] + """ + return self._tax_ids + + @tax_ids.setter + def tax_ids(self, tax_ids): + """Sets the tax_ids of this V1billingaccountsbillingAccountIdBillingAccount. + + + :param tax_ids: The tax_ids of this V1billingaccountsbillingAccountIdBillingAccount. # noqa: E501 + :type: list[TaxId] + """ + + self._tax_ids = tax_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(V1billingaccountsbillingAccountIdBillingAccount, 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, V1billingaccountsbillingAccountIdBillingAccount): + 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, V1billingaccountsbillingAccountIdBillingAccount): + return True + + return self.to_dict() != other.to_dict() diff --git a/docs/src/cudo_compute/models/vm.py b/docs/src/cudo_compute/models/vm.py index 13cfa25..1b2702f 100644 --- a/docs/src/cudo_compute/models/vm.py +++ b/docs/src/cudo_compute/models/vm.py @@ -65,7 +65,8 @@ class VM(object): 'security_group_ids': 'list[str]', 'short_state': 'str', 'storage_disks': 'list[Disk]', - 'vcpus': 'int' + 'vcpus': 'int', + 'vm_state': 'VmState' } attribute_map = { @@ -101,10 +102,11 @@ class VM(object): 'security_group_ids': 'securityGroupIds', 'short_state': 'shortState', 'storage_disks': 'storageDisks', - 'vcpus': 'vcpus' + 'vcpus': 'vcpus', + 'vm_state': 'vmState' } - def __init__(self, active_state=None, boot_disk=None, boot_disk_size_gib=None, cpu_model=None, create_by=None, datacenter_id=None, external_ip_address=None, gpu_model=None, gpu_quantity=None, id=None, image_id=None, image_name=None, init_state=None, internal_ip_address=None, lcm_state=None, machine_type=None, memory=None, metadata=None, nics=None, one_state=None, price_hr=None, private_image_id=None, public_image_id=None, public_image_name=None, public_ip_address=None, region_id=None, region_name=None, renewable_energy=None, rules=None, security_group_ids=None, short_state=None, storage_disks=None, vcpus=None, _configuration=None): # noqa: E501 + def __init__(self, active_state=None, boot_disk=None, boot_disk_size_gib=None, cpu_model=None, create_by=None, datacenter_id=None, external_ip_address=None, gpu_model=None, gpu_quantity=None, id=None, image_id=None, image_name=None, init_state=None, internal_ip_address=None, lcm_state=None, machine_type=None, memory=None, metadata=None, nics=None, one_state=None, price_hr=None, private_image_id=None, public_image_id=None, public_image_name=None, public_ip_address=None, region_id=None, region_name=None, renewable_energy=None, rules=None, security_group_ids=None, short_state=None, storage_disks=None, vcpus=None, vm_state=None, _configuration=None): # noqa: E501 """VM - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() @@ -143,6 +145,7 @@ def __init__(self, active_state=None, boot_disk=None, boot_disk_size_gib=None, c self._short_state = None self._storage_disks = None self._vcpus = None + self._vm_state = None self.discriminator = None if active_state is not None: @@ -211,6 +214,8 @@ def __init__(self, active_state=None, boot_disk=None, boot_disk_size_gib=None, c self.storage_disks = storage_disks if vcpus is not None: self.vcpus = vcpus + if vm_state is not None: + self.vm_state = vm_state @property def active_state(self): @@ -905,6 +910,27 @@ def vcpus(self, vcpus): self._vcpus = vcpus + @property + def vm_state(self): + """Gets the vm_state of this VM. # noqa: E501 + + + :return: The vm_state of this VM. # noqa: E501 + :rtype: VmState + """ + return self._vm_state + + @vm_state.setter + def vm_state(self, vm_state): + """Sets the vm_state of this VM. + + + :param vm_state: The vm_state of this VM. # noqa: E501 + :type: VmState + """ + + self._vm_state = vm_state + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/docs/src/cudo_compute/models/vm_state.py b/docs/src/cudo_compute/models/vm_state.py new file mode 100644 index 0000000..f2a8cf5 --- /dev/null +++ b/docs/src/cudo_compute/models/vm_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 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" + + """ + 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/src/cudo_compute/rest.py b/docs/src/cudo_compute/rest.py index 7884c47..1ec878f 100644 --- a/docs/src/cudo_compute/rest.py +++ b/docs/src/cudo_compute/rest.py @@ -43,11 +43,11 @@ def __init__(self, resp): def getheaders(self): """Returns a dictionary of the response headers.""" - return self.urllib3_response.getheaders() + return self.urllib3_response.headers def getheader(self, name, default=None): """Returns a given response header.""" - return self.urllib3_response.getheader(name, default) + return self.urllib3_response.headers.get(name, default) class RESTClientObject(object): diff --git a/pyproject.toml b/pyproject.toml index 7386adc..02b6f95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "cudo-compute" -version = "0.1.4" +version = "0.1.5" authors = [ { name = "Cudo Ventures", email = "dev@cudoventures.com" }, ] diff --git a/swagger/public.swagger.json b/swagger/public.swagger.json index f10ae4e..61fd84b 100644 --- a/swagger/public.swagger.json +++ b/swagger/public.swagger.json @@ -226,44 +226,54 @@ } } }, - "/v1/billing-accounts/{billingAccountId}/add-user-permission": { - "post": { + "/v1/billing-accounts": { + "get": { "tags": [ - "Permissions" + "Billing" ], - "summary": "Add billing account user", - "operationId": "AddBillingAccountUserPermission", + "summary": "List billing accounts", + "operationId": "ListBillingAccounts", "parameters": [ { "type": "string", - "name": "billingAccountId", - "in": "path", - "required": true + "name": "pageToken", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListBillingAccountsResponse" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + }, + "post": { + "tags": [ + "Billing" + ], + "summary": "Create a billing account", + "operationId": "CreateBillingAccount", + "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "type": "object", - "required": [ - "userEmail", - "role" - ], - "properties": { - "dataCenterId": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/Role" - }, - "userEmail": { - "type": "string" - } - } + "$ref": "#/definitions/CreateBillingAccountRequest" } } ], @@ -271,7 +281,7 @@ "200": { "description": "A successful response.", "schema": { - "type": "object" + "$ref": "#/definitions/BillingAccount" } }, "default": { @@ -283,17 +293,87 @@ } } }, - "/v1/billing-accounts/{billingAccountId}/remove-user-permission": { - "post": { + "/v1/billing-accounts/invoices": { + "get": { "tags": [ - "Permissions" + "Billing" ], - "summary": "Remove billing account user", - "operationId": "RemoveBillingAccountUserPermission", + "summary": "Get invoices", + "operationId": "GetBillingAccountStripeInvoices", "parameters": [ { "type": "string", - "name": "billingAccountId", + "name": "id", + "in": "query", + "required": true + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", + "in": "query" + }, + { + "type": "string", + "name": "startingAfter", + "in": "query" + }, + { + "type": "string", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetBillingAccountStripeInvoicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/billing-accounts/invoices/outstanding": { + "get": { + "tags": [ + "Billing" + ], + "summary": "Get outstanding invoices", + "operationId": "ListOutstandingStripeInvoices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListOutstandingStripeInvoicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/billing-accounts/{billingAccount.id}": { + "patch": { + "tags": [ + "Billing" + ], + "summary": "Update billing account", + "operationId": "UpdateBillingAccount", + "parameters": [ + { + "type": "string", + "name": "billingAccount.id", "in": "path", "required": true }, @@ -304,20 +384,57 @@ "schema": { "type": "object", "required": [ - "userId", - "role" + "updateMask" ], "properties": { - "dataCenterId": { - "type": "string" - }, - "projectId": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/Role" + "billingAccount": { + "type": "object", + "properties": { + "billingThreshold": { + "$ref": "#/definitions/Decimal", + "readOnly": true + }, + "createBy": { + "type": "string", + "readOnly": true + }, + "createTime": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "demandEnabled": { + "type": "boolean", + "readOnly": true + }, + "displayName": { + "type": "string" + }, + "invoiceTime": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "monthlySpend": { + "type": "string" + }, + "stripeRef": { + "type": "string" + }, + "supplyEnabled": { + "type": "boolean", + "readOnly": true + }, + "taxIds": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TaxId" + } + } + } }, - "userId": { + "updateMask": { "type": "string" } } @@ -328,7 +445,7 @@ "200": { "description": "A successful response.", "schema": { - "type": "object" + "$ref": "#/definitions/BillingAccount" } }, "default": { @@ -340,17 +457,17 @@ } } }, - "/v1/data-centers/{dataCenterId}/add-user-permission": { + "/v1/billing-accounts/{billingAccountId}/add-user-permission": { "post": { "tags": [ "Permissions" ], - "summary": "Add data center user", - "operationId": "AddDataCenterUserPermission", + "summary": "Add billing account user", + "operationId": "AddBillingAccountUserPermission", "parameters": [ { "type": "string", - "name": "dataCenterId", + "name": "billingAccountId", "in": "path", "required": true }, @@ -365,7 +482,7 @@ "role" ], "properties": { - "billingAccountId": { + "dataCenterId": { "type": "string" }, "projectId": { @@ -397,17 +514,17 @@ } } }, - "/v1/data-centers/{dataCenterId}/remove-user-permission": { + "/v1/billing-accounts/{billingAccountId}/remove-user-permission": { "post": { "tags": [ "Permissions" ], - "summary": "Remove data center user", - "operationId": "RemoveDataCenterUserPermission", + "summary": "Remove billing account user", + "operationId": "RemoveBillingAccountUserPermission", "parameters": [ { "type": "string", - "name": "dataCenterId", + "name": "billingAccountId", "in": "path", "required": true }, @@ -422,7 +539,7 @@ "role" ], "properties": { - "billingAccountId": { + "dataCenterId": { "type": "string" }, "projectId": { @@ -454,26 +571,40 @@ } } }, - "/v1/project/{projectId}/ssh-keys": { + "/v1/billing-accounts/{billingAccountId}/spend/details": { "get": { "tags": [ - "Projects" + "Billing" ], - "summary": "List SSH keys", - "operationId": "ListProjectSshKeys", + "summary": "Get spend details", + "operationId": "GetBillingAccountSpendDetails", "parameters": [ { "type": "string", - "name": "projectId", + "name": "billingAccountId", "in": "path", "required": true + }, + { + "type": "string", + "format": "date-time", + "name": "startTime", + "in": "query", + "required": true + }, + { + "type": "string", + "format": "date-time", + "name": "endTime", + "in": "query", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListProjectSshKeysResponse" + "$ref": "#/definitions/GetBillingAccountSpendDetailsResponse" } }, "default": { @@ -485,31 +616,26 @@ } } }, - "/v1/projects": { + "/v1/billing-accounts/{id}": { "get": { "tags": [ - "Projects" + "Billing" ], - "summary": "List", - "operationId": "ListProjects", + "summary": "Get a billing account", + "operationId": "GetBillingAccount", "parameters": [ { "type": "string", - "name": "pageToken", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageSize", - "in": "query" + "name": "id", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListProjectsResponse" + "$ref": "#/definitions/BillingAccount" } }, "default": { @@ -520,27 +646,25 @@ } } }, - "post": { + "delete": { "tags": [ - "Projects" + "Billing" ], - "summary": "Create", - "operationId": "CreateProject", + "summary": "Delete billing account", + "operationId": "DeleteBillingAccount", "parameters": [ { - "name": "project", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/Project" - } + "type": "string", + "name": "id", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/Project" + "type": "object" } }, "default": { @@ -552,13 +676,13 @@ } } }, - "/v1/projects/{id}": { + "/v1/billing-accounts/{id}/details": { "get": { "tags": [ - "Projects" + "Billing" ], - "summary": "Get", - "operationId": "GetProject", + "summary": "Get billing account details", + "operationId": "GetBillingAccountDetails", "parameters": [ { "type": "string", @@ -571,7 +695,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/Project" + "$ref": "#/definitions/GetBillingAccountDetailsResponse" } }, "default": { @@ -581,13 +705,15 @@ } } } - }, - "delete": { + } + }, + "/v1/billing-accounts/{id}/payment-methods": { + "get": { "tags": [ - "Projects" + "Billing" ], - "summary": "Delete", - "operationId": "DeleteProject", + "summary": "Get payment methods", + "operationId": "GetBillingAccountPaymentMethods", "parameters": [ { "type": "string", @@ -600,7 +726,7 @@ "200": { "description": "A successful response.", "schema": { - "type": "object" + "$ref": "#/definitions/BillingAccountPaymentMethods" } }, "default": { @@ -612,51 +738,32 @@ } } }, - "/v1/projects/{project.id}": { - "patch": { + "/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}": { + "delete": { "tags": [ - "Projects" + "Billing" ], - "summary": "Update", - "operationId": "UpdateProject", + "summary": "Remove payment method", + "operationId": "RemoveBillingAccountPaymentMethod", "parameters": [ { "type": "string", - "name": "project.id", + "name": "id", "in": "path", "required": true }, { - "name": "project", - "in": "body", - "required": true, - "schema": { - "type": "object", - "required": [ - "billingAccountId" - ], - "properties": { - "billingAccountId": { - "type": "string" - }, - "createBy": { - "type": "string", - "readOnly": true - }, - "resourceCount": { - "type": "integer", - "format": "int32", - "readOnly": true - } - } - } + "type": "string", + "name": "paymentMethodId", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/Project" + "$ref": "#/definitions/RemoveBillingAccountPaymentMethodResponse" } }, "default": { @@ -668,52 +775,32 @@ } } }, - "/v1/projects/{projectId}/add-user-permission": { + "/v1/billing-accounts/{id}/payment-methods/{paymentMethodId}/set-default": { "post": { "tags": [ - "Permissions" + "Billing" ], - "summary": "Add project user", - "operationId": "AddProjectUserPermission", + "summary": "Set default payment method", + "operationId": "SetBillingAccountDefaultPaymentMethod", "parameters": [ { "type": "string", - "name": "projectId", + "name": "id", "in": "path", "required": true }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "required": [ - "userEmail", - "role" - ], - "properties": { - "billingAccountId": { - "type": "string" - }, - "dataCenterId": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/Role" - }, - "userEmail": { - "type": "string" - } - } - } + "type": "string", + "name": "paymentMethodId", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "type": "object" + "$ref": "#/definitions/SetBillingAccountDefaultPaymentMethodResponse" } }, "default": { @@ -725,17 +812,17 @@ } } }, - "/v1/projects/{projectId}/count-vms": { + "/v1/billing-accounts/{id}/setup-intent": { "get": { "tags": [ - "Virtual Machines" + "Billing" ], - "summary": "Count", - "operationId": "CountVMs", + "summary": "Get setup intent", + "operationId": "GetBillingAccountSetupIntent", "parameters": [ { "type": "string", - "name": "projectId", + "name": "id", "in": "path", "required": true } @@ -744,7 +831,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CountVMsResponse" + "$ref": "#/definitions/BillingAccountSetupIntent" } }, "default": { @@ -756,29 +843,24 @@ } } }, - "/v1/projects/{projectId}/disk/{id}/attach": { - "patch": { + "/v1/data-centers": { + "get": { + "description": "Returns the data centers in an organization", "tags": [ - "Disks" + "DataCenters" ], - "summary": "Attach storage disk to VM", - "operationId": "AttachStorageDisk", + "summary": "List data centers", + "operationId": "ListDataCenters", "parameters": [ { "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "id", - "in": "path", - "required": true + "name": "pageToken", + "in": "query" }, { - "type": "string", - "name": "vmId", + "type": "integer", + "format": "int32", + "name": "pageSize", "in": "query" } ], @@ -786,7 +868,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/AttachStorageDiskResponse" + "$ref": "#/definitions/ListDataCentersResponse" } }, "default": { @@ -796,34 +878,29 @@ } } } - } - }, - "/v1/projects/{projectId}/disk/{id}/detach": { - "put": { + }, + "post": { + "description": "Creates a new data center", "tags": [ - "Disks" + "DataCenters" ], - "summary": "Detach storage disk from VM", - "operationId": "DetachStorageDisk", + "summary": "Create data center", + "operationId": "CreateDataCenter", "parameters": [ { - "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "id", - "in": "path", - "required": true + "name": "dataCenter", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DataCenter" + } } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DetachStorageDiskResponse" + "$ref": "#/definitions/DataCenter" } }, "default": { @@ -835,43 +912,59 @@ } } }, - "/v1/projects/{projectId}/disks": { - "get": { + "/v1/data-centers/{dataCenter.id}": { + "patch": { + "description": "Updates a data center", "tags": [ - "Disks" + "DataCenters" ], - "summary": "List disks", - "operationId": "ListDisks", + "summary": "Update data center", + "operationId": "UpdateDataCenter", "parameters": [ { "type": "string", - "name": "projectId", + "name": "dataCenter.id", "in": "path", "required": true }, { - "type": "integer", - "format": "int32", - "name": "pageNumber", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageSize", - "in": "query" - }, - { - "type": "string", - "name": "dataCenterId", - "in": "query" + "name": "dataCenter", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "oneFrontendId" + ], + "properties": { + "createBy": { + "type": "string", + "readOnly": true + }, + "lngLat": { + "$ref": "#/definitions/Point" + }, + "oneFrontendId": { + "type": "string" + }, + "regionId": { + "type": "string" + }, + "renewableEnergy": { + "type": "boolean" + }, + "supplierName": { + "type": "string" + } + } + } } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListDisksResponse" + "$ref": "#/definitions/DataCenter" } }, "default": { @@ -881,17 +974,19 @@ } } } - }, + } + }, + "/v1/data-centers/{dataCenterId}/add-user-permission": { "post": { "tags": [ - "Disks" + "Permissions" ], - "summary": "Create storage disk", - "operationId": "CreateStorageDisk", + "summary": "Add data center user", + "operationId": "AddDataCenterUserPermission", "parameters": [ { "type": "string", - "name": "projectId", + "name": "dataCenterId", "in": "path", "required": true }, @@ -901,12 +996,22 @@ "required": true, "schema": { "type": "object", + "required": [ + "userEmail", + "role" + ], "properties": { - "dataCenterId": { + "billingAccountId": { "type": "string" }, - "disk": { - "$ref": "#/definitions/Disk" + "projectId": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/Role" + }, + "userEmail": { + "type": "string" } } } @@ -916,7 +1021,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateStorageDiskResponse" + "type": "object" } }, "default": { @@ -928,23 +1033,18 @@ } } }, - "/v1/projects/{projectId}/disks/{id}": { + "/v1/data-centers/{dataCenterId}/clusters": { "get": { + "description": "Returns the clusters in a data center", "tags": [ - "Disks" + "DataCenters" ], - "summary": "List disks", - "operationId": "GetDisk", + "summary": "List clusters", + "operationId": "ListClusters", "parameters": [ { "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "id", + "name": "dataCenterId", "in": "path", "required": true } @@ -953,7 +1053,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetDiskResponse" + "$ref": "#/definitions/ListClustersResponse" } }, "default": { @@ -963,23 +1063,20 @@ } } } - }, - "delete": { + } + }, + "/v1/data-centers/{dataCenterId}/host-count": { + "get": { + "description": "Returns the number of hosts in a data center", "tags": [ - "Disks" + "DataCenters" ], - "summary": "Delete storage disk", - "operationId": "DeleteStorageDisk", + "summary": "Get host count", + "operationId": "CountHosts", "parameters": [ { "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "id", + "name": "dataCenterId", "in": "path", "required": true } @@ -988,7 +1085,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteStorageDiskResponse" + "$ref": "#/definitions/CountHostsResponse" } }, "default": { @@ -1000,44 +1097,58 @@ } } }, - "/v1/projects/{projectId}/disks/{id}/revert": { - "post": { + "/v1/data-centers/{dataCenterId}/hosts": { + "get": { + "description": "Returns the hosts in a data center", "tags": [ - "Disks" + "DataCenters" ], - "summary": "Revert Disk to Snapshot", - "operationId": "RevertDisk", + "summary": "List hosts", + "operationId": "ListHosts", "parameters": [ { "type": "string", - "name": "projectId", + "name": "dataCenterId", "in": "path", "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListHostsResponse" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/data-centers/{dataCenterId}/machine-types": { + "get": { + "tags": [ + "MachineTypes" + ], + "summary": "Get", + "operationId": "ListMachineTypes", + "parameters": [ { "type": "string", - "name": "id", + "name": "dataCenterId", "in": "path", "required": true - }, - { - "type": "string", - "name": "snapshotId", - "in": "query", - "required": true - }, - { - "type": "string", - "name": "vmId", - "in": "query", - "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/RevertDiskResponse" + "$ref": "#/definitions/ListMachineTypesResponse" } }, "default": { @@ -1049,23 +1160,23 @@ } } }, - "/v1/projects/{projectId}/disks/{id}/snapshots": { + "/v1/data-centers/{dataCenterId}/machine-types/{machineType}": { "get": { "tags": [ - "Disks" + "MachineTypes" ], - "summary": "List Disk Snapshots", - "operationId": "ListDiskSnapshots", + "summary": "Get", + "operationId": "GetMachineType", "parameters": [ { "type": "string", - "name": "projectId", + "name": "dataCenterId", "in": "path", "required": true }, { "type": "string", - "name": "id", + "name": "machineType", "in": "path", "required": true } @@ -1074,7 +1185,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListDiskSnapshotsResponse" + "$ref": "#/definitions/GetMachineTypeResponse" } }, "default": { @@ -1084,23 +1195,56 @@ } } } - }, - "post": { + } + }, + "/v1/data-centers/{dataCenterId}/machine-types/{machineType}/live-utilization": { + "get": { "tags": [ - "Disks" + "MachineTypes" ], - "summary": "Create Disk Snapshot", - "operationId": "CreateDiskSnapshot", + "summary": "Get", + "operationId": "GetMachineTypeLiveUtilization", "parameters": [ { "type": "string", - "name": "projectId", + "name": "dataCenterId", "in": "path", "required": true }, { "type": "string", - "name": "id", + "name": "machineType", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetMachineTypeLiveUtilizationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/data-centers/{dataCenterId}/remove-user-permission": { + "post": { + "tags": [ + "Permissions" + ], + "summary": "Remove data center user", + "operationId": "RemoveDataCenterUserPermission", + "parameters": [ + { + "type": "string", + "name": "dataCenterId", "in": "path", "required": true }, @@ -1111,14 +1255,20 @@ "schema": { "type": "object", "required": [ - "snapshotId", - "vmId" + "userId", + "role" ], "properties": { - "snapshotId": { + "billingAccountId": { "type": "string" }, - "vmId": { + "projectId": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/Role" + }, + "userId": { "type": "string" } } @@ -1129,7 +1279,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateDiskSnapshotResponse" + "type": "object" } }, "default": { @@ -1139,44 +1289,29 @@ } } } - }, - "delete": { + } + }, + "/v1/data-centers/{id}": { + "get": { + "description": "Returns a data center", "tags": [ - "Disks" + "DataCenters" ], - "summary": "Delete Disk Snapshots", - "operationId": "DeleteDiskSnapshot", + "summary": "Get data center", + "operationId": "GetDataCenter", "parameters": [ - { - "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, { "type": "string", "name": "id", "in": "path", "required": true - }, - { - "type": "string", - "name": "snapshotId", - "in": "query", - "required": true - }, - { - "type": "string", - "name": "vmId", - "in": "query", - "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteDiskSnapshotResponse" + "$ref": "#/definitions/DataCenter" } }, "default": { @@ -1186,40 +1321,27 @@ } } } - } - }, - "/v1/projects/{projectId}/images": { - "get": { + }, + "delete": { + "description": "Deletes a data center", "tags": [ - "Virtual Machines" + "DataCenters" ], - "summary": "List private VM images", - "operationId": "ListPrivateVMImages", + "summary": "Delete data center", + "operationId": "DeleteDataCenter", "parameters": [ { "type": "string", - "name": "projectId", + "name": "id", "in": "path", "required": true - }, - { - "type": "integer", - "format": "int32", - "name": "pageNumber", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageSize", - "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListPrivateVMImagesResponse" + "type": "object" } }, "default": { @@ -1229,43 +1351,29 @@ } } } - }, - "post": { + } + }, + "/v1/data-centers/{id}/live-utilization": { + "get": { + "description": "Returns the live utilization of a data center", "tags": [ - "Virtual Machines" + "DataCenters" ], - "summary": "Create private VM image", - "operationId": "CreatePrivateVMImage", + "summary": "Get live utilization", + "operationId": "GetDataCenterLiveUtilization", "parameters": [ - { - "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "vmId", - "in": "query", - "required": true - }, { "type": "string", "name": "id", - "in": "query", + "in": "path", "required": true - }, - { - "type": "string", - "name": "description", - "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreatePrivateVMImageResponse" + "$ref": "#/definitions/GetDataCenterLiveUtilizationResponse" } }, "default": { @@ -1277,24 +1385,46 @@ } } }, - "/v1/projects/{projectId}/images/{id}": { + "/v1/data-centers/{id}/revenue": { "get": { + "description": "Returns the revenue of a data center over time", "tags": [ - "Virtual Machines" + "DataCenters" ], - "summary": "Get private VM image", - "operationId": "GetPrivateVMImage", + "summary": "Get revenue time series", + "operationId": "GetDataCenterRevenueTimeSeries", "parameters": [ { "type": "string", - "name": "projectId", + "name": "id", "in": "path", "required": true }, { "type": "string", - "name": "id", - "in": "path", + "format": "date-time", + "name": "startTime", + "in": "query", + "required": true + }, + { + "type": "string", + "format": "date-time", + "name": "endTime", + "in": "query", + "required": true + }, + { + "enum": [ + "INTERVAL_UNKNOWN", + "INTERVAL_DAY", + "INTERVAL_WEEK", + "INTERVAL_MONTH" + ], + "type": "string", + "default": "INTERVAL_UNKNOWN", + "name": "interval", + "in": "query", "required": true } ], @@ -1302,7 +1432,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetPrivateVMImageResponse" + "$ref": "#/definitions/GetDataCenterRevenueTimeSeriesResponse" } }, "default": { @@ -1312,37 +1442,43 @@ } } } - }, - "post": { + } + }, + "/v1/data-centers/{id}/revenue-by-resource": { + "get": { + "description": "Returns the revenue of a data center by resource (CPU, Memory, Storage, etc.)", "tags": [ - "Virtual Machines" + "DataCenters" ], - "summary": "Update private VM image", - "operationId": "UpdatePrivateVMImage", + "summary": "Get revenue by resource", + "operationId": "GetDataCenterRevenueByResource", "parameters": [ { "type": "string", - "name": "projectId", + "name": "id", "in": "path", "required": true }, { "type": "string", - "name": "id", - "in": "path", + "format": "date-time", + "name": "startTime", + "in": "query", "required": true }, { "type": "string", - "name": "description", - "in": "query" + "format": "date-time", + "name": "endTime", + "in": "query", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdatePrivateVMImageResponse" + "$ref": "#/definitions/GetDataCenterRevenueByResourceResponse" } }, "default": { @@ -1352,32 +1488,28 @@ } } } - }, - "delete": { + } + }, + "/v1/project/{projectId}/ssh-keys": { + "get": { "tags": [ - "Virtual Machines" + "Projects" ], - "summary": "Delete private VM image", - "operationId": "DeletePrivateVMImage", + "summary": "List SSH keys", + "operationId": "ListProjectSshKeys", "parameters": [ { "type": "string", "name": "projectId", "in": "path", "required": true - }, - { - "type": "string", - "name": "id", - "in": "path", - "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeletePrivateVMImageResponse" + "$ref": "#/definitions/ListProjectSshKeysResponse" } }, "default": { @@ -1389,24 +1521,17 @@ } } }, - "/v1/projects/{projectId}/networks": { + "/v1/projects": { "get": { "tags": [ - "Networks" + "Projects" ], - "summary": "List networks", - "operationId": "ListNetworks", + "summary": "List", + "operationId": "ListProjects", "parameters": [ { "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int32", - "name": "pageNumber", + "name": "pageToken", "in": "query" }, { @@ -1420,7 +1545,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListNetworksResponse" + "$ref": "#/definitions/ListProjectsResponse" } }, "default": { @@ -1433,46 +1558,17 @@ }, "post": { "tags": [ - "Networks" + "Projects" ], - "summary": "Create network", - "operationId": "CreateNetwork", + "summary": "Create", + "operationId": "CreateProject", "parameters": [ { - "type": "string", - "name": "projectId", - "in": "path", - "required": true - }, - { - "name": "body", + "name": "project", "in": "body", "required": true, "schema": { - "type": "object", - "required": [ - "dataCenterId", - "id", - "cidrPrefix", - "networkId" - ], - "properties": { - "cidrPrefix": { - "type": "string" - }, - "dataCenterId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "networkId": { - "type": "string" - }, - "vrouterSize": { - "$ref": "#/definitions/VRouterSize" - } - } + "$ref": "#/definitions/Project" } } ], @@ -1480,7 +1576,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateNetworkResponse" + "$ref": "#/definitions/Project" } }, "default": { @@ -1492,43 +1588,55 @@ } } }, - "/v1/projects/{projectId}/networks/security-groups": { + "/v1/projects/{id}": { "get": { "tags": [ - "Networks" + "Projects" ], - "summary": "List security groups", - "operationId": "ListSecurityGroups", + "summary": "Get", + "operationId": "GetProject", "parameters": [ { "type": "string", - "name": "projectId", + "name": "id", "in": "path", "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/Project" + } }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + }, + "delete": { + "tags": [ + "Projects" + ], + "summary": "Delete", + "operationId": "DeleteProject", + "parameters": [ { - "type": "string", - "name": "dataCenterId", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageNumber", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageSize", - "in": "query" + "type": "string", + "name": "id", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListSecurityGroupsResponse" + "type": "object" } }, "default": { @@ -1540,32 +1648,51 @@ } } }, - "/v1/projects/{projectId}/networks/security-groups/{id}": { - "get": { + "/v1/projects/{project.id}": { + "patch": { "tags": [ - "Networks" + "Projects" ], - "summary": "Get a security group", - "operationId": "GetSecurityGroup", + "summary": "Update", + "operationId": "UpdateProject", "parameters": [ { "type": "string", - "name": "projectId", + "name": "project.id", "in": "path", "required": true }, { - "type": "string", - "name": "id", - "in": "path", - "required": true + "name": "project", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "billingAccountId" + ], + "properties": { + "billingAccountId": { + "type": "string" + }, + "createBy": { + "type": "string", + "readOnly": true + }, + "resourceCount": { + "type": "integer", + "format": "int32", + "readOnly": true + } + } + } } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetSecurityGroupResponse" + "$ref": "#/definitions/Project" } }, "default": { @@ -1575,13 +1702,15 @@ } } } - }, - "delete": { + } + }, + "/v1/projects/{projectId}/add-user-permission": { + "post": { "tags": [ - "Networks" + "Permissions" ], - "summary": "Delete security group", - "operationId": "DeleteSecurityGroup", + "summary": "Add project user", + "operationId": "AddProjectUserPermission", "parameters": [ { "type": "string", @@ -1590,17 +1719,37 @@ "required": true }, { - "type": "string", - "name": "id", - "in": "path", - "required": true + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "userEmail", + "role" + ], + "properties": { + "billingAccountId": { + "type": "string" + }, + "dataCenterId": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/Role" + }, + "userEmail": { + "type": "string" + } + } + } } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteSecurityGroupResponse" + "type": "object" } }, "default": { @@ -1612,32 +1761,26 @@ } } }, - "/v1/projects/{projectId}/networks/{id}": { + "/v1/projects/{projectId}/count-vms": { "get": { "tags": [ - "Networks" + "Virtual Machines" ], - "summary": "Get network", - "operationId": "GetNetwork", + "summary": "Count", + "operationId": "CountVMs", "parameters": [ { "type": "string", "name": "projectId", "in": "path", "required": true - }, - { - "type": "string", - "name": "id", - "in": "path", - "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetNetworkResponse" + "$ref": "#/definitions/CountVMsResponse" } }, "default": { @@ -1647,13 +1790,15 @@ } } } - }, - "delete": { + } + }, + "/v1/projects/{projectId}/disk/{id}/attach": { + "patch": { "tags": [ - "Networks" + "Disks" ], - "summary": "Delete network", - "operationId": "DeleteNetwork", + "summary": "Attach storage disk to VM", + "operationId": "AttachStorageDisk", "parameters": [ { "type": "string", @@ -1669,16 +1814,15 @@ }, { "type": "string", - "name": "networkId", - "in": "query", - "required": true + "name": "vmId", + "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteNetworkResponse" + "$ref": "#/definitions/AttachStorageDiskResponse" } }, "default": { @@ -1690,13 +1834,13 @@ } } }, - "/v1/projects/{projectId}/networks/{id}/start": { - "post": { + "/v1/projects/{projectId}/disk/{id}/detach": { + "put": { "tags": [ - "Networks" + "Disks" ], - "summary": "Start network", - "operationId": "StartNetwork", + "summary": "Detach storage disk from VM", + "operationId": "DetachStorageDisk", "parameters": [ { "type": "string", @@ -1709,19 +1853,13 @@ "name": "id", "in": "path", "required": true - }, - { - "type": "string", - "name": "networkId", - "in": "query", - "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/StartNetworkResponse" + "$ref": "#/definitions/DetachStorageDiskResponse" } }, "default": { @@ -1733,13 +1871,13 @@ } } }, - "/v1/projects/{projectId}/networks/{id}/stop": { - "post": { + "/v1/projects/{projectId}/disks": { + "get": { "tags": [ - "Networks" + "Disks" ], - "summary": "Stop network", - "operationId": "StopNetwork", + "summary": "List disks", + "operationId": "ListDisks", "parameters": [ { "type": "string", @@ -1748,23 +1886,28 @@ "required": true }, { - "type": "string", - "name": "id", - "in": "path", - "required": true + "type": "integer", + "format": "int32", + "name": "pageNumber", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", + "in": "query" }, { "type": "string", - "name": "networkId", - "in": "query", - "required": true + "name": "dataCenterId", + "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/StopNetworkResponse" + "$ref": "#/definitions/ListDisksResponse" } }, "default": { @@ -1774,15 +1917,13 @@ } } } - } - }, - "/v1/projects/{projectId}/object-storage/activate": { + }, "post": { "tags": [ - "Object Storage" + "Disks" ], - "summary": "Allow the use of S3 compatible storage in a project", - "operationId": "Activate", + "summary": "Create storage disk", + "operationId": "CreateStorageDisk", "parameters": [ { "type": "string", @@ -1799,6 +1940,9 @@ "properties": { "dataCenterId": { "type": "string" + }, + "disk": { + "$ref": "#/definitions/Disk" } } } @@ -1808,7 +1952,7 @@ "200": { "description": "A successful response.", "schema": { - "type": "object" + "$ref": "#/definitions/CreateStorageDiskResponse" } }, "default": { @@ -1820,13 +1964,13 @@ } } }, - "/v1/projects/{projectId}/object-storage/buckets": { + "/v1/projects/{projectId}/disks/{id}": { "get": { "tags": [ - "Object Storage" + "Disks" ], - "summary": "List buckets", - "operationId": "ListObjectStorageBuckets", + "summary": "List disks", + "operationId": "GetDisk", "parameters": [ { "type": "string", @@ -1835,23 +1979,17 @@ "required": true }, { - "type": "integer", - "format": "int32", - "name": "pageNumber", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageSize", - "in": "query" + "type": "string", + "name": "id", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListObjectStorageBucketsResponse" + "$ref": "#/definitions/GetDiskResponse" } }, "default": { @@ -1861,15 +1999,13 @@ } } } - } - }, - "/v1/projects/{projectId}/object-storage/buckets/{id}": { - "get": { + }, + "delete": { "tags": [ - "Object Storage" + "Disks" ], - "summary": "Get details for a bucket", - "operationId": "GetObjectStorageBucket", + "summary": "Delete storage disk", + "operationId": "DeleteStorageDisk", "parameters": [ { "type": "string", @@ -1888,7 +2024,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ObjectStorageBucket" + "$ref": "#/definitions/DeleteStorageDiskResponse" } }, "default": { @@ -1900,13 +2036,13 @@ } } }, - "/v1/projects/{projectId}/object-storage/session-key": { - "get": { + "/v1/projects/{projectId}/disks/{id}/revert": { + "post": { "tags": [ - "Object Storage" + "Disks" ], - "summary": "Generate temporary key for storage bucket access", - "operationId": "GetObjectStorageSessionKey", + "summary": "Revert Disk to Snapshot", + "operationId": "RevertDisk", "parameters": [ { "type": "string", @@ -1916,15 +2052,28 @@ }, { "type": "string", - "name": "dataCenterId", - "in": "query" + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "snapshotId", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "vmId", + "in": "query", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetObjectStorageSessionKeyResponse" + "$ref": "#/definitions/RevertDiskResponse" } }, "default": { @@ -1936,13 +2085,13 @@ } } }, - "/v1/projects/{projectId}/object-storage/users": { + "/v1/projects/{projectId}/disks/{id}/snapshots": { "get": { "tags": [ - "Object Storage" + "Disks" ], - "summary": "List storage users", - "operationId": "ListObjectStorageUsers", + "summary": "List Disk Snapshots", + "operationId": "ListDiskSnapshots", "parameters": [ { "type": "string", @@ -1951,23 +2100,17 @@ "required": true }, { - "type": "integer", - "format": "int32", - "name": "pageNumber", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageSize", - "in": "query" + "type": "string", + "name": "id", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListObjectStorageUsersResponse" + "$ref": "#/definitions/ListDiskSnapshotsResponse" } }, "default": { @@ -1980,10 +2123,10 @@ }, "post": { "tags": [ - "Object Storage" + "Disks" ], - "summary": "Create user that stores keys for storage buckets", - "operationId": "CreateObjectStorageUser", + "summary": "Create Disk Snapshot", + "operationId": "CreateDiskSnapshot", "parameters": [ { "type": "string", @@ -1991,14 +2134,27 @@ "in": "path", "required": true }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", + "required": [ + "snapshotId", + "vmId" + ], "properties": { - "id": { + "snapshotId": { + "type": "string" + }, + "vmId": { "type": "string" } } @@ -2009,7 +2165,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ObjectStorageUser" + "$ref": "#/definitions/CreateDiskSnapshotResponse" } }, "default": { @@ -2019,15 +2175,13 @@ } } } - } - }, - "/v1/projects/{projectId}/object-storage/users/{id}": { - "post": { + }, + "delete": { "tags": [ - "Object Storage" + "Disks" ], - "summary": "Generate access key for storage buckets", - "operationId": "GenerateObjectStorageKey", + "summary": "Delete Disk Snapshots", + "operationId": "DeleteDiskSnapshot", "parameters": [ { "type": "string", @@ -2042,19 +2196,66 @@ "required": true }, { - "name": "body", - "in": "body", - "required": true, + "type": "string", + "name": "snapshotId", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "vmId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", "schema": { - "type": "object" + "$ref": "#/definitions/DeleteDiskSnapshotResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" } } + } + } + }, + "/v1/projects/{projectId}/images": { + "get": { + "tags": [ + "Virtual Machines" + ], + "summary": "List private VM images", + "operationId": "ListPrivateVMImages", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int32", + "name": "pageNumber", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", + "in": "query" + } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ObjectStorageKey" + "$ref": "#/definitions/ListPrivateVMImagesResponse" } }, "default": { @@ -2065,12 +2266,12 @@ } } }, - "delete": { + "post": { "tags": [ - "Object Storage" + "Virtual Machines" ], - "summary": "Delete object storage user", - "operationId": "DeleteObjectStorageUser", + "summary": "Create private VM image", + "operationId": "CreatePrivateVMImage", "parameters": [ { "type": "string", @@ -2078,18 +2279,29 @@ "in": "path", "required": true }, + { + "type": "string", + "name": "vmId", + "in": "query", + "required": true + }, { "type": "string", "name": "id", - "in": "path", + "in": "query", "required": true + }, + { + "type": "string", + "name": "description", + "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteObjectStorageUserResponse" + "$ref": "#/definitions/CreatePrivateVMImageResponse" } }, "default": { @@ -2101,13 +2313,13 @@ } } }, - "/v1/projects/{projectId}/object-storage/users/{id}/keys": { + "/v1/projects/{projectId}/images/{id}": { "get": { "tags": [ - "Object Storage" + "Virtual Machines" ], - "summary": "List storage user keys", - "operationId": "ListObjectStorageKeys", + "summary": "Get private VM image", + "operationId": "GetPrivateVMImage", "parameters": [ { "type": "string", @@ -2120,25 +2332,13 @@ "name": "id", "in": "path", "required": true - }, - { - "type": "integer", - "format": "int32", - "name": "pageNumber", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "pageSize", - "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListObjectStorageKeysResponse" + "$ref": "#/definitions/GetPrivateVMImageResponse" } }, "default": { @@ -2151,10 +2351,10 @@ }, "post": { "tags": [ - "Object Storage" + "Virtual Machines" ], - "summary": "Delete object storage user", - "operationId": "DeleteObjectStorageKey", + "summary": "Update private VM image", + "operationId": "UpdatePrivateVMImage", "parameters": [ { "type": "string", @@ -2170,7 +2370,7 @@ }, { "type": "string", - "name": "accessKey", + "name": "description", "in": "query" } ], @@ -2178,7 +2378,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/DeleteObjectStorageKeyResponse" + "$ref": "#/definitions/UpdatePrivateVMImageResponse" } }, "default": { @@ -2188,15 +2388,13 @@ } } } - } - }, - "/v1/projects/{projectId}/remove-user-permission": { - "post": { + }, + "delete": { "tags": [ - "Permissions" + "Virtual Machines" ], - "summary": "Remove project user", - "operationId": "RemoveProjectUserPermission", + "summary": "Delete private VM image", + "operationId": "DeletePrivateVMImage", "parameters": [ { "type": "string", @@ -2205,37 +2403,17 @@ "required": true }, { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "required": [ - "userId", - "role" - ], - "properties": { - "billingAccountId": { - "type": "string" - }, - "dataCenterId": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/Role" - }, - "userId": { - "type": "string" - } - } - } + "type": "string", + "name": "id", + "in": "path", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "type": "object" + "$ref": "#/definitions/DeletePrivateVMImageResponse" } }, "default": { @@ -2247,13 +2425,54 @@ } } }, - "/v1/projects/{projectId}/vm": { - "post": { + "/v1/projects/{projectId}/networks": { + "get": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "Create virtual machine", - "operationId": "CreateVM", + "summary": "List networks", + "operationId": "ListNetworks", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int32", + "name": "pageNumber", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListNetworksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + }, + "post": { + "tags": [ + "Networks" + ], + "summary": "Create network", + "operationId": "CreateNetwork", "parameters": [ { "type": "string", @@ -2268,86 +2487,26 @@ "schema": { "type": "object", "required": [ - "vmId", - "bootDiskImageId" + "dataCenterId", + "id", + "cidrPrefix", + "networkId" ], "properties": { - "bootDisk": { - "$ref": "#/definitions/Disk" - }, - "bootDiskImageId": { - "type": "string" - }, - "cpuModel": { + "cidrPrefix": { "type": "string" }, - "customSshKeys": { - "type": "array", - "items": { - "type": "string" - } - }, "dataCenterId": { "type": "string" }, - "gpuModel": { - "type": "string" - }, - "gpus": { - "type": "integer", - "format": "int32" - }, - "machineType": { - "type": "string" - }, - "maxPriceHr": { - "$ref": "#/definitions/Decimal" - }, - "memoryGib": { - "type": "integer", - "format": "int32" - }, - "metadata": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "nics": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/CreateVMRequest.NIC" - } - }, - "password": { + "id": { "type": "string" }, - "securityGroupIds": { - "type": "array", - "title": "ignored if any nics are provided", - "items": { - "type": "string" - } - }, - "sshKeySource": { - "$ref": "#/definitions/SshKeySource" - }, - "startScript": { + "networkId": { "type": "string" }, - "storageDiskIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "vcpus": { - "type": "integer", - "format": "int32" - }, - "vmId": { - "type": "string" + "vrouterSize": { + "$ref": "#/definitions/VRouterSize" } } } @@ -2357,7 +2516,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateVMResponse" + "$ref": "#/definitions/CreateNetworkResponse" } }, "default": { @@ -2369,13 +2528,13 @@ } } }, - "/v1/projects/{projectId}/vms": { + "/v1/projects/{projectId}/networks/security-groups": { "get": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "List", - "operationId": "ListVMs", + "summary": "List security groups", + "operationId": "ListSecurityGroups", "parameters": [ { "type": "string", @@ -2385,7 +2544,19 @@ }, { "type": "string", - "name": "networkId", + "name": "dataCenterId", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageNumber", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", "in": "query" } ], @@ -2393,7 +2564,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListVMsResponse" + "$ref": "#/definitions/ListSecurityGroupsResponse" } }, "default": { @@ -2405,13 +2576,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}": { + "/v1/projects/{projectId}/networks/security-groups/{id}": { "get": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "Get", - "operationId": "GetVM", + "summary": "Get a security group", + "operationId": "GetSecurityGroup", "parameters": [ { "type": "string", @@ -2430,7 +2601,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/GetVMResponse" + "$ref": "#/definitions/GetSecurityGroupResponse" } }, "default": { @@ -2440,15 +2611,13 @@ } } } - } - }, - "/v1/projects/{projectId}/vms/{id}/connect": { - "get": { + }, + "delete": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "Connect via VNC", - "operationId": "ConnectVM", + "summary": "Delete security group", + "operationId": "DeleteSecurityGroup", "parameters": [ { "type": "string", @@ -2461,18 +2630,13 @@ "name": "id", "in": "path", "required": true - }, - { - "type": "string", - "name": "connectionId", - "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ConnectVMResponse" + "$ref": "#/definitions/DeleteSecurityGroupResponse" } }, "default": { @@ -2484,13 +2648,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}/disks": { + "/v1/projects/{projectId}/networks/{id}": { "get": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "List disks attached to VM", - "operationId": "ListVMDisks", + "summary": "Get network", + "operationId": "GetNetwork", "parameters": [ { "type": "string", @@ -2509,7 +2673,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListVMDisksResponse" + "$ref": "#/definitions/GetNetworkResponse" } }, "default": { @@ -2520,12 +2684,12 @@ } } }, - "patch": { + "delete": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "Resize a VM's disk", - "operationId": "ResizeVMDisk", + "summary": "Delete network", + "operationId": "DeleteNetwork", "parameters": [ { "type": "string", @@ -2541,21 +2705,16 @@ }, { "type": "string", - "name": "diskId", - "in": "query" - }, - { - "type": "integer", - "format": "int32", - "name": "sizeGib", - "in": "query" + "name": "networkId", + "in": "query", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ResizeVMDiskResponse" + "$ref": "#/definitions/DeleteNetworkResponse" } }, "default": { @@ -2567,13 +2726,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}/monitor": { - "get": { + "/v1/projects/{projectId}/networks/{id}/start": { + "post": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "Monitor", - "operationId": "MonitorVM", + "summary": "Start network", + "operationId": "StartNetwork", "parameters": [ { "type": "string", @@ -2586,13 +2745,19 @@ "name": "id", "in": "path", "required": true + }, + { + "type": "string", + "name": "networkId", + "in": "query", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/MonitorVMResponse" + "$ref": "#/definitions/StartNetworkResponse" } }, "default": { @@ -2604,13 +2769,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}/reboot": { + "/v1/projects/{projectId}/networks/{id}/stop": { "post": { "tags": [ - "Virtual Machines" + "Networks" ], - "summary": "Reboot", - "operationId": "RebootVM", + "summary": "Stop network", + "operationId": "StopNetwork", "parameters": [ { "type": "string", @@ -2623,13 +2788,19 @@ "name": "id", "in": "path", "required": true + }, + { + "type": "string", + "name": "networkId", + "in": "query", + "required": true } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/RebootVMResponse" + "$ref": "#/definitions/StopNetworkResponse" } }, "default": { @@ -2641,13 +2812,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}/resize": { + "/v1/projects/{projectId}/object-storage/activate": { "post": { "tags": [ - "Virtual Machines" + "Object Storage" ], - "summary": "Resize vCPU and memory of VM", - "operationId": "ResizeVM", + "summary": "Allow the use of S3 compatible storage in a project", + "operationId": "Activate", "parameters": [ { "type": "string", @@ -2656,21 +2827,59 @@ "required": true }, { - "type": "string", - "name": "id", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "vcpus", + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "dataCenterId": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/object-storage/buckets": { + "get": { + "tags": [ + "Object Storage" + ], + "summary": "List buckets", + "operationId": "ListObjectStorageBuckets", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int32", + "name": "pageNumber", "in": "query" }, { "type": "integer", - "format": "int64", - "name": "memoryGib", + "format": "int32", + "name": "pageSize", "in": "query" } ], @@ -2678,7 +2887,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ResizeVMResponse" + "$ref": "#/definitions/ListObjectStorageBucketsResponse" } }, "default": { @@ -2690,13 +2899,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}/start": { - "post": { + "/v1/projects/{projectId}/object-storage/buckets/{id}": { + "get": { "tags": [ - "Virtual Machines" + "Object Storage" ], - "summary": "Start", - "operationId": "StartVM", + "summary": "Get details for a bucket", + "operationId": "GetObjectStorageBucket", "parameters": [ { "type": "string", @@ -2715,7 +2924,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/StartVMResponse" + "$ref": "#/definitions/ObjectStorageBucket" } }, "default": { @@ -2727,13 +2936,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}/stop": { - "post": { + "/v1/projects/{projectId}/object-storage/session-key": { + "get": { "tags": [ - "Virtual Machines" + "Object Storage" ], - "summary": "Stop", - "operationId": "StopVM", + "summary": "Generate temporary key for storage bucket access", + "operationId": "GetObjectStorageSessionKey", "parameters": [ { "type": "string", @@ -2743,16 +2952,15 @@ }, { "type": "string", - "name": "id", - "in": "path", - "required": true + "name": "dataCenterId", + "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/StopVMResponse" + "$ref": "#/definitions/GetObjectStorageSessionKeyResponse" } }, "default": { @@ -2764,13 +2972,13 @@ } } }, - "/v1/projects/{projectId}/vms/{id}/terminate": { - "post": { + "/v1/projects/{projectId}/object-storage/users": { + "get": { "tags": [ - "Virtual Machines" + "Object Storage" ], - "summary": "Terminate", - "operationId": "TerminateVM", + "summary": "List storage users", + "operationId": "ListObjectStorageUsers", "parameters": [ { "type": "string", @@ -2779,17 +2987,23 @@ "required": true }, { - "type": "string", - "name": "id", - "in": "path", - "required": true + "type": "integer", + "format": "int32", + "name": "pageNumber", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", + "in": "query" } ], "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/TerminateVMResponse" + "$ref": "#/definitions/ListObjectStorageUsersResponse" } }, "default": { @@ -2799,48 +3013,29 @@ } } } - } - }, - "/v1/projects/{securityGroup.projectId}/networks/security-groups": { + }, "post": { "tags": [ - "Networks" + "Object Storage" ], - "summary": "Create security group", - "operationId": "CreateSecurityGroup", + "summary": "Create user that stores keys for storage buckets", + "operationId": "CreateObjectStorageUser", "parameters": [ { "type": "string", - "name": "securityGroup.projectId", + "name": "projectId", "in": "path", "required": true }, { - "name": "securityGroup", + "name": "body", "in": "body", "required": true, "schema": { "type": "object", - "required": [ - "dataCenterId", - "id" - ], "properties": { - "dataCenterId": { - "type": "string" - }, - "description": { - "type": "string" - }, "id": { "type": "string" - }, - "rules": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Rule" - } } } } @@ -2850,7 +3045,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/CreateSecurityGroupResponse" + "$ref": "#/definitions/ObjectStorageUser" } }, "default": { @@ -2862,50 +3057,32 @@ } } }, - "/v1/projects/{securityGroup.projectId}/networks/security-groups/{securityGroup.id}": { - "patch": { + "/v1/projects/{projectId}/object-storage/users/{id}": { + "post": { "tags": [ - "Networks" + "Object Storage" ], - "summary": "Update security group", - "operationId": "UpdateSecurityGroup", + "summary": "Generate access key for storage buckets", + "operationId": "GenerateObjectStorageKey", "parameters": [ { "type": "string", - "name": "securityGroup.projectId", + "name": "projectId", "in": "path", "required": true }, { "type": "string", - "name": "securityGroup.id", + "name": "id", "in": "path", "required": true }, { - "name": "securityGroup", + "name": "body", "in": "body", "required": true, "schema": { - "type": "object", - "required": [ - "dataCenterId" - ], - "properties": { - "dataCenterId": { - "type": "string" - }, - "description": { - "type": "string" - }, - "rules": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Rule" - } - } - } + "type": "object" } } ], @@ -2913,7 +3090,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/UpdateSecurityGroupResponse" + "$ref": "#/definitions/ObjectStorageKey" } }, "default": { @@ -2923,20 +3100,32 @@ } } } - } - }, - "/v1/regions": { - "get": { + }, + "delete": { "tags": [ - "Search" + "Object Storage" + ], + "summary": "Delete object storage user", + "operationId": "DeleteObjectStorageUser", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } ], - "summary": "Regions", - "operationId": "ListRegions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListRegionsResponse" + "$ref": "#/definitions/DeleteObjectStorageUserResponse" } }, "default": { @@ -2948,14 +3137,26 @@ } } }, - "/v1/ssh-keys": { + "/v1/projects/{projectId}/object-storage/users/{id}/keys": { "get": { "tags": [ - "SSH keys" + "Object Storage" ], - "summary": "List", - "operationId": "ListSshKeys", + "summary": "List storage user keys", + "operationId": "ListObjectStorageKeys", "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, { "type": "integer", "format": "int32", @@ -2973,7 +3174,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/ListSshKeysResponse" + "$ref": "#/definitions/ListObjectStorageKeysResponse" } }, "default": { @@ -2986,28 +3187,995 @@ }, "post": { "tags": [ - "SSH keys" + "Object Storage" ], - "summary": "Create", - "operationId": "CreateSshKey", + "summary": "Delete object storage user", + "operationId": "DeleteObjectStorageKey", "parameters": [ { - "name": "sshKey", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SshKey" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/SshKey" - } + "type": "string", + "name": "projectId", + "in": "path", + "required": true }, - "default": { + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "accessKey", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/DeleteObjectStorageKeyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/remove-user-permission": { + "post": { + "tags": [ + "Permissions" + ], + "summary": "Remove project user", + "operationId": "RemoveProjectUserPermission", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "userId", + "role" + ], + "properties": { + "billingAccountId": { + "type": "string" + }, + "dataCenterId": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/Role" + }, + "userId": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vm": { + "post": { + "tags": [ + "Virtual Machines" + ], + "summary": "Create virtual machine", + "operationId": "CreateVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "vmId", + "bootDiskImageId" + ], + "properties": { + "bootDisk": { + "$ref": "#/definitions/Disk" + }, + "bootDiskImageId": { + "type": "string" + }, + "cpuModel": { + "type": "string" + }, + "customSshKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "dataCenterId": { + "type": "string" + }, + "gpuModel": { + "type": "string" + }, + "gpus": { + "type": "integer", + "format": "int32" + }, + "machineType": { + "type": "string" + }, + "maxPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "memoryGib": { + "type": "integer", + "format": "int32" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "nics": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/CreateVMRequest.NIC" + } + }, + "password": { + "type": "string" + }, + "securityGroupIds": { + "type": "array", + "title": "ignored if any nics are provided", + "items": { + "type": "string" + } + }, + "sshKeySource": { + "$ref": "#/definitions/SshKeySource" + }, + "startScript": { + "type": "string" + }, + "storageDiskIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "vcpus": { + "type": "integer", + "format": "int32" + }, + "vmId": { + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/CreateVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vm/{id}/metadata": { + "post": { + "tags": [ + "Virtual Machines" + ], + "summary": "Update VM metadata", + "operationId": "UpdateVMMetadata", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "This is a request variable of the map type. The query format is \"map_name[key]=value\", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age[\"bob\"]=18", + "name": "metadata", + "in": "query" + }, + { + "type": "boolean", + "name": "merge", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/UpdateVMMetadataResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vm/{id}/security-group/attach": { + "patch": { + "tags": [ + "Virtual Machines" + ], + "summary": "Attach security group to VM", + "operationId": "AttachSecurityGroup", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "securityGroupId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/AttachSecurityGroupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vm/{id}/security-group/detach": { + "patch": { + "tags": [ + "Virtual Machines" + ], + "summary": "Attach security group to VM", + "operationId": "DetachSecurityGroup", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "securityGroupId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/DetachSecurityGroupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms": { + "get": { + "tags": [ + "Virtual Machines" + ], + "summary": "List", + "operationId": "ListVMs", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "networkId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListVMsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}": { + "get": { + "tags": [ + "Virtual Machines" + ], + "summary": "Get", + "operationId": "GetVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/connect": { + "get": { + "tags": [ + "Virtual Machines" + ], + "summary": "Connect via VNC", + "operationId": "ConnectVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "connectionId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ConnectVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/disks": { + "get": { + "tags": [ + "Virtual Machines" + ], + "summary": "List disks attached to VM", + "operationId": "ListVMDisks", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListVMDisksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + }, + "patch": { + "tags": [ + "Virtual Machines" + ], + "summary": "Resize a VM's disk", + "operationId": "ResizeVMDisk", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "diskId", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "sizeGib", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ResizeVMDiskResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/monitor": { + "get": { + "tags": [ + "Virtual Machines" + ], + "summary": "Monitor", + "operationId": "MonitorVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/MonitorVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/reboot": { + "post": { + "tags": [ + "Virtual Machines" + ], + "summary": "Reboot", + "operationId": "RebootVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/RebootVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/resize": { + "post": { + "tags": [ + "Virtual Machines" + ], + "summary": "Resize vCPU and memory of VM", + "operationId": "ResizeVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "name": "vcpus", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "memoryGib", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ResizeVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/start": { + "post": { + "tags": [ + "Virtual Machines" + ], + "summary": "Start", + "operationId": "StartVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/StartVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/stop": { + "post": { + "tags": [ + "Virtual Machines" + ], + "summary": "Stop", + "operationId": "StopVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/StopVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{projectId}/vms/{id}/terminate": { + "post": { + "tags": [ + "Virtual Machines" + ], + "summary": "Terminate", + "operationId": "TerminateVM", + "parameters": [ + { + "type": "string", + "name": "projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/TerminateVMResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{securityGroup.projectId}/networks/security-groups": { + "post": { + "tags": [ + "Networks" + ], + "summary": "Create security group", + "operationId": "CreateSecurityGroup", + "parameters": [ + { + "type": "string", + "name": "securityGroup.projectId", + "in": "path", + "required": true + }, + { + "name": "securityGroup", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "dataCenterId", + "id" + ], + "properties": { + "dataCenterId": { + "type": "string" + }, + "description": { + "type": "string" + }, + "id": { + "type": "string" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Rule" + } + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/CreateSecurityGroupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/projects/{securityGroup.projectId}/networks/security-groups/{securityGroup.id}": { + "patch": { + "tags": [ + "Networks" + ], + "summary": "Update security group", + "operationId": "UpdateSecurityGroup", + "parameters": [ + { + "type": "string", + "name": "securityGroup.projectId", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "securityGroup.id", + "in": "path", + "required": true + }, + { + "name": "securityGroup", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "dataCenterId" + ], + "properties": { + "dataCenterId": { + "type": "string" + }, + "description": { + "type": "string" + }, + "rules": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Rule" + } + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/UpdateSecurityGroupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/regions": { + "get": { + "tags": [ + "Search" + ], + "summary": "Regions", + "operationId": "ListRegions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListRegionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + } + }, + "/v1/ssh-keys": { + "get": { + "tags": [ + "SSH keys" + ], + "summary": "List", + "operationId": "ListSshKeys", + "parameters": [ + { + "type": "integer", + "format": "int32", + "name": "pageNumber", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "name": "pageSize", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListSshKeysResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + } + }, + "post": { + "tags": [ + "SSH keys" + ], + "summary": "Create", + "operationId": "CreateSshKey", + "parameters": [ + { + "name": "sshKey", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SshKey" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/SshKey" + } + }, + "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Status" @@ -3247,22 +4415,273 @@ "properties": { "createTime": { "type": "string", - "format": "date-time", - "readOnly": true + "format": "date-time", + "readOnly": true + }, + "id": { + "type": "string", + "readOnly": true + }, + "key": { + "type": "string", + "readOnly": true + } + } + }, + "AttachSecurityGroupResponse": { + "type": "object" + }, + "AttachStorageDiskResponse": { + "type": "object" + }, + "BillingAccount": { + "type": "object", + "properties": { + "billingThreshold": { + "$ref": "#/definitions/Decimal", + "readOnly": true + }, + "createBy": { + "type": "string", + "readOnly": true + }, + "createTime": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "demandEnabled": { + "type": "boolean", + "readOnly": true + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string", + "readOnly": true + }, + "invoiceTime": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "monthlySpend": { + "type": "string" + }, + "stripeRef": { + "type": "string" + }, + "supplyEnabled": { + "type": "boolean", + "readOnly": true + }, + "taxIds": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TaxId" + } + } + } + }, + "BillingAccountPaymentMethod": { + "type": "object", + "properties": { + "card": { + "$ref": "#/definitions/PaymentMethodCard" + }, + "id": { + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "paypal": { + "$ref": "#/definitions/PaymentMethodPaypal" + }, + "type": { + "type": "string" + } + } + }, + "BillingAccountPaymentMethods": { + "type": "object", + "properties": { + "paymentMethods": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/BillingAccountPaymentMethod" + } + } + } + }, + "BillingAccountSetupIntent": { + "type": "object", + "required": [ + "id", + "clientSecret" + ], + "properties": { + "clientSecret": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "BillingAccountSpendRow": { + "type": "object", + "required": [ + "projectId", + "description", + "quantity", + "unit", + "unitAmount", + "amount" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Decimal" + }, + "description": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "quantity": { + "type": "number", + "format": "float" + }, + "unit": { + "$ref": "#/definitions/Unit" + }, + "unitAmount": { + "$ref": "#/definitions/Decimal" + } + } + }, + "Cluster": { + "type": "object", + "required": [ + "machineType", + "cpuModel", + "vcpuPerCpuThread", + "vcpuPriceHr", + "memoryGibPriceHr", + "gpuModel", + "gpuModelPciTypes", + "gpuPriceHr", + "minVcpuPerMemoryGib", + "maxVcpuPerMemoryGib", + "minVcpuPerGpu", + "maxVcpuPerGpu", + "createTime", + "updateTime", + "hostCount", + "hostProblemCount", + "vmCount", + "vcpuFree", + "vcpuUsed", + "memoryGibFree", + "memoryGibUsed", + "gpuFree", + "gpuUsed" + ], + "properties": { + "cpuModel": { + "type": "string" + }, + "createTime": { + "type": "string", + "format": "date-time" }, - "id": { - "type": "string", - "readOnly": true + "gpuFree": { + "type": "integer", + "format": "int32" }, - "key": { + "gpuModel": { + "type": "string" + }, + "gpuModelPciTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "gpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "gpuUsed": { + "type": "integer", + "format": "int32" + }, + "hostCount": { + "type": "integer", + "format": "int32" + }, + "hostProblemCount": { + "type": "integer", + "format": "int32" + }, + "machineType": { + "type": "string" + }, + "maxVcpuPerGpu": { + "type": "number", + "format": "double" + }, + "maxVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "memoryGibFree": { + "type": "integer", + "format": "int32" + }, + "memoryGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "memoryGibUsed": { + "type": "integer", + "format": "int32" + }, + "minVcpuPerGpu": { + "type": "number", + "format": "double" + }, + "minVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "updateTime": { "type": "string", - "readOnly": true + "format": "date-time" + }, + "vcpuFree": { + "type": "integer", + "format": "int32" + }, + "vcpuPerCpuThread": { + "type": "integer", + "format": "int32" + }, + "vcpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "vcpuUsed": { + "type": "integer", + "format": "int32" + }, + "vmCount": { + "type": "integer", + "format": "int32" } } }, - "AttachStorageDiskResponse": { - "type": "object" - }, "ConnectVMResponse": { "type": "object", "required": [ @@ -3278,6 +4697,18 @@ } } }, + "CountHostsResponse": { + "type": "object", + "required": [ + "count" + ], + "properties": { + "count": { + "type": "integer", + "format": "int32" + } + } + }, "CountVMsResponse": { "type": "object", "required": [ @@ -3310,6 +4741,35 @@ } } }, + "CreateBillingAccountRequest": { + "type": "object", + "required": [ + "displayName", + "invoiceName", + "email" + ], + "properties": { + "displayName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "invoiceName": { + "type": "string" + }, + "referral": { + "type": "string" + }, + "taxIds": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TaxId" + } + } + } + }, "CreateDiskSnapshotResponse": { "type": "object" }, @@ -3369,6 +4829,37 @@ } } }, + "DataCenter": { + "type": "object", + "required": [ + "id", + "oneFrontendId" + ], + "properties": { + "createBy": { + "type": "string", + "readOnly": true + }, + "id": { + "type": "string" + }, + "lngLat": { + "$ref": "#/definitions/Point" + }, + "oneFrontendId": { + "type": "string" + }, + "regionId": { + "type": "string" + }, + "renewableEnergy": { + "type": "boolean" + }, + "supplierName": { + "type": "string" + } + } + }, "DataCenterCategory": { "type": "object", "required": [ @@ -3393,6 +4884,49 @@ } } }, + "DataCenterRevenueResource": { + "type": "object", + "required": [ + "resourceType", + "resourceId", + "quantity", + "unit", + "revenueUsd" + ], + "properties": { + "quantity": { + "$ref": "#/definitions/Decimal" + }, + "resourceId": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "revenueUsd": { + "$ref": "#/definitions/Decimal" + }, + "unit": { + "type": "string" + } + } + }, + "DataCenterTimeRevenue": { + "type": "object", + "required": [ + "time", + "revenueUsd" + ], + "properties": { + "revenueUsd": { + "$ref": "#/definitions/Decimal" + }, + "time": { + "type": "string", + "format": "date-time" + } + } + }, "Decimal": { "description": "A representation of a decimal value, such as 2.5. Clients may convert values\ninto language-native decimal formats, such as Java's [BigDecimal][] or\nPython's [decimal.Decimal][].\n\n[BigDecimal]:\nhttps://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html\n[decimal.Decimal]: https://docs.python.org/3/library/decimal.html", "type": "object", @@ -3424,6 +4958,9 @@ "DeleteStorageDiskResponse": { "type": "object" }, + "DetachSecurityGroupResponse": { + "type": "object" + }, "DetachStorageDiskResponse": { "type": "object" }, @@ -3508,32 +5045,183 @@ "diskGibPriceHr": { "$ref": "#/definitions/Decimal" }, - "snapshotGibPriceHr": { - "$ref": "#/definitions/Decimal" + "snapshotGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "storageClass": { + "$ref": "#/definitions/VMDataCenter.StorageClass" + } + } + }, + "DiskType": { + "type": "string", + "default": "DISK_TYPE_UNKNOWN", + "enum": [ + "DISK_TYPE_UNKNOWN", + "DISK_TYPE_BOOT", + "DISK_TYPE_STORAGE" + ] + }, + "GenerateApiKeyRequest": { + "type": "object", + "required": [ + "apikeyId" + ], + "properties": { + "apikeyId": { + "description": "The identifier to use for the api key, which will become the final component of\nthe api key's resource name.\nThis value should be 4-63 characters, and valid characters\nare /[a-z][0-9]-/.", + "type": "string" + } + } + }, + "GetBillingAccountDetailsResponse": { + "type": "object", + "required": [ + "billingAccount", + "stripeCustomer" + ], + "properties": { + "billingAccount": { + "$ref": "#/definitions/BillingAccount" + }, + "stripeCustomer": { + "$ref": "#/definitions/StripeCustomer" + } + } + }, + "GetBillingAccountSpendDetailsResponse": { + "type": "object", + "required": [ + "spend" + ], + "properties": { + "spend": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/BillingAccountSpendRow" + } + } + } + }, + "GetBillingAccountStripeInvoicesResponse": { + "type": "object", + "required": [ + "invoices", + "hasMore" + ], + "properties": { + "hasMore": { + "type": "boolean" + }, + "invoices": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Invoice" + } + } + } + }, + "GetDataCenterLiveUtilizationResponse": { + "type": "object", + "required": [ + "utilization", + "vcpuUsed", + "vcpuFree", + "vcpuTotal", + "cpuUtilization", + "memoryGibUsed", + "memoryGibFree", + "memoryGibTotal", + "memoryUtilization", + "gpuUsed", + "gpuFree", + "gpuTotal", + "gpuUtilization" + ], + "properties": { + "cpuUtilization": { + "type": "number", + "format": "float" + }, + "gpuFree": { + "type": "integer", + "format": "int32" + }, + "gpuTotal": { + "type": "integer", + "format": "int32" + }, + "gpuUsed": { + "type": "integer", + "format": "int32" + }, + "gpuUtilization": { + "type": "number", + "format": "float" + }, + "memoryGibFree": { + "type": "integer", + "format": "int32" + }, + "memoryGibTotal": { + "type": "integer", + "format": "int32" + }, + "memoryGibUsed": { + "type": "integer", + "format": "int32" + }, + "memoryUtilization": { + "type": "number", + "format": "float" + }, + "utilization": { + "type": "number", + "format": "float" + }, + "vcpuFree": { + "type": "integer", + "format": "int32" }, - "storageClass": { - "$ref": "#/definitions/VMDataCenter.StorageClass" + "vcpuTotal": { + "type": "integer", + "format": "int32" + }, + "vcpuUsed": { + "type": "integer", + "format": "int32" } } }, - "DiskType": { - "type": "string", - "default": "DISK_TYPE_UNKNOWN", - "enum": [ - "DISK_TYPE_UNKNOWN", - "DISK_TYPE_BOOT", - "DISK_TYPE_STORAGE" - ] + "GetDataCenterRevenueByResourceResponse": { + "type": "object", + "required": [ + "resources" + ], + "properties": { + "resources": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DataCenterRevenueResource" + } + } + } }, - "GenerateApiKeyRequest": { + "GetDataCenterRevenueTimeSeriesResponse": { "type": "object", "required": [ - "apikeyId" + "timeRevenue" ], "properties": { - "apikeyId": { - "description": "The identifier to use for the api key, which will become the final component of\nthe api key's resource name.\nThis value should be 4-63 characters, and valid characters\nare /[a-z][0-9]-/.", - "type": "string" + "timeRevenue": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DataCenterTimeRevenue" + } } } }, @@ -3552,6 +5240,171 @@ } } }, + "GetMachineTypeLiveUtilizationResponse": { + "type": "object", + "required": [ + "utilization", + "vcpuUsed", + "vcpuFree", + "vcpuTotal", + "cpuUtilization", + "memoryGibUsed", + "memoryGibFree", + "memoryGibTotal", + "memoryUtilization", + "gpuUsed", + "gpuFree", + "gpuTotal", + "gpuUtilization" + ], + "properties": { + "cpuUtilization": { + "type": "number", + "format": "float" + }, + "gpuFree": { + "type": "integer", + "format": "int32" + }, + "gpuTotal": { + "type": "integer", + "format": "int32" + }, + "gpuUsed": { + "type": "integer", + "format": "int32" + }, + "gpuUtilization": { + "type": "number", + "format": "float" + }, + "memoryGibFree": { + "type": "integer", + "format": "int32" + }, + "memoryGibTotal": { + "type": "integer", + "format": "int32" + }, + "memoryGibUsed": { + "type": "integer", + "format": "int32" + }, + "memoryUtilization": { + "type": "number", + "format": "float" + }, + "utilization": { + "type": "number", + "format": "float" + }, + "vcpuFree": { + "type": "integer", + "format": "int32" + }, + "vcpuTotal": { + "type": "integer", + "format": "int32" + }, + "vcpuUsed": { + "type": "integer", + "format": "int32" + } + } + }, + "GetMachineTypeResponse": { + "type": "object", + "required": [ + "dataCenterId", + "machineType", + "cpuModels", + "gpuModels", + "minVcpuPriceHr", + "maxVcpuPriceHr", + "minMemoryGibPriceHr", + "maxMemoryGibPriceHr", + "minGpuPriceHr", + "maxGpuPriceHr", + "minVcpuPerMemoryGib", + "maxVcpuPerMemoryGib", + "minVcpuPerGpu", + "maxVcpuPerGpu", + "countClusters", + "countHosts", + "countHostsActive", + "countHostsInactive" + ], + "properties": { + "countClusters": { + "type": "integer", + "format": "int32" + }, + "countHosts": { + "type": "integer", + "format": "int32" + }, + "countHostsActive": { + "type": "integer", + "format": "int32" + }, + "countHostsInactive": { + "type": "integer", + "format": "int32" + }, + "cpuModels": { + "type": "array", + "items": { + "type": "string" + } + }, + "dataCenterId": { + "type": "string" + }, + "gpuModels": { + "type": "array", + "items": { + "type": "string" + } + }, + "machineType": { + "type": "string" + }, + "maxGpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "maxMemoryGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "maxVcpuPerGpu": { + "type": "number", + "format": "double" + }, + "maxVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "maxVcpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "minGpuPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "minMemoryGibPriceHr": { + "$ref": "#/definitions/Decimal" + }, + "minVcpuPerGpu": { + "type": "number", + "format": "double" + }, + "minVcpuPerMemoryGib": { + "type": "number", + "format": "double" + }, + "minVcpuPriceHr": { + "$ref": "#/definitions/Decimal" + } + } + }, "GetNetworkResponse": { "type": "object", "required": [ @@ -3633,6 +5486,83 @@ } } }, + "Host": { + "type": "object", + "required": [ + "machineType", + "cpuModel", + "vcpuPerCpuThread", + "gpuModel", + "createTime", + "updateTime", + "vmCount", + "vcpuFree", + "vcpuUsed", + "memoryGibFree", + "memoryGibUsed", + "gpuFree", + "gpuUsed", + "online", + "name" + ], + "properties": { + "cpuModel": { + "type": "string" + }, + "createTime": { + "type": "string", + "format": "date-time" + }, + "gpuFree": { + "type": "integer", + "format": "int32" + }, + "gpuModel": { + "type": "string" + }, + "gpuUsed": { + "type": "integer", + "format": "int32" + }, + "machineType": { + "type": "string" + }, + "memoryGibFree": { + "type": "integer", + "format": "int32" + }, + "memoryGibUsed": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "online": { + "type": "boolean" + }, + "updateTime": { + "type": "string", + "format": "date-time" + }, + "vcpuFree": { + "type": "integer", + "format": "int32" + }, + "vcpuPerCpuThread": { + "type": "integer", + "format": "int32" + }, + "vcpuUsed": { + "type": "integer", + "format": "int32" + }, + "vmCount": { + "type": "integer", + "format": "int32" + } + } + }, "HostConfigCategory": { "type": "object", "required": [ @@ -3715,40 +5645,111 @@ "clientSecret": { "type": "string" }, - "id": { + "id": { + "type": "string" + } + } + }, + "Image": { + "type": "object", + "required": [ + "id", + "name", + "description", + "displayName", + "platform", + "sizeGib" + ], + "properties": { + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "sizeGib": { + "type": "integer", + "format": "int32" + } + } + }, + "Interval": { + "type": "string", + "default": "INTERVAL_UNKNOWN", + "enum": [ + "INTERVAL_UNKNOWN", + "INTERVAL_DAY", + "INTERVAL_WEEK", + "INTERVAL_MONTH" + ] + }, + "Invoice": { + "type": "object", + "properties": { + "amountDue": { + "type": "string", + "format": "int64" + }, + "amountPaid": { + "type": "string", + "format": "int64" + }, + "amountRemaining": { + "type": "string", + "format": "int64" + }, + "autoAdvance": { + "type": "boolean" + }, + "billingReason": { + "type": "string" + }, + "created": { + "type": "string", + "format": "int64" + }, + "currency": { "type": "string" - } - } - }, - "Image": { - "type": "object", - "required": [ - "id", - "name", - "description", - "displayName", - "platform", - "sizeGib" - ], - "properties": { + }, "description": { "type": "string" }, - "displayName": { + "dueDate": { + "type": "string", + "format": "int64" + }, + "hostedInvoiceUrl": { "type": "string" }, "id": { "type": "string" }, - "name": { + "number": { "type": "string" }, - "platform": { - "type": "string" + "paidDate": { + "type": "string", + "format": "int64" }, - "sizeGib": { - "type": "integer", - "format": "int32" + "periodEnd": { + "type": "string", + "format": "int64" + }, + "periodStart": { + "type": "string", + "format": "int64" + }, + "status": { + "type": "string" } } }, @@ -3782,6 +5783,69 @@ } } }, + "ListBillingAccountsResponse": { + "type": "object", + "required": [ + "billingAccounts", + "pageToken", + "pageSize" + ], + "properties": { + "billingAccounts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/BillingAccount" + } + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "pageToken": { + "type": "string" + } + } + }, + "ListClustersResponse": { + "type": "object", + "required": [ + "clusters" + ], + "properties": { + "clusters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Cluster" + } + } + } + }, + "ListDataCentersResponse": { + "type": "object", + "required": [ + "dataCenters", + "pageToken", + "pageSize" + ], + "properties": { + "dataCenters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DataCenter" + } + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "pageToken": { + "type": "string" + } + } + }, "ListDiskSnapshotsResponse": { "type": "object", "required": [ @@ -3826,6 +5890,36 @@ } } }, + "ListHostsResponse": { + "type": "object", + "required": [ + "hosts" + ], + "properties": { + "hosts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Host" + } + } + } + }, + "ListMachineTypesResponse": { + "type": "object", + "required": [ + "machineTypes" + ], + "properties": { + "machineTypes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/MachineType" + } + } + } + }, "ListNetworksResponse": { "type": "object", "required": [ @@ -3946,6 +6040,21 @@ } } }, + "ListOutstandingStripeInvoicesResponse": { + "type": "object", + "required": [ + "invoices" + ], + "properties": { + "invoices": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Invoice" + } + } + } + }, "ListPrivateVMImagesResponse": { "type": "object", "required": [ @@ -4309,6 +6418,37 @@ } } }, + "MachineType": { + "type": "object", + "required": [ + "machineType", + "countClusters", + "countHosts", + "countHostsActive", + "countHostsInactive" + ], + "properties": { + "countClusters": { + "type": "integer", + "format": "int32" + }, + "countHosts": { + "type": "integer", + "format": "int32" + }, + "countHostsActive": { + "type": "integer", + "format": "int32" + }, + "countHostsInactive": { + "type": "integer", + "format": "int32" + }, + "machineType": { + "type": "string" + } + } + }, "MonitorVMResponse": { "type": "object", "required": [ @@ -4351,6 +6491,9 @@ "ipRange": { "type": "string" }, + "networkState": { + "$ref": "#/definitions/NetworkState" + }, "priceHr": { "$ref": "#/definitions/Decimal" }, @@ -4373,6 +6516,31 @@ } } }, + "NetworkState": { + "type": "string", + "default": "CLONING", + "enum": [ + "CLONING", + "CREATING_SNAPSHOT", + "DELETED", + "DELETING", + "DELETING_SNAPSHOT", + "FAILED", + "HOTPLUGGING", + "MIGRATING", + "RECREATING", + "REVERTING_SNAPSHOT", + "RESIZING", + "RESIZING_DISK", + "ACTIVE", + "STARTING", + "STOPPED", + "STOPPING", + "SUSPENDED", + "SUSPENDING", + "UNKNOWN" + ] + }, "ObjectStorageBucket": { "type": "object", "properties": { @@ -4442,6 +6610,55 @@ } } }, + "PaymentMethodCard": { + "type": "object", + "properties": { + "brand": { + "type": "string" + }, + "country": { + "type": "string" + }, + "expMonth": { + "type": "string", + "format": "int64" + }, + "expYear": { + "type": "string", + "format": "int64" + }, + "fingerprint": { + "type": "string" + }, + "last4": { + "type": "string" + } + } + }, + "PaymentMethodPaypal": { + "type": "object", + "properties": { + "payerEmail": { + "type": "string" + }, + "payerId": { + "type": "string" + } + } + }, + "Point": { + "type": "object", + "properties": { + "lat": { + "type": "number", + "format": "double" + }, + "lng": { + "type": "number", + "format": "double" + } + } + }, "Profile": { "type": "object", "properties": { @@ -4510,6 +6727,21 @@ } } }, + "RemoveBillingAccountPaymentMethodResponse": { + "type": "object", + "required": [ + "id", + "paymentMethodId" + ], + "properties": { + "id": { + "type": "string" + }, + "paymentMethodId": { + "type": "string" + } + } + }, "ResizeVMDiskResponse": { "type": "object" }, @@ -4622,6 +6854,21 @@ } } }, + "SetBillingAccountDefaultPaymentMethodResponse": { + "type": "object", + "required": [ + "id", + "paymentMethodId" + ], + "properties": { + "id": { + "type": "string" + }, + "paymentMethodId": { + "type": "string" + } + } + }, "Snapshot": { "type": "object", "properties": { @@ -4714,9 +6961,50 @@ "StopVMResponse": { "type": "object" }, + "StripeCustomer": { + "type": "object", + "properties": { + "balance": { + "$ref": "#/definitions/Decimal" + }, + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "TaxId": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, "TerminateVMResponse": { "type": "object" }, + "Unit": { + "type": "string", + "default": "UNIT_UNKNOWN", + "enum": [ + "UNIT_UNKNOWN", + "UNIT_GIB_HOUR", + "UNIT_HOUR" + ] + }, "UpdatePrivateVMImageResponse": { "type": "object" }, @@ -4731,6 +7019,17 @@ } } }, + "UpdateVMMetadataResponse": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, "UserPermission": { "type": "object", "required": [ @@ -4886,6 +7185,9 @@ "vcpus": { "type": "integer", "format": "int64" + }, + "vmState": { + "$ref": "#/definitions/VmState" } } }, @@ -5011,6 +7313,31 @@ "VROUTER_INSTANCE_LARGE" ] }, + "VmState": { + "type": "string", + "default": "CLONING", + "enum": [ + "CLONING", + "CREATING_SNAPSHOT", + "DELETED", + "DELETING", + "DELETING_SNAPSHOT", + "FAILED", + "HOTPLUGGING", + "MIGRATING", + "RECREATING", + "REVERTING_SNAPSHOT", + "RESIZING", + "RESIZING_DISK", + "ACTIVE", + "STARTING", + "STOPPED", + "STOPPING", + "SUSPENDED", + "SUSPENDING", + "UNKNOWN" + ] + }, "v1.PrivateImage": { "type": "object", "properties": {