From 9a35f9abf821cf0ebf04b5dbc0949209359dadbc Mon Sep 17 00:00:00 2001 From: Grzegorz Szczudlik <2914011+szczad@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:19:45 +0200 Subject: [PATCH 1/3] chore(makefile): Move generator files to dedicated directory --- Makefile | 21 +- api.json => openapi/api.json | 9617 +++++++++++++++-------- api.orig.json => openapi/api.orig.json | 9693 +++++++++++++++++------- openapi/config.yaml | 6 + patch.jq => openapi/patch.jq | 3 +- 5 files changed, 13474 insertions(+), 5866 deletions(-) rename api.json => openapi/api.json (64%) rename api.orig.json => openapi/api.orig.json (65%) create mode 100644 openapi/config.yaml rename patch.jq => openapi/patch.jq (97%) diff --git a/Makefile b/Makefile index 57e95ac..7e38c39 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ API_URL := https://infrahub-api-doc.nexgencloud.com/api.json all: generate -generate: api.json +generate: openapi/api.json docker container run \ --rm \ --user $(UID) \ @@ -14,19 +14,16 @@ generate: api.json --volume "$(PWD):/local" \ openapitools/openapi-generator-cli \ generate \ - --generator-name python \ - --input-spec "/local/api.json" \ - --output /local/ \ - --config /local/config.json + --config /local/openapi/config.yaml -api.orig.json: - curl "$(API_URL)" | jq . > api.orig.json +openapi/api.orig.json: + curl "$(API_URL)" | jq . > openapi/api.orig.json -api.json: api.orig.json patch.jq - jq -f 'patch.jq' api.orig.json > api.json +openapi/api.json: openapi/api.orig.json openapi/patch.jq + jq -f 'openapi/patch.jq' openapi/api.orig.json > openapi/api.json -api.patch: api.orig.json api.json - diff -u5 api.orig.json api.json > api.patch || true +openapi/api.patch: openapi/api.orig.json openapi/api.json + diff -u5 openapi/api.orig.json openapi/api.json > openapi/api.patch || true clean: - rm -f api.orig.json api.json api.patch + rm -f openapi/api.orig.json openapi/api.json openapi/api.patch diff --git a/api.json b/openapi/api.json similarity index 64% rename from api.json rename to openapi/api.json index 3658351..3bfe0e3 100644 --- a/api.json +++ b/openapi/api.json @@ -54,6 +54,10 @@ "name": "admin", "description": null }, + { + "name": "User", + "description": "User Admin APIs" + }, { "name": "dashboard", "description": "Dashboard APIs" @@ -134,6 +138,34 @@ "name": "compliance", "description": "Compliance APIs" }, + { + "name": "firewalls", + "description": "Firewalls APIs" + }, + { + "name": "firewall-attachment", + "description": "Firewall Attachments APIs" + }, + { + "name": "user detail choice", + "description": "User Detail Choice APIs" + }, + { + "name": "Admin Images", + "description": "Admin Images Organization APIs" + }, + { + "name": "Admin Flavors", + "description": "Admin Flavors APIs" + }, + { + "name": "Admin Virtual Machines", + "description": "Admin VM APIs" + }, + { + "name": "Admin Environments", + "description": "Admin Environments APIs" + }, { "name": "Pricebook", "description": "Pricebook APIs" @@ -146,6 +178,22 @@ "name": "Calculate", "description": "Calculate APIs" }, + { + "name": "Admin", + "description": "Admin APIs" + }, + { + "name": "Admin Contract", + "description": "Admin Contract APIs" + }, + { + "name": "Customer Contract", + "description": "Customer Contract APIs" + }, + { + "name": "Contract Event", + "description": "Contract Event APIs" + }, { "name": "alive", "description": null @@ -161,23 +209,25 @@ { "name": "payment", "description": null + }, + { + "name": "user", + "description": null } ], "paths": { "/api-key": { "get": { - "tags": [ - "api key" - ], + "tags": ["api key"], "summary": "Get API Key", "operationId": "Get API Key", "responses": { "200": { - "description": "Getting API Key success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKey" + "$ref": "#/components/schemas/GetApiKeyResponseModel" } } } @@ -219,18 +269,16 @@ }, "/api-key/generate": { "post": { - "tags": [ - "api key" - ], + "tags": ["api key"], "summary": "Generate API Key", "operationId": "Generate API Key", "responses": { "200": { - "description": "API Key generated successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/APIKeygeneration" + "$ref": "#/components/schemas/GenerateApiKeyResponseModel" } } } @@ -270,23 +318,29 @@ "/api-key/verify": {}, "/auth/admin/credit-warning-mail/{org_id}": {}, "/auth/admin/data-usages-warning-mail/{org_id}": {}, + "/auth/admin/hibernation-restoration-mail": {}, "/auth/admin/organizations": {}, + "/auth/admin/organizations/summary": {}, "/auth/admin/organizations/{id}": {}, + "/auth/admin/payment-confirmation-mail/{org_id}": {}, "/auth/admin/termination-warning-mail/{org_id}": {}, + "/auth/admin/users": {}, + "/auth/admin/users/{id}": {}, + "/auth/admin/users/{user_id}/update": {}, + "/auth/admin/version": {}, + "/auth/admin/vm-status-mail": {}, "/auth/invites": { "get": { - "tags": [ - "invite" - ], + "tags": ["invite"], "summary": "List Invites", "operationId": "List Invites", "responses": { "200": { - "description": "Getting invites successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Invites" + "$ref": "#/components/schemas/GetInvitesResponseModel" } } } @@ -326,16 +380,14 @@ ] }, "post": { - "tags": [ - "invite" - ], + "tags": ["invite"], "summary": "Invite an user to organization", "operationId": "Invite an user to organization", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InviteUser" + "$ref": "#/components/schemas/InviteUserPayload" } } }, @@ -343,11 +395,11 @@ }, "responses": { "201": { - "description": "Inviting user successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Invite" + "$ref": "#/components/schemas/InviteUserResponseModel" } } } @@ -400,9 +452,7 @@ }, "/auth/invites/{id}": { "delete": { - "tags": [ - "invite" - ], + "tags": ["invite"], "summary": "Delete Invite", "operationId": "Delete Invite", "parameters": [ @@ -421,7 +471,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/CommonResponseModel" } } } @@ -474,9 +524,7 @@ "/auth/logout": {}, "/auth/me": { "get": { - "tags": [ - "auth" - ], + "tags": ["auth"], "summary": "Get me information", "operationId": "Auth user information", "responses": { @@ -485,7 +533,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserInfoResponse" + "$ref": "#/components/schemas/AuthUserInfoResponseModel" } } } @@ -527,18 +575,16 @@ }, "/auth/organizations": { "get": { - "tags": [ - "organization" - ], + "tags": ["organization"], "summary": "Organization Info", "operationId": "Get organization info", "responses": { "200": { - "description": "Successfully retrieved organizations info", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrganizationModel" + "$ref": "#/components/schemas/GetOrganizationResponseModel" } } } @@ -580,16 +626,76 @@ }, "/auth/organizations/remove-member": { "post": { - "tags": [ - "organization" - ], + "tags": ["organization"], "summary": "Remove a member from organization", "operationId": "Remove a member from organization", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Removemember" + "$ref": "#/components/schemas/RemoveMemberPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveMemberFromOrganizationResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/auth/organizations/update": { + "put": { + "tags": ["organization"], + "summary": "Update organization info", + "operationId": "Update organization info", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrganizationPayload" } } }, @@ -597,11 +703,11 @@ }, "responses": { "200": { - "description": "The member was removed from your organization", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RemoveMemberResponse" + "$ref": "#/components/schemas/UpdateOrganizationResponseModel" } } } @@ -644,9 +750,7 @@ }, "/auth/permissions": { "get": { - "tags": [ - "permission" - ], + "tags": ["permission"], "summary": "List Permissions", "operationId": "List Permissions", "responses": { @@ -655,7 +759,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Permissions" + "$ref": "#/components/schemas/GetPermissionsResponseModel" } } } @@ -698,18 +802,16 @@ "/auth/permissions/{id}": {}, "/auth/policies": { "get": { - "tags": [ - "policy" - ], + "tags": ["policy"], "summary": "List Policies", "operationId": "List Policies", "responses": { "200": { - "description": "Getting policies success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Policies" + "$ref": "#/components/schemas/GetPoliciesResponseModel" } } } @@ -754,18 +856,16 @@ "/auth/request-login": {}, "/auth/roles": { "get": { - "tags": [ - "rbac role" - ], + "tags": ["rbac role"], "summary": "List RBAC Roles", "operationId": "List RBAC Roles", "responses": { "200": { - "description": "Getting RBAC roles success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBACRoles" + "$ref": "#/components/schemas/GetRbacRolesResponseModel" } } } @@ -805,16 +905,14 @@ ] }, "post": { - "tags": [ - "rbac role" - ], + "tags": ["rbac role"], "summary": "Create RBAC Role", "operationId": "Create RBAC Role", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBACRolePayload" + "$ref": "#/components/schemas/CreateUpdateRbacRolePayload" } } }, @@ -822,11 +920,11 @@ }, "responses": { "201": { - "description": "Creating RBAC role success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBACRole" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -879,9 +977,7 @@ }, "/auth/roles/{id}": { "get": { - "tags": [ - "rbac role" - ], + "tags": ["rbac role"], "summary": "Get a RBAC Role Detail", "operationId": "Get a RBAC Role Detail", "parameters": [ @@ -896,11 +992,11 @@ ], "responses": { "200": { - "description": "Getting RBAC role detail success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBACRole" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -950,9 +1046,7 @@ ] }, "put": { - "tags": [ - "rbac role" - ], + "tags": ["rbac role"], "summary": "Update a RBAC Role", "operationId": "Update a RBAC Role", "parameters": [ @@ -969,7 +1063,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBACRolePayload" + "$ref": "#/components/schemas/CreateUpdateRbacRolePayload" } } }, @@ -977,11 +1071,11 @@ }, "responses": { "200": { - "description": "RBAC Role updated successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBACRole" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -1032,9 +1126,7 @@ "x-codegen-request-body-name": "payload" }, "delete": { - "tags": [ - "rbac role" - ], + "tags": ["rbac role"], "summary": "Delete a RBAC Role", "operationId": "Delete a RBAC Role", "parameters": [ @@ -1049,11 +1141,11 @@ ], "responses": { "200": { - "description": "RBAC Role deleted successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/CommonResponseModel" } } } @@ -1103,22 +1195,21 @@ ] } }, + "/auth/send/welcome-email/{user_id}": {}, "/auth/sendgrid-webhook": {}, "/auth/token": {}, "/auth/users/me/permissions": { "get": { - "tags": [ - "user permission" - ], + "tags": ["user permission"], "summary": "List Current User Permissions", "operationId": "List Current User Permissions", "responses": { "200": { - "description": "Getting my permissions successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionsforUserPermission" + "$ref": "#/components/schemas/GetUserPermissionsResponseModel" } } } @@ -1160,9 +1251,7 @@ }, "/auth/users/{id}/permissions": { "get": { - "tags": [ - "user permission" - ], + "tags": ["user permission"], "summary": "List User Permissions", "operationId": "List User Permissions", "parameters": [ @@ -1177,11 +1266,11 @@ ], "responses": { "200": { - "description": "Getting user permissions successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PermissionsforUserPermission" + "$ref": "#/components/schemas/GetUserPermissionsResponseModel" } } } @@ -1233,9 +1322,7 @@ }, "/auth/users/{user_id}/assign-roles": { "put": { - "tags": [ - "assigning member role" - ], + "tags": ["assigning member role"], "summary": "Assign RBAC Roles", "operationId": "Assign RBAC Roles", "parameters": [ @@ -1252,7 +1339,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssignRBACRolePayload" + "$ref": "#/components/schemas/AssignRbacRolePayload" } } }, @@ -1260,11 +1347,11 @@ }, "responses": { "200": { - "description": "Assigning RBAC Role success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBACRole" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -1317,9 +1404,7 @@ }, "/auth/users/{user_id}/roles": { "delete": { - "tags": [ - "assigning member role" - ], + "tags": ["assigning member role"], "summary": "Remove role from a user", "operationId": "Remove role from a user", "parameters": [ @@ -1334,11 +1419,11 @@ ], "responses": { "200": { - "description": "RBAC member role deleted successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/CommonResponseModel" } } } @@ -1389,23 +1474,35 @@ } }, "/internal/users/{id}/permissions": {}, + "/core/admin/environments/bootstrap-enviroments": {}, + "/core/admin/flavors": {}, + "/core/admin/flavors/{flavor_id}": {}, + "/core/admin/flavors/{flavor_id}/vms": {}, + "/core/admin/images": {}, + "/core/admin/images/{image_id}": {}, "/core/admin/keypairs": {}, "/core/admin/organizations/{id}/hibernate": {}, "/core/admin/resources": {}, + "/core/admin/resources/count": {}, + "/core/admin/resources/defaults": {}, + "/core/admin/resources/sync": {}, "/core/admin/resources/{id}": {}, + "/core/admin/version": {}, "/core/admin/virtual-machines": {}, + "/core/admin/virtual-machines/delete-expired-contracted-vms": {}, + "/core/admin/virtual-machines/summary": {}, "/core/admin/virtual-machines/{id}": {}, + "/core/admin/virtual-machines/{id}/lock": {}, "/core/admin/virtual-machines/{id}/stop": {}, "/core/admin/virtual-machines/{virtual_machine_id}/events": {}, "/core/admin/virtual-machines/{virtual_machine_id}/hibernate": {}, "/core/admin/virtual-machines/{virtual_machine_id}/hibernate-restore": {}, "/core/compliance": { "get": { - "tags": [ - "compliance" - ], - "summary": "Get Compliance List", - "operationId": "Get Compliance List", + "tags": ["compliance"], + "summary": "Retrieve GPU compliance", + "description": "Returns a list of compliance objects each corresponding to available GPU models. These compliance objects contain minimum and maximum values for RAM in GB, number of vCPUs, and system disk capacity in GB. Use the optional `gpu` model parameter in the query string to filter responses by GPU model. For additional details on GPU compliance, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#adhering-to-gpu-compliance).", + "operationId": "Retrieve compliance", "parameters": [ { "name": "gpu", @@ -1416,7 +1513,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Compliance list retrieved successfully.", "content": { "application/json": { "schema": { @@ -1480,9 +1577,7 @@ ] }, "put": { - "tags": [ - "compliance" - ], + "tags": ["compliance"], "summary": "Update a compliance", "operationId": "Update a compliance", "requestBody": { @@ -1562,10 +1657,8 @@ "x-codegen-request-body-name": "payload" }, "post": { - "tags": [ - "compliance" - ], - "summary": "Create Compliance", + "tags": ["compliance"], + "summary": "Create compliance", "operationId": "Create Compliance", "requestBody": { "content": { @@ -1656,9 +1749,7 @@ }, "/core/compliance/{gpu_model}": { "delete": { - "tags": [ - "compliance" - ], + "tags": ["compliance"], "summary": "Delete a compliance", "operationId": "Delete a compliance", "parameters": [ @@ -1729,11 +1820,10 @@ }, "/core/dashboard": { "get": { - "tags": [ - "dashboard" - ], - "summary": "Get Instances, Containers and Volumes Overview", - "operationId": "Get Instances, Containers and Volumes Overview", + "tags": ["dashboard"], + "summary": "Retrieve Dashboard", + "description": "Returns hardware and pricing overview for your active resources, including virtual machines, containers, and volumes. For additional information on the Dashboard feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/dashboard).", + "operationId": "Retrieve Dashboard", "responses": { "200": { "description": "Getting dashboard info success", @@ -1782,14 +1872,13 @@ }, "/core/environments": { "get": { - "tags": [ - "environment" - ], - "summary": "List Environments", - "operationId": "List Environments", + "tags": ["environment"], + "summary": "List environments", + "description": "Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features).", + "operationId": "List environments", "responses": { "200": { - "description": "Getting environments successful", + "description": "Successful retrieval of environments list.", "content": { "application/json": { "schema": { @@ -1833,11 +1922,10 @@ ] }, "post": { - "tags": [ - "environment" - ], - "summary": "Create Environment", - "operationId": "Create Environment", + "tags": ["environment"], + "summary": "Create environment", + "description": "Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body.", + "operationId": "Create environment", "requestBody": { "content": { "application/json": { @@ -1850,7 +1938,7 @@ }, "responses": { "200": { - "description": "Environment is created successfully", + "description": "Environment has been created successfully", "content": { "application/json": { "schema": { @@ -1917,11 +2005,10 @@ }, "/core/environments/{id}": { "get": { - "tags": [ - "environment" - ], - "summary": "Get an environment detail", - "operationId": "Get an environment details", + "tags": ["environment"], + "summary": "Retrieve environment", + "description": "Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.", + "operationId": "Retrieve environment", "parameters": [ { "name": "id", @@ -1934,7 +2021,7 @@ ], "responses": { "200": { - "description": "Getting detail successful", + "description": "Environment details retrieved successfully.", "content": { "application/json": { "schema": { @@ -1988,11 +2075,10 @@ ] }, "put": { - "tags": [ - "environment" - ], - "summary": "Update Environment", - "operationId": "Update an environment", + "tags": ["environment"], + "summary": "Update environment", + "description": "Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.", + "operationId": "Update environment", "parameters": [ { "name": "id", @@ -2015,7 +2101,7 @@ }, "responses": { "200": { - "description": "Update an environment success", + "description": "Environment name successfully updated.", "content": { "application/json": { "schema": { @@ -2070,11 +2156,10 @@ "x-codegen-request-body-name": "payload" }, "delete": { - "tags": [ - "environment" - ], - "summary": "Delete an environment", - "operationId": "Delete an environment", + "tags": ["environment"], + "summary": "Delete environment", + "description": "Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.", + "operationId": "Delete environment", "parameters": [ { "name": "id", @@ -2087,7 +2172,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "The environment has been successfully deleted.", "content": { "application/json": { "schema": { @@ -2141,28 +2226,18 @@ ] } }, - "/core/flavors": { + "/core/firewalls": { "get": { - "tags": [ - "flavor" - ], - "summary": "Retrieve Flavors", - "operationId": "Retrieve Flavors", - "parameters": [ - { - "name": "region", - "in": "query", - "description": "Region Name", - "schema": {} - } - ], + "tags": ["firewalls"], + "summary": "Retrieve Firewalls", + "operationId": "Retrieve Firewalls", "responses": { "200": { - "description": "Getting flavors successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FlavorListResponse" + "$ref": "#/components/schemas/FirewallsListResponse" } } } @@ -2187,8 +2262,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -2210,22 +2285,28 @@ "apiKey": [] } ] - } - }, - "/core/gpus": { - "get": { - "tags": [ - "gpu" - ], - "summary": "Get GPU List", - "operationId": "Get GPU List", + }, + "post": { + "tags": ["firewalls"], + "summary": "Create Firewall", + "operationId": "Create Firewall", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFirewallPayload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Getting GPU list successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GPUList" + "$ref": "#/components/schemas/FirewallResponse" } } } @@ -2250,61 +2331,8 @@ } } }, - "500": { - "description": "Internal Server Error", - "content": {} - } - }, - "security": [ - { - "accessToken": [] - }, - { - "apiKey": [] - } - ] - } - }, - "/core/gpus/{id}": {}, - "/core/image-logos": {}, - "/core/images": { - "get": { - "tags": [ - "image" - ], - "summary": "Retrieve Images", - "operationId": "Retrieve Images", - "parameters": [ - { - "name": "region", - "in": "query", - "description": "Region Name", - "schema": {} - } - ], - "responses": { - "200": { - "description": "Getting images successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Images" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -2323,8 +2351,8 @@ } } }, - "406": { - "description": "Not Acceptable", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -2345,22 +2373,18 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/core/internal/callbacks/test": {}, - "/core/internal/virtual-machines": {}, - "/core/internal/volumes": {}, - "/core/keypair/{id}": { - "put": { - "tags": [ - "keypair" - ], - "summary": "Update Keypair name", - "operationId": "Update Keypair name", + "/core/firewalls/{firewall_id}/firewall-rules": { + "post": { + "tags": ["firewalls"], + "summary": "Add Rules to Firewall", + "operationId": "Add Rules to Firewall", "parameters": [ { - "name": "id", + "name": "firewall_id", "in": "path", "required": true, "schema": { @@ -2372,7 +2396,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateKeypairName" + "$ref": "#/components/schemas/CreateFirewallRulePayload" } } }, @@ -2380,11 +2404,11 @@ }, "responses": { "200": { - "description": "Keypair name updated successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateKeypairnameresponse" + "$ref": "#/components/schemas/FirewallRule" } } } @@ -2409,8 +2433,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -2433,16 +2457,24 @@ } ], "x-codegen-request-body-name": "payload" - }, + } + }, + "/core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id}": { "delete": { - "tags": [ - "keypair" - ], - "summary": "Delete Keypair", - "operationId": "Delete Keypair", + "tags": ["firewalls"], + "summary": "Delete Firewall Rules from Firewall", + "operationId": "Delete Firewall Rules from Firewall", "parameters": [ { - "name": "id", + "name": "firewall_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "firewall_rule_id", "in": "path", "required": true, "schema": { @@ -2481,51 +2513,18 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": {} - } - }, - "security": [ - { - "accessToken": [] - }, - { - "apiKey": [] - } - ] - } - }, - "/core/keypairs": { - "get": { - "tags": [ - "keypair" - ], - "summary": "Retrieve Keypairs", - "operationId": "Retrieve User Keypairs", - "responses": { - "200": { - "description": "Getting user keypairs successful", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Keypairs" + "$ref": "#/components/schemas/ErrorResponseModel" } } } }, - "400": { - "description": "Bad Request", + "404": { + "description": "Not Exists", "content": { "application/json": { "schema": { @@ -2534,8 +2533,8 @@ } } }, - "401": { - "description": "Unauthorized", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -2557,18 +2556,28 @@ "apiKey": [] } ] - }, + } + }, + "/core/firewalls/{firewall_id}/update-attachments": { "post": { - "tags": [ - "keypair" + "tags": ["firewall-attachment"], + "summary": "Attach Firewalls to VMs", + "operationId": "Attach Firewall to VMs", + "parameters": [ + { + "name": "firewall_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "Import Keypair", - "operationId": "Import Keypair", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImportKeypairPayload" + "$ref": "#/components/schemas/AttachFirewallWithVM" } } }, @@ -2576,11 +2585,11 @@ }, "responses": { "200": { - "description": "Keypair is imported successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ImportKeypairResponse" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -2605,6 +2614,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "404": { "description": "Not Found", "content": { @@ -2641,20 +2660,28 @@ "x-codegen-request-body-name": "payload" } }, - "/core/marketplace/deployments": { + "/core/firewalls/{id}": { "get": { - "tags": [ - "deployment" + "tags": ["firewalls"], + "summary": "Details of Firewall by ID", + "operationId": "Details of Firewall by ID", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "List Deployments", - "operationId": "List Deployments", "responses": { "200": { - "description": "Getting deployments success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Deployments" + "$ref": "#/components/schemas/FirewallDetailResponse" } } } @@ -2679,6 +2706,26 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -2693,29 +2740,27 @@ } ] }, - "post": { - "tags": [ - "deployment" - ], - "summary": "Start Deployment", - "operationId": "Start Deployment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartDeploymentPayload" - } + "delete": { + "tags": ["firewalls"], + "summary": "Delete Firewall", + "operationId": "Delete Firewall", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "Deployment created successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StartDeployment" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -2740,6 +2785,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "404": { "description": "Not Found", "content": { @@ -2772,34 +2827,30 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/core/marketplace/deployments/{id}": { + "/core/flavors": { "get": { - "tags": [ - "deployment" - ], - "summary": "Details of Deployment by ID", - "operationId": "Details of Deployment by ID", + "tags": ["flavor"], + "summary": "List flavors", + "description": "Returns a list of available virtual machine specification configurations, referred to as **flavors**. Include a `region_name` in the query string of the request to return only the flavors available in the specified region; the default value will retrieve flavors available in all regions. For more details on flavors, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors).", + "operationId": "List flavors", "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } + "name": "region", + "in": "query", + "description": "Region Name", + "schema": {} } ], "responses": { "200": { - "description": "Getting deployment detail success", + "description": "Successful retrieval of flavors list.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StartDeployment" + "$ref": "#/components/schemas/FlavorListResponse" } } } @@ -2847,30 +2898,21 @@ "apiKey": [] } ] - }, - "delete": { - "tags": [ - "deployment" - ], - "summary": "Delete Deployment", - "operationId": "Delete Deployment", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], + } + }, + "/core/gpus": { + "get": { + "tags": ["gpu"], + "summary": "List GPUs", + "description": "Returns a list of all available GPUs that can be utilized in the creation of custom virtual machine configurations.", + "operationId": "List GPUs", "responses": { - "202": { - "description": "Success", + "200": { + "description": "Retrieval of GPUs list successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/GPUList" } } } @@ -2895,16 +2937,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -2920,28 +2952,29 @@ ] } }, - "/core/marketplace/templates": { + "/core/gpus/{id}": {}, + "/core/image-logos": {}, + "/core/images": { "get": { - "tags": [ - "template" - ], - "summary": "List Templates", - "operationId": "List Templates", + "tags": ["image"], + "summary": "List images", + "description": "Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. Include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. For more information on OS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images).", + "operationId": "List images", "parameters": [ { - "name": "visibility", + "name": "region", "in": "query", - "description": "visibility: public/private", + "description": "Region Name", "schema": {} } ], "responses": { "200": { - "description": "Getting templates success", + "description": "Retrieval of images list successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Templates" + "$ref": "#/components/schemas/Images" } } } @@ -2966,6 +2999,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "406": { "description": "Not Acceptable", "content": { @@ -2989,54 +3032,44 @@ "apiKey": [] } ] - }, - "post": { - "tags": [ - "template" + } + }, + "/core/internal/callbacks/test": {}, + "/core/internal/virtual-machines": {}, + "/core/internal/volumes": {}, + "/core/keypair/{id}": { + "put": { + "tags": ["keypair"], + "summary": "Update key pair name", + "description": "Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body.", + "operationId": "Update key pair name", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "Create Template", - "operationId": "Create Template", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "required": [ - "content", - "description", - "is_public", - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "name is required" - }, - "description": { - "type": "string", - "description": "description is required" - }, - "is_public": { - "type": "string", - "description": "is_public is required" - }, - "content": { - "type": "string", - "description": "YAML file is required", - "format": "binary" - } - } + "$ref": "#/components/schemas/UpdateKeypairName" } } }, "required": true }, "responses": { - "201": { - "description": "Template added successfully", + "200": { + "description": "Keypair name updated successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Template" + "$ref": "#/components/schemas/UpdateKeypairnameresponse" } } } @@ -3061,6 +3094,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -3073,16 +3116,14 @@ { "apiKey": [] } - ] - } - }, - "/core/marketplace/templates/{id}": { - "get": { - "tags": [ - "template" ], - "summary": "Details of a Template by ID", - "operationId": "Details of a Template by ID", + "x-codegen-request-body-name": "payload" + }, + "delete": { + "tags": ["keypair"], + "summary": "Delete key pair", + "description": "Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair.", + "operationId": "Delete key pair", "parameters": [ { "name": "id", @@ -3095,11 +3136,11 @@ ], "responses": { "200": { - "description": "Getting template detail success", + "description": "Keypair successfully deleted.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Template" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -3147,40 +3188,21 @@ "apiKey": [] } ] - }, - "put": { - "tags": [ - "template" - ], - "summary": "Update Template", - "operationId": "Update Template", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTemplate" - } - } - }, - "required": true - }, + } + }, + "/core/keypairs": { + "get": { + "tags": ["keypair"], + "summary": "List key pairs", + "description": "Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features).", + "operationId": "List key pairs", "responses": { "200": { - "description": "Template updated successfully", + "description": "Retrieval of key pairs list successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Template" + "$ref": "#/components/schemas/Keypairs" } } } @@ -3205,16 +3227,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -3227,32 +3239,30 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] }, - "delete": { - "tags": [ - "template" - ], - "summary": "Delete a Template", - "operationId": "Delete a Template", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" + "post": { + "tags": ["keypair"], + "summary": "Import key pair", + "description": "Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key).", + "operationId": "Import key pair", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImportKeypairPayload" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "Keypair is imported successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/ImportKeypairResponse" } } } @@ -3287,6 +3297,16 @@ } } }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -3299,23 +3319,22 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/core/profiles": { + "/core/marketplace/deployments": { "get": { - "tags": [ - "profile" - ], - "summary": "Get Profile List", - "operationId": "Get Profile List", + "tags": ["deployment"], + "summary": "List Deployments", + "operationId": "List Deployments", "responses": { "200": { - "description": "Getting profiles success.", + "description": "Getting deployments success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProfileListResponse" + "$ref": "#/components/schemas/Deployments" } } } @@ -3355,28 +3374,26 @@ ] }, "post": { - "tags": [ - "profile" - ], - "summary": "Create a profile", - "operationId": "Create Profile", + "tags": ["deployment"], + "summary": "Start Deployment", + "operationId": "Start Deployment", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProfilePayload" + "$ref": "#/components/schemas/StartDeploymentPayload" } } }, "required": true }, "responses": { - "201": { - "description": "Profile created successfully", + "200": { + "description": "Deployment created successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProfileResponse" + "$ref": "#/components/schemas/StartDeployment" } } } @@ -3401,6 +3418,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "409": { "description": "Conflict", "content": { @@ -3427,13 +3454,11 @@ "x-codegen-request-body-name": "payload" } }, - "/core/profiles/{id}": { + "/core/marketplace/deployments/{id}": { "get": { - "tags": [ - "profile" - ], - "summary": "Get a Profile Detail", - "operationId": "Get a Profile Detail", + "tags": ["deployment"], + "summary": "Details of Deployment by ID", + "operationId": "Details of Deployment by ID", "parameters": [ { "name": "id", @@ -3446,11 +3471,11 @@ ], "responses": { "200": { - "description": "Getting profile detail success.", + "description": "Getting deployment detail success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateProfileResponse" + "$ref": "#/components/schemas/StartDeployment" } } } @@ -3500,11 +3525,9 @@ ] }, "delete": { - "tags": [ - "profile" - ], - "summary": "Delete Profile", - "operationId": "Delete Profile", + "tags": ["deployment"], + "summary": "Delete Deployment", + "operationId": "Delete Deployment", "parameters": [ { "name": "id", @@ -3516,7 +3539,7 @@ } ], "responses": { - "200": { + "202": { "description": "Success", "content": { "application/json": { @@ -3571,20 +3594,27 @@ ] } }, - "/core/regions": { + "/core/marketplace/templates": { "get": { - "tags": [ - "region" + "tags": ["template"], + "summary": "List templates", + "description": "Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#view-a-list-of-templates).", + "operationId": "List templates", + "parameters": [ + { + "name": "visibility", + "in": "query", + "description": "Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.", + "schema": {} + } ], - "summary": "Getting regions", - "operationId": "Getting regions", "responses": { "200": { - "description": "Getting regions successful.", + "description": "Templates list successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Regions" + "$ref": "#/components/schemas/Templates" } } } @@ -3609,6 +3639,16 @@ } } }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -3622,23 +3662,49 @@ "apiKey": [] } ] - } - }, - "/core/regions/{id}": {}, - "/core/sg-rules-protocols": { - "get": { - "tags": [ - "security-rules" - ], - "summary": "Retrieve Security Rule Protocols", - "operationId": "Retrieve Security Rule Protocols", + }, + "post": { + "tags": ["template"], + "summary": "Create template", + "description": "Creates a resource template for deployment.", + "operationId": "Create template", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": ["content", "description", "is_public", "name"], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name is required" + }, + "description": { + "type": "string", + "description": "description is required" + }, + "is_public": { + "type": "string", + "description": "is_public is required" + }, + "content": { + "type": "string", + "description": "YAML file is required", + "format": "binary" + } + } + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "Getting security rule protocols successful", + "201": { + "description": "Template added successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityRulesProtocolFields" + "$ref": "#/components/schemas/Template" } } } @@ -3678,19 +3744,39 @@ ] } }, - "/core/stocks": { + "/core/marketplace/templates/{id}": { "get": { - "tags": [ - "stock" + "tags": ["template"], + "summary": "Retrieve template details", + "description": "Retrieves the resource configuration details for a specified template. Provide the template ID in the path to retrieve details for the specified template. For additional information on template configuration details, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#retrieve-the-details-for-a-template).", + "operationId": "Retrieve template details", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "operationId": "Retrieve Stocks", "responses": { "200": { - "description": "Stocks Retrived Successfully.", + "description": "Template details retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NewStockRetriveResponse" + "$ref": "#/components/schemas/Template" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" } } } @@ -3706,8 +3792,14 @@ } }, "404": { - "description": "Stocks Not Found", - "content": {} + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } }, "500": { "description": "Internal Server Error", @@ -3722,79 +3814,27 @@ "apiKey": [] } ] - } - }, - "/core/stocks/details": {}, - "/core/stocks/upcoming": {}, - "/core/stocks/upcoming/{id}": {}, - "/core/stocks/upcoming/{node_id}/stock": {}, - "/core/stocks/upcoming/{node_id}/stock/{stock_id}": {}, - "/core/stocks/visibility": {}, - "/core/stocks/visibility/add-users": {}, - "/core/stocks/visibility/remove-users": {}, - "/core/virtual-machines": { - "get": { - "tags": [ - "virtual machine" - ], - "summary": "List Instances", - "operationId": "List Instances", - "responses": { - "200": { - "description": "Getting instances successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Instances" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": {} - } - }, - "security": [ - { - "accessToken": [] - }, + }, + "put": { + "tags": ["template"], + "summary": "Update template", + "description": "Updates the details of a template. Modify the template name, description and/or `is_public` status to change the public/private visibility of the template.", + "operationId": "Update template", + "parameters": [ { - "apiKey": [] + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } } - ] - }, - "post": { - "tags": [ - "virtual machine" ], - "summary": "Create Instances", - "operationId": "Create Instances", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateInstancesPayload" + "$ref": "#/components/schemas/UpdateTemplate" } } }, @@ -3802,11 +3842,11 @@ }, "responses": { "200": { - "description": "Instances are created successfully", + "description": "Template updated successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Instances" + "$ref": "#/components/schemas/Template" } } } @@ -3841,26 +3881,6 @@ } } }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -3875,15 +3895,12 @@ } ], "x-codegen-request-body-name": "payload" - } - }, - "/core/virtual-machines/{id}": { - "get": { - "tags": [ - "virtual machine" - ], - "summary": "Get an instance details", - "operationId": "Get an instance details", + }, + "delete": { + "tags": ["template"], + "summary": "Delete template", + "description": "Permanently deletes a template. Supply the template ID in the path to delete the specified template.", + "operationId": "Delete template", "parameters": [ { "name": "id", @@ -3896,11 +3913,11 @@ ], "responses": { "200": { - "description": "Getting instance detail successful", + "description": "Template deleted successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Instance" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -3948,30 +3965,21 @@ "apiKey": [] } ] - }, - "delete": { - "tags": [ - "virtual machine" - ], - "summary": "Delete an instance", - "operationId": "Delete an instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], + } + }, + "/core/profiles": { + "get": { + "tags": ["profile"], + "summary": "List profiles", + "description": "Returns a list of your existing provisioning profiles, providing virtual machine configuration details for each. For additional information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles#retrieve-a-list-of-profiles).", + "operationId": "List profiles", "responses": { "200": { - "description": "Success", + "description": "Getting profiles success.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/ProfileListResponse" } } } @@ -3996,16 +4004,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4019,42 +4017,29 @@ "apiKey": [] } ] - } - }, - "/core/virtual-machines/{id}/attach-callback": { + }, "post": { - "tags": [ - "callbacks" - ], - "summary": "Attach a callback to an instance", - "operationId": "Attach a callback to an instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], + "tags": ["profile"], + "summary": "Create profile", + "description": "Creates a provisioning profile to save the configuration of a virtual machine for future use. Include the profile name, description, and virtual machine configuration details in the request body. For more information about virtual machine profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles).", + "operationId": "Create profile", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttachCallbackPayload" + "$ref": "#/components/schemas/CreateProfilePayload" } } }, "required": true }, "responses": { - "200": { - "description": "Callback URL successfully attached to your instance. Any action events on your instance will be posted to the provided URL", + "201": { + "description": "Profile created successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttachCallbackResponse" + "$ref": "#/components/schemas/CreateProfileResponse" } } } @@ -4079,8 +4064,8 @@ } } }, - "404": { - "description": "Not Found", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -4105,13 +4090,12 @@ "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{id}/attach-floatingip": { - "post": { - "tags": [ - "floating ip" - ], - "summary": "Attach Floating IP to Instance", - "operationId": "Attach Floating IP to Instance", + "/core/profiles/{id}": { + "get": { + "tags": ["profile"], + "summary": "Retrieve profile details", + "description": "Retrieves details for an existing provisioning profile by supplying the profile ID in the request path. For more information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles).", + "operationId": "Retrieve profile details", "parameters": [ { "name": "id", @@ -4124,17 +4108,17 @@ ], "responses": { "200": { - "description": "Success", + "description": "Profile details retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/CreateProfileResponse" } } } }, "400": { - "description": "Insufficient balance to create the resource", + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -4176,15 +4160,12 @@ "apiKey": [] } ] - } - }, - "/core/virtual-machines/{id}/delete-callback": { + }, "delete": { - "tags": [ - "callbacks" - ], - "summary": "Delete a callback URL for an instance", - "operationId": "Delete a callback URL for an instance", + "tags": ["profile"], + "summary": "Delete profile", + "description": "Permanently deletes a provisioning profile. Supply the profile ID in the path to delete the specified profile.", + "operationId": "Delete profile", "parameters": [ { "name": "id", @@ -4197,7 +4178,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Profile deleted successfully.", "content": { "application/json": { "schema": { @@ -4251,30 +4232,19 @@ ] } }, - "/core/virtual-machines/{id}/detach-floatingip": { - "post": { - "tags": [ - "floating ip" - ], - "summary": "Detach Floating IP to Instance", - "operationId": "Detach Floating IP to Instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], + "/core/regions": { + "get": { + "tags": ["region"], + "summary": "List regions", + "description": "Lists the currently available regions, each representing a distinct geographic location housing a data center. For additional information on regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions).", + "operationId": "List regions", "responses": { "200": { - "description": "Success", + "description": "Successful retrieval of regions list.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Regions" } } } @@ -4299,16 +4269,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4324,30 +4284,20 @@ ] } }, - "/core/virtual-machines/{id}/hard-reboot": { + "/core/regions/{id}": {}, + "/core/sg-rules-protocols": { "get": { - "tags": [ - "virtual machine" - ], - "summary": "Hard Reboot Instance", - "operationId": "Hard Reboot Instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], + "tags": ["security-rules"], + "summary": "List firewall rule protocols", + "description": "Returns a list of all available protocols that can be used in the creation of firewall rules for your virtual machines.", + "operationId": "List firewall rule protocols", "responses": { "200": { - "description": "Success", + "description": "Protocols list successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/SecurityRulesProtocolFields" } } } @@ -4372,16 +4322,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4397,40 +4337,18 @@ ] } }, - "/core/virtual-machines/{id}/request-console": { + "/core/stocks": { "get": { - "tags": [ - "vnc url" - ], - "summary": "Request Instance Console", - "operationId": "Request Console", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], + "tags": ["stock"], + "description": "Returns information on current and upcoming GPU availability, organized by region and GPU model. For additional information on GPU stocks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/gpu-stock-information).", + "operationId": "Retrieve GPU stocks", "responses": { "200": { - "description": "Please wait a few seconds and visit the below link to access your VNC console URL", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RequestConsole" - } - } - } - }, - "400": { - "description": "Bad Request", + "description": "GPU stocks retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" + "$ref": "#/components/schemas/NewStockRetriveResponse" } } } @@ -4446,14 +4364,8 @@ } }, "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } + "description": "Stocks Not Found", + "content": {} }, "500": { "description": "Internal Server Error", @@ -4470,40 +4382,26 @@ ] } }, - "/core/virtual-machines/{id}/sg-rules": { - "post": { - "tags": [ - "virtual machine" - ], - "summary": "Add Security Rule", - "operationId": "Add Security Rule", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateSecurityRulePayload" - } - } - }, - "required": true - }, + "/core/stocks/details": {}, + "/core/stocks/upcoming": {}, + "/core/stocks/upcoming/{id}": {}, + "/core/stocks/upcoming/{node_id}/stock": {}, + "/core/stocks/upcoming/{node_id}/stock/{stock_id}": {}, + "/core/stocks/visibility": {}, + "/core/stocks/visibility/add-users": {}, + "/core/stocks/visibility/remove-users": {}, + "/core/user/resources/defaults": { + "get": { + "tags": ["user detail choice"], + "summary": "Retrieve default flavors and images for user", + "operationId": "Retrieve default flavors and images for user", "responses": { "200": { - "description": "Security Rule created successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecurityGroupRule" + "$ref": "#/components/schemas/UserDefaultChoicesForUserResponse" } } } @@ -4528,18 +4426,8 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "409": { - "description": "Conflict", + "405": { + "description": "Method Not Allowed", "content": { "application/json": { "schema": { @@ -4560,34 +4448,22 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/core/virtual-machines/{id}/start": { + "/core/virtual-machines": { "get": { - "tags": [ - "virtual machine" - ], - "summary": "Start Instance", - "operationId": "Start Instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], + "tags": ["virtual machine"], + "summary": "List all virtual machines", + "description": "Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.", + "operationId": "List virtual machines", "responses": { "200": { - "description": "Success", + "description": "Successful retrieval of virtual machine list.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Instances" } } } @@ -4612,16 +4488,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4635,32 +4501,29 @@ "apiKey": [] } ] - } - }, - "/core/virtual-machines/{id}/stop": { - "get": { - "tags": [ - "virtual machine" - ], - "summary": "Stop Instance", - "operationId": "Stop Instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" + }, + "post": { + "tags": ["virtual machine"], + "summary": "Create virtual machine", + "description": "Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).", + "operationId": "Create virtual machine", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateInstancesPayload" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "Virtual machine(s) created successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Instances" } } } @@ -4695,6 +4558,26 @@ } } }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -4707,19 +4590,18 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{id}/update-callback": { - "put": { - "tags": [ - "callbacks" - ], - "summary": "Update a callback URL", - "operationId": "Update a callback URL", + "/core/virtual-machines/contract/{contract_id}/virtual-machines": { + "get": { + "tags": ["virtual machine"], + "summary": "Retrieve virtual machines associated with a contract", + "operationId": "Retrieve virtual machines associated with a contract", "parameters": [ { - "name": "id", + "name": "contract_id", "in": "path", "required": true, "schema": { @@ -4727,23 +4609,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachCallbackPayload" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Callback URL successfully updated.", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttachCallbackResponse" + "$ref": "#/components/schemas/ContractInstancesResponse" } } } @@ -4768,16 +4640,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4790,20 +4652,18 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/core/virtual-machines/{virtual_machine_id}/attach-volumes": { - "post": { - "tags": [ - "volume attachment" - ], - "summary": "Attach Volumes", - "operationId": "Attach Volumes", + "/core/virtual-machines/{id}": { + "get": { + "tags": ["virtual machine"], + "summary": "Retrieve virtual machine details", + "description": "Retrieves the details of an existing virtual machine. Supply the virtual machine ID in the path, and Infrahub will return the corresponding Virtual Machine object.", + "operationId": "Retrieve virtual machine details", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -4811,23 +4671,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachVolumesPayload" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Volumes attaching now.", + "description": "Virtual machine details retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttachVolumes" + "$ref": "#/components/schemas/Instance" } } } @@ -4862,16 +4712,6 @@ } } }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4884,28 +4724,16 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" - } - }, - "/core/virtual-machines/{virtual_machine_id}/console/{job_id}": { - "get": { - "tags": [ - "vnc url" - ], - "summary": "Get VNC Console Link", - "operationId": "Get VNC Console Link", + ] + }, + "delete": { + "tags": ["virtual machine"], + "summary": "Delete virtual machine", + "description": "Permanently deletes a virtual machine. Supply the virtual machine ID in the path to delete the specified virtual machine.", + "operationId": "Delete virtual machine", "parameters": [ { - "name": "virtual_machine_id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "job_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -4915,11 +4743,11 @@ ], "responses": { "200": { - "description": "Get VNC Console Link Success", + "description": "Virtual machine deleted successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VNCURL" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -4954,6 +4782,16 @@ } } }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -4969,16 +4807,15 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/detach-volumes": { + "/core/virtual-machines/{id}/attach-callback": { "post": { - "tags": [ - "volume attachment" - ], - "summary": "Detach Volumes", - "operationId": "Detach Volumes", + "tags": ["callbacks"], + "summary": "Attach callback to virtual machine", + "description": "Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine).", + "operationId": "Attach callback to virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -4990,7 +4827,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetachVolumesPayload" + "$ref": "#/components/schemas/AttachCallbackPayload" } } }, @@ -4998,11 +4835,11 @@ }, "responses": { "200": { - "description": "Volumes detaching now.", + "description": "Callback URL successfully attached to your virtual machine. Any action events on your virtual machine will be posted to the provided URL", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DetachVolumes" + "$ref": "#/components/schemas/AttachCallbackResponse" } } } @@ -5037,16 +4874,6 @@ } } }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -5063,36 +4890,35 @@ "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{virtual_machine_id}/events": { - "get": { - "tags": [ - "virtual machine events" - ], - "summary": "Fetch all of the instance events", - "operationId": "Fetch all of the instance events", + "/core/virtual-machines/{id}/attach-floatingip": { + "post": { + "tags": ["floating ip"], + "summary": "Attach public IP to virtual machine", + "description": "Initiates the creation of a public IP address and attaches it to an existing virtual machine, making it accessible through the internet. Include the virtual machine ID in the path to attach a public IP to the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip).", + "operationId": "Attach public IP to virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "Getting instance events success", + "description": "Public IP successfully attached to VM.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InstanceEvents" + "$ref": "#/components/schemas/ResponseModel" } } } }, "400": { - "description": "Bad Request", + "description": "Insufficient balance to create the resource", "content": { "application/json": { "schema": { @@ -5136,16 +4962,15 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/hibernate": { - "get": { - "tags": [ - "virtual machine" - ], - "summary": "Hibernate Instance", - "operationId": "Hibernate Instance", + "/core/virtual-machines/{id}/delete-callback": { + "delete": { + "tags": ["callbacks"], + "summary": "Delete virtual machine callback", + "description": "Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Delete virtual machine callback", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5155,7 +4980,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Virtual machine callback URL successfully deleted.", "content": { "application/json": { "schema": { @@ -5209,16 +5034,15 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/hibernate-restore": { - "get": { - "tags": [ - "virtual machine" - ], - "summary": "Restore Instance from Hibernation", - "operationId": "Restore Instance from Hibernation", - "parameters": [ + "/core/virtual-machines/{id}/detach-floatingip": { + "post": { + "tags": ["floating ip"], + "summary": "Detach public IP from virtual machine", + "description": "Removes a public IP address from an existing virtual machine, disabling internet accessibility to the VM. Include the virtual machine ID in the path to detach the public IP from the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip).", + "operationId": "Detach public IP from virtual machine", + "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5282,45 +5106,25 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/metrics": { + "/core/virtual-machines/{id}/hard-reboot": { "get": { - "tags": [ - "virtual machine" - ], - "summary": "Get instance metrics", - "operationId": "Retrieved metrics successfully", + "tags": ["virtual machine"], + "summary": "Hard reboot virtual machine", + "description": "Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine.", + "operationId": "Hard reboot virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } - }, - { - "name": "duration", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "1h", - "2h", - "4h", - "6h", - "12h", - "1d", - "3d", - "7d", - "15d", - "30d" - ] - } } ], "responses": { "200": { - "description": "Success", + "description": "Hard reboot process has been successfully initiated.", "content": { "application/json": { "schema": { @@ -5359,8 +5163,69 @@ } } }, - "406": { - "description": "Not Acceptable", + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/virtual-machines/{id}/request-console": { + "get": { + "tags": ["vnc url"], + "summary": "Request Instance Console", + "operationId": "Request Console", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Please wait a few seconds and visit the below link to access your VNC console URL", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RequestConsole" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -5384,16 +5249,15 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/resize": { + "/core/virtual-machines/{id}/sg-rules": { "post": { - "tags": [ - "virtual machine" - ], - "summary": "Resize Virtual Machine", - "operationId": "Resize Virtual Machine", + "tags": ["virtual machine"], + "summary": "Add firewall rule to virtual machine", + "description": "Creates a firewall rule and associates it with a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/security-rules).", + "operationId": "Add firewall rule to virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5405,7 +5269,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InstanceResizePayload" + "$ref": "#/components/schemas/CreateSecurityRulePayload" } } }, @@ -5413,11 +5277,11 @@ }, "responses": { "200": { - "description": "Success", + "description": "The firewall rule has been successfully added to the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/SecurityGroupRule" } } } @@ -5452,8 +5316,8 @@ } } }, - "405": { - "description": "Method Not Allowed", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -5478,24 +5342,15 @@ "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id}": { - "delete": { - "tags": [ - "virtual machine" - ], - "summary": "Delete a security group rule", - "operationId": "Delete a Security Rule", + "/core/virtual-machines/{id}/start": { + "get": { + "tags": ["virtual machine"], + "summary": "Start virtual machine", + "description": "Initiates the startup of a virtual machine. Supply the virtual machine ID in the path to initiate the starting of the specified virtual machine.", + "operationId": "Start virtual machine", "parameters": [ { - "name": "virtual_machine_id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "sg_rule_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5505,7 +5360,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Virtual machine started successfully.", "content": { "application/json": { "schema": { @@ -5559,20 +5414,29 @@ ] } }, - "/core/volume-types": { + "/core/virtual-machines/{id}/stop": { "get": { - "tags": [ - "volume" + "tags": ["virtual machine"], + "summary": "Stop virtual machine", + "description": "Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.", + "operationId": "Stop virtual machine", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "GET Volume Types", - "operationId": "Get Volume Types", "responses": { "200": { - "description": "Retrieved Volume Types.", + "description": "Virtual machine shut down successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VolumeTypes" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -5597,6 +5461,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -5612,20 +5486,39 @@ ] } }, - "/core/volumes": { - "get": { - "tags": [ - "volume" + "/core/virtual-machines/{id}/update-callback": { + "put": { + "tags": ["callbacks"], + "summary": "Update virtual machine callback", + "description": "Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Update virtual machine callback", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "List Volumes", - "operationId": "List Volumes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachCallbackPayload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Getting volumes successful", + "description": "Virtual machine callback URL successfully updated.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Volumes" + "$ref": "#/components/schemas/AttachCallbackResponse" } } } @@ -5650,6 +5543,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -5662,19 +5565,31 @@ { "apiKey": [] } - ] - }, + ], + "x-codegen-request-body-name": "payload" + } + }, + "/core/virtual-machines/{virtual_machine_id}/attach-volumes": { "post": { - "tags": [ - "volume" + "tags": ["volume attachment"], + "summary": "Attach volumes to virtual machine", + "description": "Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1).", + "operationId": "Attach volumes to virtual machine", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "Create Volume", - "operationId": "Create Volume", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateVolumePayload" + "$ref": "#/components/schemas/AttachVolumesPayload" } } }, @@ -5682,11 +5597,11 @@ }, "responses": { "200": { - "description": "Volume created successfully", + "description": "Volumes have been successfully attached to the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Volume" + "$ref": "#/components/schemas/AttachVolumes" } } } @@ -5731,16 +5646,6 @@ } } }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -5757,16 +5662,22 @@ "x-codegen-request-body-name": "payload" } }, - "/core/volumes/{id}": { - "delete": { - "tags": [ - "volume" - ], - "summary": "Delete Volume", - "operationId": "Delete Volume", + "/core/virtual-machines/{virtual_machine_id}/console/{job_id}": { + "get": { + "tags": ["vnc url"], + "summary": "Get VNC Console Link", + "operationId": "Get VNC Console Link", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "job_id", "in": "path", "required": true, "schema": { @@ -5776,11 +5687,11 @@ ], "responses": { "200": { - "description": "Success", + "description": "Get VNC Console Link Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/VNCURL" } } } @@ -5830,16 +5741,15 @@ ] } }, - "/core/volumes/{id}/attach-callback": { + "/core/virtual-machines/{virtual_machine_id}/detach-volumes": { "post": { - "tags": [ - "callbacks" - ], - "summary": "Attach a callback to a volume", - "operationId": "Attach a callback to a volume", + "tags": ["volume attachment"], + "summary": "Detach volumes from virtual machine", + "description": "Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine.", + "operationId": "Detach volumes from virtual machine", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", "in": "path", "required": true, "schema": { @@ -5851,7 +5761,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttachCallbackPayload" + "$ref": "#/components/schemas/DetachVolumesPayload" } } }, @@ -5859,11 +5769,11 @@ }, "responses": { "200": { - "description": "Callback URL successfully attached to your volume. Any action events on your volume will be posted to the provided URL", + "description": "Volumes have been successfully detached from the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttachCallbackResponse" + "$ref": "#/components/schemas/DetachVolumes" } } } @@ -5898,6 +5808,16 @@ } } }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -5914,30 +5834,29 @@ "x-codegen-request-body-name": "payload" } }, - "/core/volumes/{id}/delete-callback": { - "delete": { - "tags": [ - "callbacks" - ], - "summary": "Delete callback URL for a volume", - "operationId": "Delete callback URL for a volume", + "/core/virtual-machines/{virtual_machine_id}/events": { + "get": { + "tags": ["virtual machine events"], + "summary": "List virtual machine events", + "description": "Retrieves a list of all events in a virtual machine's history, which records actions performed on the specified virtual machine. Include the virtual machine ID in the path to retrieve the history of events. For more details on virtual machine events history, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#events-history).", + "operationId": "List virtual machine events", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", "in": "path", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "Success", + "description": "Virtual machines event list successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/InstanceEvents" } } } @@ -5987,16 +5906,15 @@ ] } }, - "/core/volumes/{id}/update-callback": { - "put": { - "tags": [ - "callbacks" - ], - "summary": "Update callback URL for volume", - "operationId": "Update callback URL for volume", + "/core/virtual-machines/{virtual_machine_id}/hibernate": { + "get": { + "tags": ["virtual machine"], + "summary": "Hibernate virtual machine", + "description": "Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated.", + "operationId": "Hibernate virtual machine", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", "in": "path", "required": true, "schema": { @@ -6004,23 +5922,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachCallbackPayload" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Callback URL successfully updated.", + "description": "Hibernation request for the virtual machine was successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AttachCallbackResponse" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6067,26 +5975,32 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/pricebook": { + "/core/virtual-machines/{virtual_machine_id}/hibernate-restore": { "get": { - "tags": [ - "Pricebook" + "tags": ["virtual machine"], + "summary": "Restore virtual machine from hibernation", + "description": "Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation.", + "operationId": "Restore virtual machine from hibernation", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "operationId": "Retrive Pricebook", "responses": { "200": { - "description": "Success", + "description": "The request to restore the virtual machine from hibernation was successful.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PricebookModel" - } + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6111,8 +6025,8 @@ } } }, - "405": { - "description": "Method Not Allowed", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6136,45 +6050,38 @@ ] } }, - "/pricebook/calculate": {}, - "/pricebook/calculate/{id}": {}, - "/pricebook/discounts/flat-per-resource": {}, - "/pricebook/discounts/flat-per-resource/{org_id}": {}, - "/pricebook/discounts/flat-per-resource/{org_id}/update-status": {}, - "/billing/admin/add_organization": {}, - "/billing/admin/credit/{organization_id}": {}, - "/billing/admin/recharge_history/{organization_id}": {}, - "/billing/admin/threshold/{organization_id}": {}, - "/billing/admin/usage/{organization_id}": {}, - "/billing/alive": { - "get": { - "tags": [ - "alive" - ], - "summary": "GET: Alive", - "operationId": "get_alive", - "responses": { - "200": { - "description": "Success", - "content": {} + "/core/virtual-machines/{virtual_machine_id}/label": { + "put": { + "tags": ["virtual machine"], + "summary": "Edit labels of an existing VM", + "operationId": "Edit labels of an existing VM", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } } - } - } - }, - "/billing/billing/last-day-cost": { - "get": { - "tags": [ - "billing" ], - "summary": "GET: Last Day Cost", - "operationId": "get_last_day_cost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditlabelofanexistingVMPayload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "Labels edited successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Lastdaycostresponse" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6199,8 +6106,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6209,8 +6116,8 @@ } } }, - "404": { - "description": "Not Found", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -6231,23 +6138,52 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/billing/billing/usage": { + "/core/virtual-machines/{virtual_machine_id}/metrics": { "get": { - "tags": [ - "billing" + "tags": ["virtual machine"], + "summary": "Retrieve virtual machine performance metrics", + "description": "Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).", + "operationId": "Retrieve virtual machine performance metrics", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "duration", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "1h", + "2h", + "4h", + "6h", + "12h", + "1d", + "3d", + "7d", + "15d", + "30d" + ] + } + } ], - "summary": "GET: Billing usage", - "operationId": "get_usage", "responses": { "200": { - "description": "Success", + "description": "Virtual machine performance metrics have been successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Billingmetricesresponse" + "$ref": "#/components/schemas/MetricsFields" } } } @@ -6272,8 +6208,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6282,8 +6218,8 @@ } } }, - "404": { - "description": "Not Found", + "406": { + "description": "Not Acceptable", "content": { "application/json": { "schema": { @@ -6307,20 +6243,39 @@ ] } }, - "/billing/payment/payment-details": { - "get": { - "tags": [ - "payment" + "/core/virtual-machines/{virtual_machine_id}/resize": { + "post": { + "tags": ["virtual machine"], + "summary": "Resize virtual machine", + "description": "Updates the configuration specifications for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).", + "operationId": "Resize virtual machine", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "GET: View payment details", - "operationId": "get_details", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceResizePayload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "The resizing of the virtual machine configuration was successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaymentDetailsResponse" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6345,8 +6300,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6355,8 +6310,8 @@ } } }, - "404": { - "description": "Not Found", + "405": { + "description": "Method Not Allowed", "content": { "application/json": { "schema": { @@ -6377,33 +6332,41 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/billing/payment/payment-initiate": { - "post": { - "tags": [ - "payment" - ], - "summary": "POST: Initiate payment", - "operationId": "post_payment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentInitiatePayload" - } + "/core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id}": { + "delete": { + "tags": ["virtual machine"], + "summary": "Delete firewall rule from virtual machine", + "description": "Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine.", + "operationId": "Delete firewall rule from virtual machine", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" } }, - "required": true - }, + { + "name": "sg_rule_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { - "description": "Success", + "description": "The firewall rule has been successfully removed from the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaymentInitiateResponse" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6428,16 +6391,6 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "404": { "description": "Not Found", "content": { @@ -6460,24 +6413,217 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/billing/user-credit/credit": { - "get": { - "tags": [ - "credit" + "/core/virtual-machines/{vm_id}/attach-firewalls": { + "post": { + "tags": ["virtual machine"], + "summary": "Attach Firewalls to a VM", + "description": "Attach Firewalls to a VM", + "operationId": "Attach Firewalls to a VM", + "parameters": [ + { + "name": "vm_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "GET: View credit and threshold", - "operationId": "Check balance as an organization", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachFirewallsToVMPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Getcreditandthresholdinfoinresponse" + "$ref": "#/components/schemas/ResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/core/volume-types": { + "get": { + "tags": ["volume"], + "summary": "List volume types", + "description": "Retrieves a list of available volume types that can be used in the creation of a new volume.", + "operationId": "List volume types", + "responses": { + "200": { + "description": "Successful retrieval of volume types list", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VolumeTypes" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/volumes": { + "get": { + "tags": ["volume"], + "summary": "List volumes", + "description": "Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).", + "operationId": "List volumes", + "responses": { + "200": { + "description": "Successful retrieval of volumes list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Volumes" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + }, + "post": { + "tags": ["volume"], + "summary": "Create volume", + "description": "Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).", + "operationId": "Create volume", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateVolumePayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Volume successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Volume" } } } @@ -6502,45 +6648,2583 @@ } } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/core/volumes/{id}": { + "delete": { + "tags": ["volume"], + "summary": "Delete volume", + "description": "Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.", + "operationId": "Delete volume", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Volume successfully deleted.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/volumes/{id}/attach-callback": { + "post": { + "tags": ["callbacks"], + "summary": "Attach callback to volume", + "description": "Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Attach callback to volume", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachCallbackPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Callback URL successfully attached to your volume. Any action events on your volume will be posted to the provided URL", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachCallbackResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/core/volumes/{id}/delete-callback": { + "delete": { + "tags": ["callbacks"], + "summary": "Delete volume callback", + "description": "Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Delete volume callback", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Volume callback URL successfully deleted.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/volumes/{id}/update-callback": { + "put": { + "tags": ["callbacks"], + "summary": "Update volume callback", + "description": "Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Update volume callback", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachCallbackPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Callback URL successfully updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachCallbackResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/pricebook": { + "get": { + "tags": ["Pricebook"], + "operationId": "Retrive Pricebook", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PricebookModel" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/pricebook/admin/contracts": {}, + "/pricebook/admin/contracts/check-expire-delete-vms": {}, + "/pricebook/admin/contracts/{contract_id}": {}, + "/pricebook/admin/contracts/{contract_id}/events": {}, + "/pricebook/admin/version": {}, + "/pricebook/calculate": {}, + "/pricebook/calculate/{id}": {}, + "/pricebook/contracts": { + "get": { + "tags": ["Customer Contract"], + "summary": "List Contracts for Customer", + "operationId": "List Contracts for Customer", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCustomerContractsListResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/pricebook/contracts/{contract_id}": { + "get": { + "tags": ["Customer Contract"], + "summary": "Details of Contract by ID for Customer", + "operationId": "Details of Contract by ID for Customer", + "parameters": [ + { + "name": "contract_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerContractDetailResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/pricebook/discounts/entities": {}, + "/pricebook/discounts/entities/{plan_type}/{entity_id}": {}, + "/pricebook/discounts/entities/{plan_type}/{entity_id}/update-status": {}, + "/pricebook/discounts/flat-per-resource": {}, + "/pricebook/discounts/flat-per-resource/{customer_id}": {}, + "/billing/admin/add_organization": {}, + "/billing/admin/billing/info/{organization_id}": {}, + "/billing/admin/credit/{organization_id}": {}, + "/billing/admin/exclude": {}, + "/billing/admin/payment_history/{organization_id}": {}, + "/billing/admin/recharge_history/{organization_id}": {}, + "/billing/admin/threshold/{organization_id}": {}, + "/billing/admin/usage/{organization_id}": {}, + "/billing/admin/version": {}, + "/billing/alive": { + "get": { + "tags": ["alive"], + "summary": "GET: Alive", + "operationId": "get_alive", + "responses": { + "200": { + "description": "Success", + "content": {} + } + } + } + }, + "/billing/billing/last-day-cost": { + "get": { + "tags": ["billing"], + "summary": "GET: Last Day Cost", + "operationId": "get_last_day_cost", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Lastdaycostresponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/billing/usage": { + "get": { + "tags": ["billing"], + "summary": "GET: Billing usage", + "operationId": "get_usage", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Billingmetricesresponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/payment/payment-details": { + "get": { + "tags": ["payment"], + "summary": "GET: View payment details", + "operationId": "get_details", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentDetailsResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/payment/payment-initiate": { + "post": { + "tags": ["payment"], + "summary": "POST: Initiate payment", + "operationId": "post_payment", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentInitiatePayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentInitiateResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/billing/user-credit/credit": { + "get": { + "tags": ["credit"], + "summary": "GET: View credit and threshold", + "operationId": "Check balance as an organization", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Getcreditandthresholdinfoinresponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/user/info": { + "get": { + "tags": ["user"], + "summary": "GET: Fetch User Info", + "operationId": "get_user", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersInfoListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + }, + "put": { + "tags": ["user"], + "summary": "PUT: Update user info", + "operationId": "Update user info", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Userinfopostpayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserInfoSuccessResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + }, + "post": { + "tags": ["user"], + "summary": "POST: Insert user info", + "operationId": "post_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Userinfopostpayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserInfoSuccessResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + } + }, + "components": { + "schemas": { + "AuthRequestLoginResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/AuthRequestLoginFields" + } + } + }, + "AuthRequestLoginFields": { + "type": "object", + "properties": { + "authorization_url": { + "type": "string" + }, + "session_id": { + "type": "string" + } + } + }, + "ErrorResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + }, + "error_reason": { + "type": "string" + } + } + }, + "GetTokenPayload": { + "required": ["callback_code", "session_id"], + "type": "object", + "properties": { + "session_id": { + "type": "string" + }, + "callback_code": { + "type": "string" + } + } + }, + "AuthGetTokenResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "token": { + "$ref": "#/components/schemas/TokenFields" + }, + "first_login": { + "type": "boolean" + } + } + }, + "TokenFields": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "id_token": { + "type": "string" + }, + "refresh_token": { + "type": "string" + } + } + }, + "RefreshTokenPayload": { + "required": ["id_token", "refresh_token"], + "type": "object", + "properties": { + "id_token": { + "type": "string" + }, + "refresh_token": { + "type": "string" + } + } + }, + "LogoutPayload": { + "required": ["refresh_token"], + "type": "object", + "properties": { + "refresh_token": { + "type": "string" + } + } + }, + "AuthUserInfoResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/AuthUserFields" + } + } + }, + "AuthUserFields": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "CommonResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "GetOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organization": { + "$ref": "#/components/schemas/OrganizationFields" + } + } + }, + "OrganizationFields": { + "required": ["id", "name"], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "credit": { + "type": "integer" + }, + "threshold": { + "type": "integer" + }, + "total_instances": { + "type": "integer" + }, + "total_volumes": { + "type": "integer" + }, + "total_containers": { + "type": "integer" + }, + "total_clusters": { + "type": "integer" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationUserResponseModel" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "OrganizationUserResponseModel": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "sub": { + "type": "string" + }, + "email": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "rbac_roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RbacRoleField" + } + }, + "joined_at": { + "type": "string", + "format": "date-time" + }, + "last_login": { + "type": "string", + "format": "date-time" + } + } + }, + "RbacRoleField": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "UpdateOrganizationPayload": { + "required": ["name"], + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "UpdateOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "RemoveMemberPayload": { + "required": ["email"], + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "RemoveMemberFromOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "GetApiKeyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "api_key": { + "$ref": "#/components/schemas/ApiKeyFields" + } + } + }, + "ApiKeyFields": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + }, + "GenerateApiKeyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "api_key": { + "type": "string" + } + } + }, + "VerifyApiKeyPayload": { + "type": "object", + "properties": { + "api_key": { + "type": "string" + } + } + }, + "VerifyApiKeyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "api_key": { + "$ref": "#/components/schemas/ApiKeyVerifyFields" + } + } + }, + "ApiKeyVerifyFields": { + "type": "object", + "properties": { + "user_id": { + "type": "integer" + }, + "org_id": { + "type": "integer" + }, + "user_role": { + "type": "string" + }, + "sub": { + "type": "string" + } + } + }, + "InviteUserPayload": { + "required": ["email"], + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "GetInvitesResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "invites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteFields" + } + } + } + }, + "InviteFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "status": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "InviteUserResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "invite": { + "$ref": "#/components/schemas/InviteFields" + } + } + }, + "CreateUpdatePermissionPayload": { + "required": ["endpoint", "method", "permission", "resource"], + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "method": { + "type": "string" + }, + "endpoint": { + "type": "string" + } + } + }, + "GetPermissionsResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionFields" + } + } + } + }, + "PermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "method": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "CreateUpdatePermissionResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "permission": { + "$ref": "#/components/schemas/PermissionFields" + } + } + }, + "GetUserPermissionsResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserPermissionFields" + } + } + } + }, + "UserPermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + } + } + }, + "CreateUpdatePolicyPayload": { + "required": ["description", "is_public", "name", "permissions"], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "is_public": { + "type": "boolean" + }, + "permissions": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "GetPoliciesResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PolicyFields" + } + } + } + }, + "PolicyFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PolicyPermissionFields" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "PolicyPermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + } + } + }, + "CreateUpdatePolicyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "policy": { + "$ref": "#/components/schemas/PolicyFields" + } + } + }, + "CreateUpdateRbacRolePayload": { + "required": ["description", "name"], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "policies": { + "type": "array", + "items": { + "type": "integer" + } + }, + "permissions": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "GetRbacRolesResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RbacRoleFields" + } + } + } + }, + "RbacRoleFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RolePolicyFields" + } + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RolePermissionFields" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "RolePolicyFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "RolePermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + } + } + }, + "RbacRoleDetailResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/RbacRoleFields" + } + } + }, + "AssignRbacRolePayload": { + "required": ["role_id"], + "type": "object", + "properties": { + "role_id": { + "type": "integer" + } + } + }, + "AdminOrganizationsResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationFields" + } + }, + "organization_count": { + "type": "integer" + } + } + }, + "AdminOrganizationsSummaryResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminOrganizationSummaryFields" + } + } + } + }, + "AdminOrganizationSummaryFields": { + "required": ["id", "name"], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "AdminOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organizations": { + "$ref": "#/components/schemas/OrganizationFields" + } + } + }, + "AdminVersionResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "AdminHibernationRestorationPayloadModel": { + "required": ["org_id", "status", "vm_id", "vm_name"], + "type": "object", + "properties": { + "org_id": { + "type": "integer" + }, + "vm_name": { + "type": "string" + }, + "vm_id": { + "type": "integer" + }, + "status": { + "type": "string" + } + } + }, + "UserTransferPayload": { + "required": ["org_id", "role"], + "type": "object", + "properties": { + "org_id": { + "type": "integer" + }, + "role": { + "type": "string" + } + } + }, + "AdminUsersResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminUserFields" + } + } + } + }, + "AdminUserFields": { + "required": ["email", "id", "org_id", "org_name", "username"], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "org_id": { + "type": "integer" + }, + "org_name": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "last_login": { + "type": "string", + "format": "date-time" + } + } + }, + "AdminUserResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/AdminUserFields" + } + } + }, + "DashboardInfoResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "overview": { + "$ref": "#/components/schemas/OverviewInfo" + } + } + }, + "OverviewInfo": { + "type": "object", + "properties": { + "instance": { + "$ref": "#/components/schemas/InstanceOverviewFields" + }, + "container": { + "$ref": "#/components/schemas/ContainerOverviewFields" + }, + "volume": { + "$ref": "#/components/schemas/VolumeOverviewFields" + } + } + }, + "InstanceOverviewFields": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "vcpus": { + "type": "integer" + }, + "gpus": { + "type": "integer" + }, + "ram": { + "type": "integer" + }, + "cost_per_hour": { + "type": "number" + } + } + }, + "ContainerOverviewFields": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "vcpus": { + "type": "integer" + }, + "gpus": { + "type": "integer" + }, + "ram": { + "type": "integer" + }, + "cost_per_hour": { + "type": "number" + } + } + }, + "VolumeOverviewFields": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "using": { + "type": "integer" + }, + "cost_per_hour": { + "type": "number" + } + } + }, + "NewStockRetriveResponse": { + "type": "object", + "properties": { + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewStockResponse" + } + } + } + }, + "NewStockResponse": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "stock-type": { + "type": "string" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NewModelResponse" + } + } + } + }, + "NewModelResponse": { + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "available": { + "type": "string" + }, + "planned_7_days": { + "type": "string" + }, + "planned_30_days": { + "type": "string" + }, + "planned_100_days": { + "type": "string" + }, + "configurations": { + "$ref": "#/components/schemas/NewConfigurationsResponse" + } + } + }, + "NewConfigurationsResponse": { + "type": "object", + "properties": { + "1x": { + "type": "integer" + }, + "2x": { + "type": "integer" + }, + "4x": { + "type": "integer" + }, + "8x": { + "type": "integer" + }, + "10x": { + "type": "integer" + } + } + }, + "StockVisibilityUserListResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SingleVisibilityUserResponse" + } + } + } + }, + "SingleVisibilityUserResponse": { + "required": ["id", "stock_visible", "user_id"], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "user_id": { + "type": "integer" + }, + "stock_visible": { + "type": "boolean" + } + } + }, + "StockVisibilityUserPayload": { + "required": ["user_ids"], + "type": "object", + "properties": { + "user_ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "ResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "NodeStockPayloadModel": { + "type": "object", + "properties": { + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePayloadModel" + } + } + } + }, + "NodePayloadModel": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodePowerUsageModel" + } + } + } + }, + "NodePowerUsageModel": { + "required": ["openstack_id"], + "type": "object", + "properties": { + "openstack_id": { + "type": "string" + }, + "openstack_name": { + "type": "string" + }, + "nexgen_name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "provision_date": { + "type": "string", + "format": "date-time" + }, + "sunset_date": { + "type": "string", + "format": "date-time" + }, + "flavors": { + "type": "array", + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "items": { + "type": "string" + } + }, + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeStocksPayload" + } + }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } + }, + "power_usages": { + "$ref": "#/components/schemas/PowerUsageModel" + } + } + }, + "NodeStocksPayload": { + "required": ["in_use", "total", "type"], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "in_use": { + "type": "integer" + } + } + }, + "PowerUsageModel": { + "required": ["unit", "value"], + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "unit": { + "type": "string" + } + } + }, + "NodeStockResponseModel": { + "type": "object", + "properties": { + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeResponseModel" + } + } + } + }, + "NodeResponseModel": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeModel" + } + } + } + }, + "NodeModel": { + "required": ["openstack_id"], + "type": "object", + "properties": { + "openstack_id": { + "type": "string" + }, + "openstack_name": { + "type": "string" + }, + "nexgen_name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "provision_date": { + "type": "string", + "format": "date-time" + }, + "sunset_date": { + "type": "string", + "format": "date-time" + }, + "flavors": { + "type": "array", + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "items": { + "type": "string" + } + }, + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeStocksPayload" + } + }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "FutureNodesStockModel": { + "type": "object", + "properties": { + "future_stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FutureNodeResponseModel" + } + } + } + }, + "FutureNodeResponseModel": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FutureNodeModel" } + } + } + }, + "FutureNodeModel": { + "required": ["expected_provision_date"], + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } + "openstack_name": { + "type": "string" }, - "500": { - "description": "Internal Server Error", - "content": {} + "nexgen_name": { + "type": "string" + }, + "expected_provision_date": { + "type": "string", + "description": "Date and time in the format YYYY-MM-DD HH:mm:ss", + "format": "date-time" + }, + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FutureNodeStockModel" + } } - }, - "security": [ - { - "accessToken": [] + } + }, + "FutureNodeStockModel": { + "required": ["expected_amount"], + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true }, - { - "apiKey": [] + "name": { + "type": "string" + }, + "expected_amount": { + "type": "integer" } - ] - } - } - }, - "components": { - "schemas": { - "RequestLoginResponse": { + } + }, + "NewStockUpdateResponseModel": { "type": "object", "properties": { "status": { @@ -6548,54 +9232,84 @@ }, "message": { "type": "string" - }, - "data": { - "$ref": "#/components/schemas/RequestLoginDataResponse" } } }, - "RequestLoginDataResponse": { + "FutureNodeUpdateModel": { + "required": [ + "expected_provision_date", + "nexgen_name", + "openstack_name" + ], "type": "object", "properties": { - "authorization_url": { + "id": { + "type": "integer", + "readOnly": true + }, + "region_id": { + "type": "integer" + }, + "openstack_name": { "type": "string" }, - "session_id": { + "nexgen_name": { "type": "string" + }, + "expected_provision_date": { + "type": "string", + "format": "date-time" } } }, - "ErrorResponseModel": { + "CreateEnvironment": { + "required": ["name", "region"], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the environment being created." + }, + "region": { + "type": "string", + "description": "The geographic location of the data center where the environment is being created. To learn more about regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions)." + } + } + }, + "Environment": { "type": "object", "properties": { "status": { - "type": "boolean", - "default": false + "type": "boolean" }, "message": { "type": "string" }, - "error_reason": { - "type": "string" + "environment": { + "$ref": "#/components/schemas/EnvironmentFields" } } }, - "GetToken": { - "required": [ - "callback_code", - "session_id" - ], + "EnvironmentFields": { "type": "object", "properties": { - "session_id": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "callback_code": { + "region": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "GetTokenResponse": { + "Environments": { "type": "object", "properties": { "status": { @@ -6604,84 +9318,232 @@ "message": { "type": "string" }, - "token": { - "$ref": "#/components/schemas/TokenFields" + "environments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnvironmentFields" + } } } }, - "TokenFields": { + "UpdateEnvironment": { + "required": ["name"], "type": "object", "properties": { - "access_token": { + "name": { + "maxLength": 50, + "type": "string", + "description": "The new name of the environment." + } + } + }, + "InstanceEvents": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "id_token": { + "instance_events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceEventsFields" + } + } + } + }, + "InstanceEventsFields": { + "type": "object", + "properties": { + "instance_id": { + "type": "integer" + }, + "user_id": { + "type": "integer" + }, + "org_id": { + "type": "integer" + }, + "time": { + "type": "string", + "format": "date-time" + }, + "type": { "type": "string" }, - "refresh_token": { + "reason": { + "type": "string" + }, + "object": { + "type": "string" + }, + "message": { "type": "string" } } }, - "RefreshToken": { + "CreateInstancesPayload": { "required": [ - "id_token", - "refresh_token" + "count", + "environment_name", + "flavor_name", + "key_name", + "name" ], "type": "object", "properties": { - "id_token": { - "type": "string" + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the virtual machine being created." }, - "refresh_token": { - "type": "string" + "environment_name": { + "type": "string", + "description": "The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) in which the virtual machine is to be created." + }, + "image_name": { + "type": "string", + "description": "The [operating system (OS) image](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images) name designated for installation on the virtual machine." + }, + "volume_name": { + "type": "string", + "description": "The names of the volume(s) to be attached to the virtual machine being created." + }, + "create_bootable_volume": { + "type": "boolean", + "description": "Indicates whether to create a bootable volume for the virtual machine. When set to `true`, a bootable volume will be created; the default value is `false`." + }, + "flavor_name": { + "type": "string", + "description": "The name of the GPU hardware configuration ([flavor](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors)) for the virtual machines being created." + }, + "flavor": { + "$ref": "#/components/schemas/FlavorObjectFields" + }, + "key_name": { + "type": "string", + "description": "The name of the existing SSH key pair to be used for secure access to the virtual machine. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair)." + }, + "user_data": { + "type": "string", + "description": "Optional initialization configuration commands to manage the configuration of a virtual machine at launch using cloud-init scripts. For more information about custom VM configuration using cloud-init, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/initialization-configuration)." + }, + "callback_url": { + "maxLength": 250, + "type": "string", + "description": "An optional URL where actions performed on the virtual machine will be sent. For additional information on event callbacks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks)." + }, + "assign_floating_ip": { + "type": "boolean", + "description": "When this field is set to `true`, it attaches a [public IP address](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip) to the virtual machine, enabling internet accessibility." + }, + "security_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateSecurityRulePayload" + } + }, + "profile": { + "$ref": "#/components/schemas/ProfileObjectFields" + }, + "count": { + "type": "integer", + "description": "The number of virtual machines to be created." + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } } } }, - "Logout": { - "required": [ - "refresh_token" - ], + "FlavorObjectFields": { "type": "object", "properties": { - "refresh_token": { + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { "type": "string" + }, + "gpu_count": { + "type": "integer" } } }, - "UserInfoResponse": { + "CreateSecurityRulePayload": { + "required": ["direction", "ethertype", "protocol", "remote_ip_prefix"], "type": "object", "properties": { - "status": { - "type": "boolean" + "direction": { + "type": "string", + "description": "The direction of traffic that the firewall rule applies to." }, - "message": { - "type": "string" + "protocol": { + "type": "string", + "description": "The network protocol associated with the rule. Call the [`GET /core/sg-rules-protocols`](https://infrahub-api-doc.nexgencloud.com/#get-/core/sg-rules-protocols) endpoint to retrieve a list of permitted network protocols.", + "example": "any", + "enum": [ + "any", + "ah", + "dccp", + "egp", + "esp", + "gre", + "hopopt", + "icmp", + "igmp", + "ip", + "ipip", + "ipv6-encap", + "ipv6-frag", + "ipv6-icmp", + "icmpv6", + "ipv6-nonxt", + "ipv6-opts", + "ipv6-route", + "ospf", + "pgm", + "rsvp", + "sctp", + "tcp", + "udp", + "udplite", + "vrrp" + ] }, - "user": { - "$ref": "#/components/schemas/UserFields" + "ethertype": { + "type": "string", + "description": "The Ethernet type associated with the rule." + }, + "remote_ip_prefix": { + "type": "string", + "description": "The IP address range that is allowed to access the specified port. Use \"0.0.0.0/0\" to allow any IP address." } } }, - "UserFields": { + "ProfileObjectFields": { + "required": ["name"], "type": "object", "properties": { - "email": { - "type": "string" - }, "name": { "type": "string" }, - "username": { + "description": { "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "OrganizationModel": { + "Instances": { "type": "object", "properties": { "status": { @@ -6690,16 +9552,15 @@ "message": { "type": "string" }, - "organization": { - "$ref": "#/components/schemas/OrganizationInfoModel" + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceFields" + } } } }, - "OrganizationInfoModel": { - "required": [ - "id", - "name" - ], + "InstanceFields": { "type": "object", "properties": { "id": { @@ -6708,168 +9569,217 @@ "name": { "type": "string" }, - "users": { + "status": { + "type": "string" + }, + "environment": { + "$ref": "#/components/schemas/InstanceEnvironmentFields" + }, + "image": { + "$ref": "#/components/schemas/InstanceImageFields" + }, + "flavor": { + "$ref": "#/components/schemas/InstanceFlavorFields" + }, + "os": { + "type": "string" + }, + "keypair": { + "$ref": "#/components/schemas/InstanceKeypairFields" + }, + "volume_attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationUserModel" + "$ref": "#/components/schemas/VolumeAttachmentFields" } }, - "created_at": { - "type": "string", - "format": "date-time" - } - } - }, - "OrganizationUserModel": { - "type": "object", - "properties": { - "id": { - "type": "integer" + "security_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SecurityRulesFieldsforInstance" + } }, - "sub": { + "power_state": { "type": "string" }, - "email": { + "vm_state": { "type": "string" }, - "username": { + "fixed_ip": { "type": "string" }, - "name": { + "floating_ip": { "type": "string" }, - "role": { + "floating_ip_status": { "type": "string" }, - "rbac_roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RBACRoleFieldforOrganization" - } + "locked": { + "type": "boolean" }, - "joined_at": { + "contract_id": { + "type": "integer" + }, + "created_at": { "type": "string", "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } } } }, - "RBACRoleFieldforOrganization": { + "InstanceEnvironmentFields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "name": { "type": "string" + }, + "org_id": { + "type": "integer" + }, + "region": { + "type": "string" } } }, - "Removemember": { - "required": [ - "email" - ], + "InstanceImageFields": { "type": "object", "properties": { - "email": { + "name": { "type": "string" } } }, - "RemoveMemberResponse": { + "InstanceFlavorFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "name": { "type": "string" - } - } - }, - "APIKey": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "ephemeral": { + "type": "integer" + }, + "gpu": { "type": "string" }, - "api_key": { - "$ref": "#/components/schemas/APIKeyFields" + "gpu_count": { + "type": "integer" } } }, - "APIKeyFields": { + "InstanceKeypairFields": { "type": "object", "properties": { - "key": { + "name": { "type": "string" } } }, - "APIKeygeneration": { + "VolumeAttachmentFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "volume": { + "$ref": "#/components/schemas/VolumeFieldsforInstance" }, - "message": { + "status": { "type": "string" }, - "api_key": { + "device": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "APIKeyPayload": { + "VolumeFieldsforInstance": { "type": "object", "properties": { - "api_key": { + "id": { + "type": "integer" + }, + "name": { "type": "string" - } - } - }, - "ApiKeyVerifyResponse": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "description": { "type": "string" }, - "api_key": { - "$ref": "#/components/schemas/ApiKeyVerifyFields" + "volume_type": { + "type": "string" + }, + "size": { + "type": "integer" } } }, - "ApiKeyVerifyFields": { + "SecurityRulesFieldsforInstance": { "type": "object", "properties": { - "user_id": { + "id": { "type": "integer" }, - "org_id": { + "direction": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "port_range_min": { "type": "integer" }, - "user_role": { + "port_range_max": { + "type": "integer" + }, + "ethertype": { "type": "string" }, - "sub": { + "remote_ip_prefix": { "type": "string" + }, + "status": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "InviteUser": { - "required": [ - "email" - ], + "Instance": { "type": "object", "properties": { - "email": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" + }, + "instance": { + "$ref": "#/components/schemas/InstanceFields" } } }, - "Invites": { + "SecurityGroupRule": { "type": "object", "properties": { "status": { @@ -6878,21 +9788,33 @@ "message": { "type": "string" }, - "invites": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InviteFields" - } + "security_rule": { + "$ref": "#/components/schemas/SecurityGroupRuleFields" } } }, - "InviteFields": { + "SecurityGroupRuleFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "email": { + "direction": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "port_range_min": { + "type": "integer" + }, + "port_range_max": { + "type": "integer" + }, + "ethertype": { + "type": "string" + }, + "remote_ip_prefix": { "type": "string" }, "status": { @@ -6904,55 +9826,81 @@ } } }, - "Invite": { + "MetricsFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "cpu": { + "$ref": "#/components/schemas/MetricItemFields" }, - "message": { - "type": "string" + "memory.usages": { + "$ref": "#/components/schemas/MetricItemFields" }, - "invite": { - "$ref": "#/components/schemas/InviteFields" + "network.in": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "network.out": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "disk.read": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "disk.write": { + "$ref": "#/components/schemas/MetricItemFields" } } }, - "ResponseModel": { + "MetricItemFields": { "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { + "unit": { "type": "string" + }, + "columns": { + "type": "array", + "example": ["time", "granularity", "value"], + "items": { + "type": "string" + } + }, + "data": { + "type": "array", + "example": [ + ["2023-09-01T01:19:00+00:00", 60, 1041433070000000], + ["2023-09-01T01:24:00+00:00", 60, 1041441320000000] + ], + "items": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } } } }, - "PermissionPayload": { - "required": [ - "endpoint", - "method", - "permission", - "resource" - ], + "InstanceResizePayload": { "type": "object", "properties": { - "resource": { - "type": "string" - }, - "permission": { - "type": "string" - }, - "method": { + "flavor_name": { "type": "string" }, - "endpoint": { - "type": "string" + "flavor": { + "$ref": "#/components/schemas/FlavorObjectFields" + } + } + }, + "EditlabelofanexistingVMPayload": { + "type": "object", + "properties": { + "labels": { + "type": "array", + "items": { + "type": "string" + } } } }, - "Permissions": { + "ContractInstancesResponse": { "type": "object", "properties": { "status": { @@ -6961,110 +9909,90 @@ "message": { "type": "string" }, - "permissions": { + "instances": { "type": "array", "items": { - "$ref": "#/components/schemas/PermissionFields" + "$ref": "#/components/schemas/ContractInstanceFields" } } } }, - "PermissionFields": { + "ContractInstanceFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "resource": { - "type": "string" - }, - "permission": { - "type": "string" - }, - "method": { + "name": { "type": "string" }, - "endpoint": { + "status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" - } - } - }, - "PermissionResponse": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "flavor_name": { "type": "string" }, - "permission": { - "$ref": "#/components/schemas/PermissionFields" + "gpu_count": { + "type": "integer" } } }, - "PermissionsforUserPermission": { + "AttachFirewallsToVMPayload": { + "required": ["firewalls"], "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "permissions": { + "firewalls": { "type": "array", "items": { - "$ref": "#/components/schemas/PermissionFieldsforUserPermission" + "type": "integer" } } } }, - "PermissionFieldsforUserPermission": { - "type": "object", - "properties": { - "id": { - "type": "integer" - }, - "resource": { - "type": "string" - }, - "permission": { - "type": "string" - } - } - }, - "PolicyPayload": { + "FlavorPayload": { "required": [ - "description", + "cpu", + "disk", + "gpu", + "gpu_count", "is_public", "name", - "permissions" + "ram", + "region_name" ], "type": "object", "properties": { "name": { "type": "string" }, - "description": { + "region_name": { + "type": "string" + }, + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { "type": "string" }, + "gpu_count": { + "type": "integer" + }, "is_public": { "type": "boolean" - }, - "permissions": { - "type": "array", - "items": { - "type": "integer" - } } } }, - "Policies": { + "FlavorResponse": { "type": "object", "properties": { "status": { @@ -7073,15 +10001,12 @@ "message": { "type": "string" }, - "policies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PolicyFields" - } + "flavor": { + "$ref": "#/components/schemas/FlavorFields" } } }, - "PolicyFields": { + "FlavorFields": { "type": "object", "properties": { "id": { @@ -7090,36 +10015,37 @@ "name": { "type": "string" }, - "description": { + "region_name": { "type": "string" }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PolicyPermissionFields" - } + "cpu": { + "type": "integer" }, - "created_at": { - "type": "string", - "format": "date-time" - } - } - }, - "PolicyPermissionFields": { - "type": "object", - "properties": { - "id": { + "ram": { + "type": "number" + }, + "disk": { "type": "integer" }, - "resource": { - "type": "string" + "ephemeral": { + "type": "integer" }, - "permission": { + "gpu": { "type": "string" + }, + "gpu_count": { + "type": "integer" + }, + "stock_available": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "PolicyResponse": { + "FlavorListResponse": { "type": "object", "properties": { "status": { @@ -7128,39 +10054,32 @@ "message": { "type": "string" }, - "policy": { - "$ref": "#/components/schemas/PolicyFields" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlavorItemGetResponse" + } } } }, - "RBACRolePayload": { - "required": [ - "description", - "name" - ], + "FlavorItemGetResponse": { "type": "object", "properties": { - "name": { + "gpu": { "type": "string" }, - "description": { + "region_name": { "type": "string" }, - "policies": { - "type": "array", - "items": { - "type": "integer" - } - }, - "permissions": { + "flavors": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/FlavorFields" } } } }, - "RBACRoles": { + "Images": { "type": "object", "properties": { "status": { @@ -7169,45 +10088,35 @@ "message": { "type": "string" }, - "roles": { + "images": { "type": "array", "items": { - "$ref": "#/components/schemas/RBACRoleFields" + "$ref": "#/components/schemas/ImageGetResponse" } } } }, - "RBACRoleFields": { + "ImageGetResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { + "region_name": { "type": "string" }, - "description": { + "type": { "type": "string" }, - "policies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RolePolicyFields" - } + "logo": { + "type": "string" }, - "permissions": { + "images": { "type": "array", "items": { - "$ref": "#/components/schemas/RolePermissionFields" + "$ref": "#/components/schemas/ImageFields" } - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "RolePolicyFields": { + "ImageFields": { "type": "object", "properties": { "id": { @@ -7216,51 +10125,47 @@ "name": { "type": "string" }, - "description": { + "region_name": { "type": "string" - } - } - }, - "RolePermissionFields": { - "type": "object", - "properties": { - "id": { - "type": "integer" }, - "resource": { + "type": { "type": "string" }, - "permission": { + "version": { "type": "string" - } - } - }, - "RBACRole": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "size": { + "type": "integer" + }, + "display_size": { "type": "string" }, - "role": { - "$ref": "#/components/schemas/RBACRoleFields" + "description": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LableResonse" + } + }, + "is_public": { + "type": "boolean" } } }, - "AssignRBACRolePayload": { - "required": [ - "role_id" - ], + "LableResonse": { "type": "object", "properties": { - "role_id": { + "id": { "type": "integer" + }, + "label": { + "type": "string" } } }, - "OrganizationsResponseModel": { + "ImageLogos": { "type": "object", "properties": { "status": { @@ -7269,182 +10174,142 @@ "message": { "type": "string" }, - "organizations": { + "logos": { "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationInfoModel" + "$ref": "#/components/schemas/LogoGetResponse" } } } }, - "OrganizationResponseModel": { + "LogoGetResponse": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "type": { "type": "string" }, - "organizations": { - "$ref": "#/components/schemas/OrganizationInfoModel" - } - } - }, - "DashboardInfoResponse": { - "type": "object", - "properties": { - "status": { - "type": "boolean" - }, - "message": { + "url": { "type": "string" - }, - "overview": { - "$ref": "#/components/schemas/OverviewInfo" } } }, - "OverviewInfo": { + "ImportKeypairPayload": { + "required": ["environment_name", "name", "public_key"], "type": "object", "properties": { - "instance": { - "$ref": "#/components/schemas/InstanceOverviewFields" + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the key pair that is being created." }, - "container": { - "$ref": "#/components/schemas/ContainerOverviewFields" + "environment_name": { + "type": "string", + "description": "The name of the environment where the key pair is being created." }, - "volume": { - "$ref": "#/components/schemas/VolumeOverviewFields" + "public_key": { + "type": "string", + "description": "The public key that is being used to import an SSH key pair." } } }, - "InstanceOverviewFields": { + "ImportKeypairResponse": { "type": "object", "properties": { - "count": { - "type": "integer" - }, - "vcpus": { - "type": "integer" - }, - "gpus": { - "type": "integer" + "status": { + "type": "boolean" }, - "ram": { - "type": "integer" + "message": { + "type": "string" }, - "cost_per_hour": { - "type": "number" + "keypair": { + "$ref": "#/components/schemas/KeypairFields" } } }, - "ContainerOverviewFields": { + "KeypairFields": { "type": "object", "properties": { - "count": { + "id": { "type": "integer" }, - "vcpus": { - "type": "integer" + "name": { + "type": "string" }, - "gpus": { - "type": "integer" + "environment": { + "type": "string" }, - "ram": { - "type": "integer" + "public_key": { + "type": "string" }, - "cost_per_hour": { - "type": "number" + "fingerprint": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "VolumeOverviewFields": { + "Keypairs": { "type": "object", "properties": { - "count": { - "type": "integer" + "status": { + "type": "boolean" }, - "using": { - "type": "integer" + "message": { + "type": "string" }, - "cost_per_hour": { - "type": "number" - } - } - }, - "NewStockRetriveResponse": { - "type": "object", - "properties": { - "stocks": { + "Keypairs": { "type": "array", "items": { - "$ref": "#/components/schemas/NewStockResponse" + "$ref": "#/components/schemas/KeypairFields" } } } }, - "NewStockResponse": { + "UpdateKeypairName": { + "required": ["name"], "type": "object", "properties": { - "region": { - "type": "string" - }, - "stock-type": { - "type": "string" - }, - "models": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NewModelResponse" - } + "name": { + "maxLength": 50, + "type": "string", + "description": "The new key pair name." } } }, - "NewModelResponse": { + "UpdateKeypairnameresponse": { "type": "object", "properties": { - "model": { - "type": "string" - }, - "available": { - "type": "string" - }, - "planned_7_days": { - "type": "string" - }, - "planned_30_days": { - "type": "string" + "status": { + "type": "boolean" }, - "planned_100_days": { + "message": { "type": "string" }, - "configurations": { - "$ref": "#/components/schemas/NewConfigurationsResponse" + "keypair": { + "$ref": "#/components/schemas/KeypairFields" } } }, - "NewConfigurationsResponse": { + "RequestConsole": { "type": "object", "properties": { - "1x": { - "type": "integer" - }, - "2x": { - "type": "integer" - }, - "4x": { - "type": "integer" + "status": { + "type": "boolean" }, - "8x": { - "type": "integer" + "message": { + "type": "string" }, - "10x": { - "type": "integer" + "url": { + "type": "string" } } }, - "StockVisibilityUserListResponse": { + "VNCURL": { "type": "object", "properties": { "status": { @@ -7453,274 +10318,261 @@ "message": { "type": "string" }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SingleVisibilityUserResponse" - } + "vnc_url": { + "$ref": "#/components/schemas/VNCURLFields" } } }, - "SingleVisibilityUserResponse": { - "required": [ - "id", - "stock_visible", - "user_id" - ], + "VNCURLFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "user_id": { - "type": "integer" - }, - "stock_visible": { - "type": "boolean" - } - } - }, - "StockVisibilityUserPayload": { - "type": "object", - "properties": { - "user_ids": { - "type": "array", - "items": { - "type": "integer" - } + "vnc_url": { + "type": "string" } } }, - "NodeStockPayloadModel": { + "CreateVolumePayload": { + "required": [ + "description", + "environment_name", + "name", + "size", + "volume_type" + ], "type": "object", "properties": { - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NodePayloadModel" - } + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the volume being created." + }, + "environment_name": { + "type": "string", + "description": "The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) within which the volume is being created." + }, + "description": { + "type": "string", + "description": "A brief description or comment about the volume." + }, + "volume_type": { + "type": "string", + "description": "Specifies the type of volume being created, which determines the storage technology it will use. Call the \"[List volume types](https://infrahub-api-doc.nexgencloud.com/#get-/core/volumes)\" endpoint to retrieve a list of available volume model types." + }, + "size": { + "type": "integer", + "description": "The size of the volume in GB. 1048576GB storage capacity per volume." + }, + "image_id": { + "type": "integer", + "description": "The ID of the operating system image that will be associated with the volume. By providing an `image_id` in the create volume request, you will create a bootable volume." + }, + "callback_url": { + "maxLength": 250, + "type": "string", + "description": "A URL that can be attached to the volume you are creating. This `callback_url` will post any action events that occur to your volume to the provided URL." } } }, - "NodePayloadModel": { + "Volume": { "type": "object", "properties": { - "region": { - "type": "string" + "status": { + "type": "boolean" }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NodePowerUsageModel" - } + "message": { + "type": "string" + }, + "volume": { + "$ref": "#/components/schemas/VolumeFields" } } }, - "NodePowerUsageModel": { - "required": [ - "openstack_id" - ], + "VolumeFields": { "type": "object", "properties": { - "openstack_id": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "openstack_name": { + "environment": { + "$ref": "#/components/schemas/EnvironmentFieldsforVolume" + }, + "description": { "type": "string" }, - "nexgen_name": { + "volume_type": { "type": "string" }, + "size": { + "type": "integer" + }, "status": { "type": "string" }, - "provision_date": { + "bootable": { + "type": "boolean" + }, + "image_id": { + "type": "integer" + }, + "callback_url": { + "type": "string" + }, + "created_at": { "type": "string", "format": "date-time" }, - "sunset_date": { + "updated_at": { "type": "string", "format": "date-time" - }, - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NodeStocksPayload" - } - }, - "power_usages": { - "$ref": "#/components/schemas/PowerUsageModel" } } }, - "NodeStocksPayload": { - "required": [ - "in_use", - "total", - "type" - ], + "EnvironmentFieldsforVolume": { "type": "object", "properties": { "name": { "type": "string" + } + } + }, + "Volumes": { + "type": "object", + "properties": { + "status": { + "type": "boolean" }, - "type": { + "message": { "type": "string" }, - "total": { - "type": "integer" - }, - "in_use": { - "type": "integer" + "volumes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VolumeFields" + } } } }, - "PowerUsageModel": { - "required": [ - "unit", - "value" - ], + "VolumeTypes": { "type": "object", "properties": { - "value": { - "type": "number" + "status": { + "type": "boolean" }, - "unit": { + "message": { "type": "string" + }, + "volume_types": { + "type": "array", + "items": { + "type": "string" + } } } }, - "NodeStockResponseModel": { + "AttachVolumesPayload": { "type": "object", "properties": { - "stocks": { + "volume_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/NodeResponseModel" + "type": "integer" } } } }, - "NodeResponseModel": { + "AttachVolumes": { "type": "object", "properties": { - "region": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "nodes": { + "volume_attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/NodeModel" + "$ref": "#/components/schemas/AttachVolumeFields" } } } }, - "NodeModel": { - "required": [ - "openstack_id" - ], + "AttachVolumeFields": { "type": "object", "properties": { - "openstack_id": { - "type": "string" + "id": { + "type": "integer" }, - "openstack_name": { - "type": "string" + "instance_id": { + "type": "integer" }, - "nexgen_name": { - "type": "string" + "volume_id": { + "type": "integer" }, "status": { "type": "string" }, - "provision_date": { - "type": "string", - "format": "date-time" - }, - "sunset_date": { + "created_at": { "type": "string", "format": "date-time" - }, - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NodeStocksPayload" - } } } }, - "FutureNodesStockModel": { + "DetachVolumesPayload": { "type": "object", "properties": { - "future_stocks": { + "volume_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/FutureNodeResponseModel" + "type": "integer" } } } }, - "FutureNodeResponseModel": { + "DetachVolumes": { "type": "object", "properties": { - "region": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "nodes": { + "volume_attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/FutureNodeModel" + "$ref": "#/components/schemas/AttachVolumeFields" } } } }, - "FutureNodeModel": { - "required": [ - "expected_provision_date" - ], + "CreateGPU": { + "required": ["name"], "type": "object", "properties": { - "id": { - "type": "integer", - "readOnly": true - }, - "openstack_name": { - "type": "string" - }, - "nexgen_name": { + "name": { "type": "string" }, - "expected_provision_date": { - "type": "string", - "format": "date-time" - }, - "stocks": { + "regions": { "type": "array", "items": { - "$ref": "#/components/schemas/FutureNodeStockModel" + "type": "string" } - } - } - }, - "FutureNodeStockModel": { - "required": [ - "expected_amount" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "readOnly": true }, - "name": { - "type": "string" - }, - "expected_amount": { - "type": "integer" + "example_metadata": { + "type": "string", + "description": "A valid JSON string.", + "example": "{\"key\": \"value\"}" } } }, - "NewStockUpdateResponseModel": { + "GPU": { "type": "object", "properties": { "status": { @@ -7728,52 +10580,52 @@ }, "message": { "type": "string" + }, + "gpu": { + "$ref": "#/components/schemas/GPUFields" } } }, - "FutureNodeUpdateModel": { - "required": [ - "expected_provision_date", - "nexgen_name", - "openstack_name" - ], + "GPUFields": { "type": "object", "properties": { "id": { - "type": "integer", - "readOnly": true - }, - "region_id": { "type": "integer" }, - "openstack_name": { + "name": { "type": "string" }, - "nexgen_name": { + "regions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GPURegionFields" + } + }, + "example_metadata": { "type": "string" }, - "expected_provision_date": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { "type": "string", "format": "date-time" } } }, - "CreateEnvironment": { - "required": [ - "name", - "region" - ], + "GPURegionFields": { "type": "object", "properties": { - "name": { - "type": "string" + "id": { + "type": "integer" }, - "region": { + "name": { "type": "string" } } }, - "Environments": { + "GPUList": { "type": "object", "properties": { "status": { @@ -7782,33 +10634,43 @@ "message": { "type": "string" }, - "environments": { + "gpu_list": { "type": "array", "items": { - "$ref": "#/components/schemas/EnvironmentFields" + "$ref": "#/components/schemas/GPUFields" } } } }, - "EnvironmentFields": { + "UpdateGPU": { "type": "object", "properties": { - "id": { - "type": "integer" - }, "name": { "type": "string" }, - "region": { - "type": "string" + "regions": { + "type": "array", + "items": { + "type": "string" + } }, - "created_at": { + "example_metadata": { "type": "string", - "format": "date-time" + "description": "A valid JSON string.", + "example": "{\"key\": \"value\"}" + } + } + }, + "AttachCallbackPayload": { + "required": ["url"], + "type": "object", + "properties": { + "url": { + "type": "string" } } }, - "Environment": { + "AttachCallbackResponse": { "type": "object", "properties": { "status": { @@ -7817,23 +10679,12 @@ "message": { "type": "string" }, - "environment": { - "$ref": "#/components/schemas/EnvironmentFields" - } - } - }, - "UpdateEnvironment": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { + "url": { "type": "string" } } }, - "InstanceEvents": { + "InternalInstancesResponse": { "type": "object", "properties": { "status": { @@ -7842,102 +10693,138 @@ "message": { "type": "string" }, - "instance_events": { + "instances": { "type": "array", "items": { - "$ref": "#/components/schemas/InstanceEventsFields" + "$ref": "#/components/schemas/InternalInstanceFields" } } } }, - "InstanceEventsFields": { + "InternalInstanceFields": { "type": "object", "properties": { - "instance_id": { - "type": "integer" - }, - "user_id": { + "id": { "type": "integer" }, - "org_id": { - "type": "integer" + "name": { + "type": "string" }, - "time": { - "type": "string", - "format": "date-time" + "openstack_id": { + "type": "string" }, - "type": { + "status": { "type": "string" }, - "reason": { + "environment": { + "$ref": "#/components/schemas/InternalEnvironmentFields" + }, + "image": { + "$ref": "#/components/schemas/InternalInstanceImageFields" + }, + "flavor": { + "$ref": "#/components/schemas/InternalInstanceFlavorFields" + }, + "keypair": { + "$ref": "#/components/schemas/InternalInstanceKeypairFields" + }, + "volume_attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InternalVolumeAttachmentFields" + } + }, + "boot_source": { "type": "string" }, - "object": { + "power_state": { "type": "string" }, - "message": { + "vm_state": { "type": "string" - } - } - }, - "CreateInstancesPayload": { - "required": [ - "count", - "environment_name", - "key_name", - "name" - ], - "type": "object", - "properties": { - "name": { + }, + "fixed_ip": { "type": "string" }, - "environment_name": { + "floating_ip": { "type": "string" }, - "image_name": { + "floating_ip_status": { "type": "string" }, - "volume_name": { + "user_data": { "type": "string" }, - "create_bootable_volume": { - "type": "boolean" + "security_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InternalSecurityRulesFieldsForInstance" + } }, - "flavor_name": { + "callback_url": { "type": "string" }, - "flavor": { - "$ref": "#/components/schemas/FlavorObjectFields" + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "InternalEnvironmentFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" }, - "key_name": { + "name": { "type": "string" }, - "user_data": { + "region": { "type": "string" }, - "callback_url": { + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "InternalInstanceImageFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "assign_floating_ip": { - "type": "boolean" + "region_name": { + "type": "string" }, - "profile": { - "$ref": "#/components/schemas/ProfileObjectFields" + "type": { + "type": "string" }, - "count": { - "type": "integer" + "version": { + "type": "string" } } }, - "FlavorObjectFields": { + "InternalInstanceFlavorFields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "region_name": { + "type": "string" + }, "cpu": { "type": "integer" }, "ram": { - "type": "number" + "type": "integer" }, "disk": { "type": "integer" @@ -7947,44 +10834,56 @@ }, "gpu_count": { "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "ProfileObjectFields": { - "required": [ - "name" - ], + "InternalInstanceKeypairFields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "name": { "type": "string" }, - "description": { + "environment": { + "type": "string" + }, + "public_key": { + "type": "string" + }, + "fingerprint": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Instances": { + "InternalVolumeAttachmentFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "volume": { + "$ref": "#/components/schemas/InternalVolumeFields" }, - "message": { + "status": { "type": "string" }, - "instances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstanceAdminFields" - } + "device": { + "type": "string" }, - "instance_count": { - "type": "integer" + "created_at": { + "type": "string", + "format": "date-time" } } }, - "InstanceAdminFields": { + "InternalVolumeFields": { "type": "object", "properties": { "id": { @@ -7993,80 +10892,94 @@ "name": { "type": "string" }, - "status": { + "description": { "type": "string" }, - "environment": { - "$ref": "#/components/schemas/InstanceEnvironmentFields" - }, - "image": { - "$ref": "#/components/schemas/InstanceImageFields" - }, - "flavor": { - "$ref": "#/components/schemas/InstanceFlavorFields" - }, - "keypair": { - "$ref": "#/components/schemas/InstanceKeypairFields" - }, - "volume_attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VolumeAttachmentFields" - } + "volume_type": { + "type": "string" }, - "security_rules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SecurityRulesFieldsforInstance" - } + "size": { + "type": "string" + } + } + }, + "InternalSecurityRulesFieldsForInstance": { + "type": "object", + "properties": { + "id": { + "type": "integer" }, - "power_state": { + "direction": { "type": "string" }, - "vm_state": { + "protocol": { "type": "string" }, - "fixed_ip": { + "port_range_min": { + "type": "integer" + }, + "port_range_max": { + "type": "integer" + }, + "ethertype": { "type": "string" }, - "floating_ip": { + "remote_ip_prefix": { "type": "string" }, - "floating_ip_status": { + "status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" + } + } + }, + "InternalVolumesResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" }, - "openstack_id": { + "message": { "type": "string" + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InternalVolumeFields" + } } } }, - "InstanceEnvironmentFields": { + "RegionPayload": { + "required": ["name"], "type": "object", "properties": { "name": { "type": "string" }, - "org_id": { - "type": "integer" - }, - "region": { + "description": { "type": "string" } } }, - "InstanceImageFields": { + "RegionResponse": { "type": "object", "properties": { - "name": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" + }, + "region": { + "$ref": "#/components/schemas/RegionFields" } } }, - "InstanceFlavorFields": { + "RegionFields": { "type": "object", "properties": { "id": { @@ -8075,50 +10988,43 @@ "name": { "type": "string" }, - "cpu": { - "type": "integer" - }, - "ram": { - "type": "number" - }, - "disk": { - "type": "integer" - }, - "gpu": { + "description": { "type": "string" - }, - "gpu_count": { - "type": "integer" } } }, - "InstanceKeypairFields": { + "Regions": { "type": "object", "properties": { - "name": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RegionFields" + } } } }, - "VolumeAttachmentFields": { + "Template": { "type": "object", "properties": { - "volume": { - "$ref": "#/components/schemas/VolumeFieldsforInstance" - }, "status": { - "type": "string" + "type": "boolean" }, - "device": { + "message": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "template": { + "$ref": "#/components/schemas/TemplateFields" } } }, - "VolumeFieldsforInstance": { + "TemplateFields": { "type": "object", "properties": { "id": { @@ -8130,48 +11036,71 @@ "description": { "type": "string" }, - "volume_type": { + "content": { "type": "string" }, - "size": { - "type": "integer" + "is_public": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "SecurityRulesFieldsforInstance": { + "Templates": { "type": "object", "properties": { - "id": { - "type": "integer" + "status": { + "type": "boolean" }, - "direction": { + "message": { "type": "string" }, - "protocol": { + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TemplateFields" + } + } + } + }, + "UpdateTemplate": { + "type": "object", + "properties": { + "name": { "type": "string" }, - "port_range_min": { - "type": "integer" - }, - "port_range_max": { - "type": "integer" - }, - "ethertype": { + "description": { "type": "string" }, - "remote_ip_prefix": { + "is_public": { + "type": "boolean" + } + } + }, + "StartDeploymentPayload": { + "required": ["description", "name", "template_id"], + "type": "object", + "properties": { + "name": { "type": "string" }, - "status": { + "description": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "template_id": { + "type": "integer" + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, - "Instance": { + "StartDeployment": { "type": "object", "properties": { "status": { @@ -8180,35 +11109,39 @@ "message": { "type": "string" }, - "instance": { - "$ref": "#/components/schemas/InstanceAdminFields" + "deployment": { + "$ref": "#/components/schemas/DeploymentFieldsforstartdeployments" } } }, - "CreateSecurityRulePayload": { - "required": [ - "direction", - "ethertype", - "protocol", - "remote_ip_prefix" - ], + "DeploymentFieldsforstartdeployments": { "type": "object", "properties": { - "direction": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "protocol": { + "description": { "type": "string" }, - "ethertype": { + "template": { "type": "string" }, - "remote_ip_prefix": { + "status": { + "type": "string" + }, + "variables": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "SecurityGroupRule": { + "Deployments": { "type": "object", "properties": { "status": { @@ -8217,33 +11150,27 @@ "message": { "type": "string" }, - "security_rule": { - "$ref": "#/components/schemas/SecurityGroupRuleFields" + "deployments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentFields" + } } } }, - "SecurityGroupRuleFields": { + "DeploymentFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "direction": { - "type": "string" - }, - "protocol": { + "name": { "type": "string" }, - "port_range_min": { - "type": "integer" - }, - "port_range_max": { - "type": "integer" - }, - "ethertype": { + "description": { "type": "string" }, - "remote_ip_prefix": { + "template": { "type": "string" }, "status": { @@ -8255,57 +11182,82 @@ } } }, - "InstanceResizePayload": { + "SecurityRulesProtocolFields": { "type": "object", "properties": { - "flavor_name": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "flavor": { - "$ref": "#/components/schemas/FlavorObjectFields" + "protocols": { + "type": "array", + "items": { + "type": "string" + } } } }, - "FlavorPayload": { - "required": [ - "cpu", - "disk", - "gpu", - "gpu_count", - "is_public", - "name", - "ram", - "region_name" - ], + "CreateProfilePayload": { + "required": ["data", "name"], "type": "object", "properties": { "name": { - "type": "string" + "maxLength": 50, + "type": "string", + "description": "The name of the profile being created." }, - "region_name": { - "type": "string" + "description": { + "maxLength": 150, + "type": "string", + "description": "The optional description for the profile being created." }, - "cpu": { - "type": "integer" + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The data object which contains the configuration of the virtual machine profile being created." + } + } + }, + "CreateProfileResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" }, - "ram": { - "type": "number" + "message": { + "type": "string" }, - "disk": { + "profile": { + "$ref": "#/components/schemas/ProfileFields" + } + } + }, + "ProfileFields": { + "type": "object", + "properties": { + "id": { "type": "integer" }, - "gpu": { + "name": { "type": "string" }, - "gpu_count": { - "type": "integer" + "description": { + "type": "string" + }, + "data": { + "type": "string" }, - "is_public": { - "type": "boolean" + "created_at": { + "type": "string", + "format": "date-time" } } }, - "FlavorListResponse": { + "ProfileListResponse": { "type": "object", "properties": { "status": { @@ -8314,32 +11266,29 @@ "message": { "type": "string" }, - "data": { + "profiles": { "type": "array", "items": { - "$ref": "#/components/schemas/FlavorItemGetResponse" + "$ref": "#/components/schemas/ProfileFields" } } } }, - "FlavorItemGetResponse": { + "InstanceAdmin": { "type": "object", "properties": { - "gpu": { - "type": "string" + "status": { + "type": "boolean" }, - "region_name": { + "message": { "type": "string" }, - "flavors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlavorFields" - } + "instance": { + "$ref": "#/components/schemas/InstanceAdminFields" } } }, - "FlavorFields": { + "InstanceAdminFields": { "type": "object", "properties": { "id": { @@ -8348,34 +11297,76 @@ "name": { "type": "string" }, - "region_name": { + "status": { "type": "string" }, - "cpu": { - "type": "integer" + "environment": { + "$ref": "#/components/schemas/InstanceEnvironmentFields" }, - "ram": { - "type": "number" + "image": { + "$ref": "#/components/schemas/InstanceImageFields" }, - "disk": { - "type": "integer" + "flavor": { + "$ref": "#/components/schemas/InstanceFlavorFields" }, - "gpu": { + "os": { "type": "string" }, - "gpu_count": { - "type": "integer" + "keypair": { + "$ref": "#/components/schemas/InstanceKeypairFields" }, - "stock_available": { + "volume_attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VolumeAttachmentFields" + } + }, + "security_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SecurityRulesFieldsforInstance" + } + }, + "power_state": { + "type": "string" + }, + "vm_state": { + "type": "string" + }, + "fixed_ip": { + "type": "string" + }, + "floating_ip": { + "type": "string" + }, + "floating_ip_status": { + "type": "string" + }, + "locked": { "type": "boolean" }, + "contract_id": { + "type": "integer" + }, "created_at": { "type": "string", "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "openstack_id": { + "type": "string" + }, + "host": { + "type": "string" } } }, - "FlavorResponse": { + "InstancesAdmin": { "type": "object", "properties": { "status": { @@ -8384,12 +11375,18 @@ "message": { "type": "string" }, - "flavor": { - "$ref": "#/components/schemas/FlavorFields" + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceAdminFields" + } + }, + "instance_count": { + "type": "integer" } } }, - "Images": { + "AdminOrganizationResourceList": { "type": "object", "properties": { "status": { @@ -8398,35 +11395,71 @@ "message": { "type": "string" }, - "images": { + "organizations": { "type": "array", "items": { - "$ref": "#/components/schemas/ImageGetResponse" + "$ref": "#/components/schemas/AdminOrganizationResources" } } } }, - "ImageGetResponse": { + "AdminOrganizationResources": { "type": "object", "properties": { - "region_name": { - "type": "string" + "organization_id": { + "type": "integer" }, - "type": { + "environments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminEnvrionmentResources" + } + } + } + }, + "AdminEnvrionmentResources": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "logo": { + "region": { "type": "string" }, - "images": { + "instances": { "type": "array", "items": { - "$ref": "#/components/schemas/ImageFields" + "$ref": "#/components/schemas/AdminInstanceResources" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminVolumeResource" + } + }, + "containers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminContainerResource" + } + }, + "clusters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminClusterResource" } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "ImageFields": { + "AdminInstanceResources": { "type": "object", "properties": { "id": { @@ -8435,91 +11468,142 @@ "name": { "type": "string" }, - "region_name": { + "openstack_id": { "type": "string" }, - "type": { + "host": { "type": "string" }, - "version": { + "status": { "type": "string" }, - "size": { + "flavor": { + "$ref": "#/components/schemas/AdminFlavorResource" + }, + "image_id": { "type": "integer" }, - "display_size": { + "volume_id": { + "type": "integer" + }, + "keypair_name": { "type": "string" - } - } - }, - "ImageLogos": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "fixed_ip": { "type": "string" }, - "logos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LogoGetResponse" - } + "floating_ip": { + "type": "string" + }, + "contract_id": { + "type": "integer" + }, + "floating_ip_status": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "LogoGetResponse": { + "AdminFlavorResource": { "type": "object", "properties": { "id": { "type": "integer" }, - "type": { + "openstack_id": { "type": "string" }, - "url": { - "type": "string" - } - } - }, - "ImportKeypairPayload": { - "required": [ - "environment_name", - "name", - "public_key" - ], - "type": "object", - "properties": { "name": { "type": "string" }, - "environment_name": { + "region_name": { "type": "string" }, - "public_key": { + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { + "type": "string" + }, + "status": { + "type": "string" + }, + "gpu_count": { + "type": "integer" + }, + "stock_available": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminNodeResource" + } + }, + "vms": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_public": { + "type": "boolean" + }, + "is_custom": { + "type": "boolean" + }, + "ephemeral": { + "type": "integer" + }, + "description": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Keypairs": { + "AdminNodeResource": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" + }, + "openstack_id": { + "type": "string" }, - "message": { + "name": { "type": "string" }, - "Keypairs": { + "available": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "provision_date": { + "type": "string", + "format": "date-time" + }, + "organizations": { "type": "array", "items": { - "$ref": "#/components/schemas/KeypairFields" + "type": "integer" } } } }, - "KeypairFields": { + "AdminVolumeResource": { "type": "object", "properties": { "id": { @@ -8528,61 +11612,91 @@ "name": { "type": "string" }, - "environment": { + "openstack_id": { "type": "string" }, - "public_key": { + "type": { "type": "string" }, - "fingerprint": { + "size": { + "type": "integer" + }, + "status": { "type": "string" }, + "bootable": { + "type": "boolean" + }, "created_at": { "type": "string", "format": "date-time" } } }, - "ImportKeypairResponse": { + "AdminContainerResource": { "type": "object", "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "flavor": { + "$ref": "#/components/schemas/AdminFlavorResource" + }, "status": { - "type": "boolean" + "type": "string" }, - "message": { + "image": { "type": "string" }, - "keypair": { - "$ref": "#/components/schemas/KeypairFields" + "fixed_ip": { + "type": "string" + }, + "floating_ip": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "UpdateKeypairName": { - "required": [ - "name" - ], + "AdminClusterResource": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "name": { "type": "string" - } - } - }, - "UpdateKeypairnameresponse": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "kubernetes_version": { "type": "string" }, - "keypair": { - "$ref": "#/components/schemas/KeypairFields" + "status": { + "type": "string" + }, + "master_count": { + "type": "integer" + }, + "node_count": { + "type": "integer" + }, + "node_flavor": { + "$ref": "#/components/schemas/AdminFlavorResource" + }, + "enable_public_ip": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "RequestConsole": { + "AdminOrganizationResourceResponse": { "type": "object", "properties": { "status": { @@ -8591,12 +11705,12 @@ "message": { "type": "string" }, - "url": { - "type": "string" + "organization": { + "$ref": "#/components/schemas/AdminOrganizationResources" } } }, - "VNCURL": { + "AdminGetVersionResponse": { "type": "object", "properties": { "status": { @@ -8605,49 +11719,43 @@ "message": { "type": "string" }, - "vnc_url": { - "$ref": "#/components/schemas/VNCURLFields" + "version": { + "type": "string" } } }, - "VNCURLFields": { + "AdminCountResourcesOrganizations": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "vnc_url": { - "type": "string" + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminCountResourcesOrganization" + } } } }, - "CreateVolumePayload": { + "AdminCountResourcesOrganization": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "environment_name": { - "type": "string" - }, - "description": { - "type": "string" + "organization_id": { + "type": "integer" }, - "volume_type": { - "type": "string" + "total_instances": { + "type": "integer" }, - "size": { + "total_volumes": { "type": "integer" }, - "image_id": { + "total_containers": { "type": "integer" }, - "callback_url": { - "type": "string" + "total_clusters": { + "type": "integer" } } }, - "Volumes": { + "InstancesSummaryAdmin": { "type": "object", "properties": { "status": { @@ -8656,15 +11764,15 @@ "message": { "type": "string" }, - "volumes": { + "instances": { "type": "array", "items": { - "$ref": "#/components/schemas/VolumeFields" + "$ref": "#/components/schemas/InstancesSummaryFields" } } } }, - "VolumeFields": { + "InstancesSummaryFields": { "type": "object", "properties": { "id": { @@ -8674,27 +11782,42 @@ "type": "string" }, "environment": { - "$ref": "#/components/schemas/EnvironmentFieldsforVolume" - }, - "description": { "type": "string" }, - "volume_type": { + "org_id": { + "type": "integer" + }, + "environment_id": { + "type": "integer" + }, + "image": { "type": "string" }, - "size": { + "image_id": { "type": "integer" }, - "status": { + "flavor": { "type": "string" }, - "bootable": { - "type": "boolean" + "flavor_id": { + "type": "integer" }, - "image_id": { + "keypair": { + "type": "string" + }, + "keypair_id": { "type": "integer" }, - "callback_url": { + "fixed_ip": { + "type": "string" + }, + "floating_ip": { + "type": "string" + }, + "floating_ip_status": { + "type": "string" + }, + "status": { "type": "string" }, "created_at": { @@ -8707,15 +11830,38 @@ } } }, - "EnvironmentFieldsforVolume": { + "CompliancePayload": { + "required": [ + "base_value", + "gpu_model", + "resource_type", + "variation_max", + "variation_min", + "variation_unit" + ], "type": "object", "properties": { - "name": { + "gpu_model": { + "type": "string" + }, + "resource_type": { "type": "string" + }, + "base_value": { + "type": "integer" + }, + "variation_min": { + "type": "integer" + }, + "variation_max": { + "type": "integer" + }, + "variation_unit": { + "type": "integer" } } }, - "Volume": { + "CreateUpdateComplianceResponse": { "type": "object", "properties": { "status": { @@ -8724,12 +11870,38 @@ "message": { "type": "string" }, - "volume": { - "$ref": "#/components/schemas/VolumeFields" + "compliance": { + "$ref": "#/components/schemas/ComplianceModelFields" } } }, - "VolumeTypes": { + "ComplianceModelFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "gpu_model": { + "type": "string" + }, + "resource_type": { + "type": "string" + }, + "base_value": { + "type": "integer" + }, + "variation_min": { + "type": "integer" + }, + "variation_max": { + "type": "integer" + }, + "variation_unit": { + "type": "integer" + } + } + }, + "ComplianceResponse": { "type": "object", "properties": { "status": { @@ -8738,26 +11910,53 @@ "message": { "type": "string" }, - "volume_types": { - "type": "array", - "items": { - "type": "string" - } + "compliance": { + "$ref": "#/components/schemas/ComplianceFields" } } }, - "AttachVolumesPayload": { + "ComplianceFields": { "type": "object", "properties": { - "volume_ids": { + "gpu_model": { + "type": "string" + }, + "cpu": { "type": "array", "items": { "type": "integer" } + }, + "ram": { + "type": "array", + "items": { + "type": "integer" + } + }, + "hdd": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "CreateFirewallPayload": { + "required": ["environment_id", "name"], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "environment_id": { + "type": "integer" } } }, - "AttachVolumes": { + "FirewallResponse": { "type": "object", "properties": { "status": { @@ -8766,25 +11965,25 @@ "message": { "type": "string" }, - "volume_attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AttachVolumeFields" - } + "firewall": { + "$ref": "#/components/schemas/FirewallFields" } } }, - "AttachVolumeFields": { + "FirewallFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "instance_id": { - "type": "integer" + "name": { + "type": "string" }, - "volume_id": { - "type": "integer" + "description": { + "type": "string" + }, + "environment": { + "$ref": "#/components/schemas/FirewallEnvironmentFields" }, "status": { "type": "string" @@ -8795,18 +11994,21 @@ } } }, - "DetachVolumesPayload": { + "FirewallEnvironmentFields": { "type": "object", "properties": { - "volume_ids": { - "type": "array", - "items": { - "type": "integer" - } + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" } } }, - "DetachVolumes": { + "FirewallsListResponse": { "type": "object", "properties": { "status": { @@ -8815,52 +12017,69 @@ "message": { "type": "string" }, - "volume_attachments": { + "firewalls": { "type": "array", "items": { - "$ref": "#/components/schemas/AttachVolumeFields" + "$ref": "#/components/schemas/FirewallDetailFields" } } } }, - "CreateGPU": { - "required": [ - "name" - ], + "FirewallDetailFields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "name": { "type": "string" }, - "regions": { + "description": { + "type": "string" + }, + "environment": { + "$ref": "#/components/schemas/FirewallEnvironmentFields" + }, + "status": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "rules": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/SecurityGroupRuleFields" } }, - "example_metadata": { - "type": "string" + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FirewallAttachmentModel" + } } } }, - "GPUList": { + "FirewallAttachmentModel": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "status": { "type": "string" }, - "gpu_list": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GPUFields" - } + "vm": { + "$ref": "#/components/schemas/FirewallAttachmentVMModel" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "GPUFields": { + "FirewallAttachmentVMModel": { "type": "object", "properties": { "id": { @@ -8869,37 +12088,46 @@ "name": { "type": "string" }, - "regions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GPURegionFields" - } + "flavor": { + "type": "string" }, - "example_metadata": { + "environment": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "status": { + "type": "string" }, - "updated_at": { + "created_at": { "type": "string", "format": "date-time" } } }, - "GPURegionFields": { + "CreateFirewallRulePayload": { + "required": ["direction", "ethertype", "protocol", "remote_ip_prefix"], "type": "object", "properties": { - "id": { + "direction": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "port_range_min": { "type": "integer" }, - "name": { + "port_range_max": { + "type": "integer" + }, + "ethertype": { + "type": "string" + }, + "remote_ip_prefix": { "type": "string" } } }, - "GPU": { + "FirewallRule": { "type": "object", "properties": { "status": { @@ -8908,40 +12136,56 @@ "message": { "type": "string" }, - "gpu": { - "$ref": "#/components/schemas/GPUFields" + "firewall_rule": { + "$ref": "#/components/schemas/SecurityGroupRuleFields" } } }, - "UpdateGPU": { + "FirewallDetailResponse": { "type": "object", "properties": { - "name": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "regions": { + "firewall": { + "$ref": "#/components/schemas/FirewallDetailFields" + } + } + }, + "AttachFirewallWithVM": { + "required": ["vms"], + "type": "object", + "properties": { + "vms": { "type": "array", "items": { - "type": "string" + "type": "integer" } - }, - "example_metadata": { - "type": "string" } } }, - "AttachCallbackPayload": { - "required": [ - "url" - ], + "SetDefaultsPayload": { + "required": ["flavors", "images"], "type": "object", "properties": { - "url": { - "type": "string" + "flavors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "images": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "AttachCallbackResponse": { + "UserDefaultChoicesForAdminResponse": { "type": "object", "properties": { "status": { @@ -8950,12 +12194,32 @@ "message": { "type": "string" }, - "url": { + "user_default_choices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserDefaultChoiceForAdminFields" + } + } + } + }, + "UserDefaultChoiceForAdminFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "region_name": { "type": "string" + }, + "flavor_id": { + "type": "integer" + }, + "image_id": { + "type": "integer" } } }, - "InternalInstancesResponse": { + "UserDefaultChoicesForUserResponse": { "type": "object", "properties": { "status": { @@ -8964,102 +12228,169 @@ "message": { "type": "string" }, - "instances": { + "user_default_choices": { "type": "array", "items": { - "$ref": "#/components/schemas/InternalInstanceFields" + "$ref": "#/components/schemas/UserDefaultChoiceForUserFields" } } } }, - "InternalInstanceFields": { + "UserDefaultChoiceForUserFields": { "type": "object", "properties": { - "id": { + "region_id": { + "type": "integer" + }, + "environment_id": { + "type": "integer" + }, + "keypair_id": { "type": "integer" }, + "flavor_id": { + "type": "integer" + }, + "image_id": { + "type": "integer" + } + } + }, + "AdminAddUpdateImageOrganizationPayload": { + "required": [ + "is_public", + "name", + "openstack_id", + "organizations", + "region_id", + "size", + "type", + "version" + ], + "type": "object", + "properties": { "name": { "type": "string" }, "openstack_id": { "type": "string" }, - "status": { + "region_id": { + "type": "integer" + }, + "type": { "type": "string" }, - "environment": { - "$ref": "#/components/schemas/InternalEnvironmentFields" + "version": { + "type": "string" }, - "image": { - "$ref": "#/components/schemas/InternalInstanceImageFields" + "size": { + "type": "integer" }, - "flavor": { - "$ref": "#/components/schemas/InternalInstanceFlavorFields" + "is_public": { + "type": "boolean" }, - "keypair": { - "$ref": "#/components/schemas/InternalInstanceKeypairFields" + "description": { + "type": "string" }, - "volume_attachments": { + "labels": { "type": "array", "items": { - "$ref": "#/components/schemas/InternalVolumeAttachmentFields" + "type": "string" } }, - "boot_source": { + "organizations": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "AdminImageAdminResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "power_state": { + "image": { + "$ref": "#/components/schemas/AdminImageAdminResponseImage" + } + } + }, + "AdminImageAdminResponseImage": { + "required": ["organizations"], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "vm_state": { + "openstack_id": { "type": "string" }, - "fixed_ip": { + "region_id": { + "type": "integer" + }, + "region_name": { "type": "string" }, - "floating_ip": { + "type": { "type": "string" }, - "floating_ip_status": { + "version": { "type": "string" }, - "user_data": { + "size": { + "type": "integer" + }, + "is_public": { + "type": "boolean" + }, + "description": { "type": "string" }, - "security_rules": { + "labels": { "type": "array", "items": { - "$ref": "#/components/schemas/InternalSecurityRulesFieldsForInstance" + "$ref": "#/components/schemas/LableResonse" } }, - "callback_url": { - "type": "string" - }, "created_at": { "type": "string", "format": "date-time" + }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "InternalEnvironmentFields": { + "AdminImageListAdminResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" + "status": { + "type": "boolean" }, - "region": { + "message": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminImageAdminFields" + } } } }, - "InternalInstanceImageFields": { + "AdminImageAdminFields": { "type": "object", "properties": { "id": { @@ -9068,6 +12399,12 @@ "name": { "type": "string" }, + "openstack_id": { + "type": "string" + }, + "region_id": { + "type": "integer" + }, "region_name": { "type": "string" }, @@ -9076,85 +12413,100 @@ }, "version": { "type": "string" + }, + "size": { + "type": "integer" + }, + "is_public": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LableResonse" + } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "InternalInstanceFlavorFields": { + "AddUpdateFlavorOrganizationPayload": { + "required": [ + "cpu", + "disk", + "gpu_count", + "gpu_id", + "is_public", + "name", + "openstack_id", + "organizations", + "ram", + "region_id" + ], "type": "object", "properties": { - "id": { - "type": "integer" - }, "name": { "type": "string" }, - "region_name": { + "description": { "type": "string" }, + "openstack_id": { + "type": "string" + }, + "region_id": { + "type": "integer" + }, "cpu": { "type": "integer" }, "ram": { - "type": "integer" + "type": "number" }, "disk": { "type": "integer" }, - "gpu": { - "type": "string" - }, - "gpu_count": { + "ephemeral": { "type": "integer" }, - "created_at": { - "type": "string", - "format": "date-time" - } - } - }, - "InternalInstanceKeypairFields": { - "type": "object", - "properties": { - "id": { + "gpu_id": { "type": "integer" }, - "name": { - "type": "string" - }, - "environment": { - "type": "string" - }, - "public_key": { - "type": "string" + "gpu_count": { + "type": "integer" }, - "fingerprint": { - "type": "string" + "is_public": { + "type": "boolean" }, - "created_at": { - "type": "string", - "format": "date-time" + "organizations": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "InternalVolumeAttachmentFields": { + "FlavorAdminResponse": { "type": "object", "properties": { - "volume": { - "$ref": "#/components/schemas/InternalVolumeFields" - }, "status": { - "type": "string" + "type": "boolean" }, - "device": { + "message": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "flavor": { + "$ref": "#/components/schemas/FlavorAdminResponseFlavors" } } }, - "InternalVolumeFields": { + "FlavorAdminResponseFlavors": { + "required": ["organizations"], "type": "object", "properties": { "id": { @@ -9166,48 +12518,70 @@ "description": { "type": "string" }, - "volume_type": { + "openstack_id": { "type": "string" }, - "size": { - "type": "string" - } - } - }, - "InternalSecurityRulesFieldsForInstance": { - "type": "object", - "properties": { - "id": { + "region_id": { "type": "integer" }, - "direction": { + "region": { "type": "string" }, - "protocol": { - "type": "string" + "cpu": { + "type": "integer" }, - "port_range_min": { + "ram": { + "type": "number" + }, + "disk": { "type": "integer" }, - "port_range_max": { + "ephemeral": { "type": "integer" }, - "ethertype": { + "gpu": { "type": "string" }, - "remote_ip_prefix": { - "type": "string" + "gpu_count": { + "type": "integer" + }, + "order": { + "type": "integer" + }, + "is_public": { + "type": "boolean" + }, + "is_custom": { + "type": "boolean" }, "status": { "type": "string" }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } + }, + "flavors": { + "type": "array", + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "items": { + "type": "string" + } + }, "created_at": { "type": "string", "format": "date-time" } } }, - "InternalVolumesResponse": { + "AdminFlavorResourcesList": { "type": "object", "properties": { "status": { @@ -9216,29 +12590,15 @@ "message": { "type": "string" }, - "volumes": { + "flavors": { "type": "array", "items": { - "$ref": "#/components/schemas/InternalVolumeFields" + "$ref": "#/components/schemas/AdminFlavorResource" } } } }, - "RegionPayload": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "Regions": { + "FlavorDetailResponse": { "type": "object", "properties": { "status": { @@ -9247,137 +12607,114 @@ "message": { "type": "string" }, - "regions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RegionFields" - } + "flavor": { + "$ref": "#/components/schemas/AdminFlavorDetailFields" } } }, - "RegionFields": { + "AdminFlavorDetailFields": { "type": "object", "properties": { "id": { "type": "integer" }, + "openstack_id": { + "type": "string" + }, "name": { "type": "string" }, - "description": { + "region_name": { "type": "string" - } - } - }, - "RegionResponse": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { "type": "string" }, - "region": { - "$ref": "#/components/schemas/RegionFields" - } - } - }, - "Templates": { - "type": "object", - "properties": { "status": { + "type": "string" + }, + "gpu_count": { + "type": "integer" + }, + "stock_available": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminFlavorDetailNodeFields" + } + }, + "vms": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_public": { "type": "boolean" }, - "message": { - "type": "string" + "is_custom": { + "type": "boolean" }, - "templates": { + "org_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/TemplateFields" + "type": "integer" } - } - } - }, - "TemplateFields": { - "type": "object", - "properties": { - "id": { - "type": "integer" }, - "name": { - "type": "string" + "ephemeral": { + "type": "integer" }, "description": { "type": "string" }, - "content": { - "type": "string" - }, - "is_public": { - "type": "boolean" - }, "created_at": { "type": "string", "format": "date-time" } } }, - "Template": { + "AdminFlavorDetailNodeFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "openstack_id": { "type": "string" }, - "template": { - "$ref": "#/components/schemas/TemplateFields" - } - } - }, - "UpdateTemplate": { - "type": "object", - "properties": { "name": { "type": "string" }, - "description": { - "type": "string" - }, - "is_public": { - "type": "boolean" - } - } - }, - "StartDeploymentPayload": { - "required": [ - "description", - "name", - "template_id" - ], - "type": "object", - "properties": { - "name": { - "type": "string" + "available": { + "type": "integer" }, - "description": { + "status": { "type": "string" }, - "template_id": { - "type": "integer" + "provision_date": { + "type": "string", + "format": "date-time" }, - "variables": { - "type": "object", - "additionalProperties": { + "projects": { + "type": "array", + "items": { "type": "string" } } } }, - "Deployments": { + "FlavorVMsResponse": { "type": "object", "properties": { "status": { @@ -9386,29 +12723,32 @@ "message": { "type": "string" }, - "deployments": { + "flavor_vms": { "type": "array", "items": { - "$ref": "#/components/schemas/DeploymentFields" + "$ref": "#/components/schemas/FlavorVMFields" } } } }, - "DeploymentFields": { + "FlavorVMFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { + "openstack_id": { "type": "string" }, - "description": { + "name": { "type": "string" }, - "template": { + "host": { "type": "string" }, + "org_id": { + "type": "integer" + }, "status": { "type": "string" }, @@ -9418,21 +12758,16 @@ } } }, - "StartDeployment": { + "AdminBootstrapEnvironmentPayload": { + "required": ["org_id"], "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "deployment": { - "$ref": "#/components/schemas/DeploymentFieldsforstartdeployments" + "org_id": { + "type": "integer" } } }, - "DeploymentFieldsforstartdeployments": { + "PricebookModel": { "type": "object", "properties": { "id": { @@ -9441,101 +12776,88 @@ "name": { "type": "string" }, - "description": { - "type": "string" + "value": { + "type": "number" }, - "template": { - "type": "string" + "original_value": { + "type": "number" }, - "status": { - "type": "string" + "discount_applied": { + "type": "boolean" }, - "variables": { - "type": "string" + "start_time": { + "type": "string", + "format": "date-time" }, - "created_at": { + "end_time": { "type": "string", "format": "date-time" } } }, - "SecurityRulesProtocolFields": { + "CreateDiscountsPayload": { + "required": ["customers", "discount_resources", "discount_status"], "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" + "customers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomerPayload" + } }, - "protocols": { + "discount_resources": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ResourcePayload" } - } - } - }, - "CreateProfilePayload": { - "required": [ - "data", - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" }, - "description": { - "type": "string" + "start_date": { + "type": "string", + "format": "date-time" }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "end_date": { + "type": "string", + "format": "date-time" + }, + "discount_status": { + "type": "string" } } }, - "ProfileListResponse": { + "CustomerPayload": { + "required": ["id", "plan_type"], "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "plan_type": { "type": "string" - }, - "profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProfileFields" - } } } }, - "ProfileFields": { + "ResourcePayload": { + "required": ["discount_type", "resource_id"], "type": "object", "properties": { - "id": { + "resource_id": { "type": "integer" }, - "name": { - "type": "string" + "discount_percent": { + "type": "number" }, - "description": { + "discount_type": { "type": "string" }, - "data": { - "type": "string" + "discount_amount": { + "type": "number" }, - "created_at": { - "type": "string", - "format": "date-time" + "resource_count": { + "type": "integer" } } }, - "CreateProfileResponse": { + "GetAllDiscountForAllOrganizationResponse": { "type": "object", "properties": { "status": { @@ -9544,243 +12866,206 @@ "message": { "type": "string" }, - "profile": { - "$ref": "#/components/schemas/ProfileFields" + "discount_plans": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetAllDiscountsFields" + } } } }, - "OrganizationResourceList": { + "GetAllDiscountsFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "org_id": { + "type": "integer" }, - "message": { + "org_name": { "type": "string" }, - "organizations": { + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "discount_status": { + "type": "string" + }, + "discount_resources": { "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationResources" + "$ref": "#/components/schemas/DiscountResourceFields" } } } }, - "OrganizationResources": { + "DiscountResourceFields": { "type": "object", "properties": { - "organization_id": { + "resource_id": { "type": "integer" }, - "environments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnvrionmentResources" - } + "discount_percent": { + "type": "number" } } }, - "EnvrionmentResources": { + "CreateDiscountResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" + "status": { + "type": "boolean" }, - "region": { + "message": { "type": "string" }, - "instances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstanceResources" - } - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VolumeResource" - } - }, - "containers": { + "discount_plan": { + "$ref": "#/components/schemas/InsertDiscountPlanFields" + } + } + }, + "InsertDiscountPlanFields": { + "type": "object", + "properties": { + "customers": { "type": "array", "items": { - "$ref": "#/components/schemas/ContainerResource" + "$ref": "#/components/schemas/CustomerFields" } }, - "clusters": { + "discount_resources": { "type": "array", "items": { - "$ref": "#/components/schemas/ClusterResource" + "$ref": "#/components/schemas/DiscountResourceFields" } }, - "created_at": { + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { "type": "string", "format": "date-time" + }, + "discount_status": { + "type": "string" } } }, - "InstanceResources": { + "CustomerFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { - "type": "string" - }, - "host": { - "type": "string" - }, - "status": { - "type": "string" - }, - "flavor": { - "$ref": "#/components/schemas/FlavorResource" - }, - "image_id": { - "type": "integer" - }, - "volume_id": { - "type": "integer" - }, - "keypair_name": { - "type": "string" - }, - "fixed_ip": { - "type": "string" - }, - "floating_ip": { - "type": "string" - }, - "floating_ip_status": { + "plan_type": { "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "FlavorResource": { + "UpdateDiscountsPayload": { + "required": ["discount_resources", "discount_status"], "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "cpu": { - "type": "integer" + "discount_resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourcePayload" + } }, - "ram": { - "type": "number" + "start_date": { + "type": "string", + "format": "date-time" }, - "disk": { - "type": "integer" + "end_date": { + "type": "string", + "format": "date-time" }, - "gpu": { + "discount_status": { "type": "string" - }, - "gpu_count": { - "type": "integer" } } }, - "VolumeResource": { + "GetEntityDiscountDetailResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "size": { - "type": "integer" - }, "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "bootable": { - "type": "boolean" + "organization": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscountPlanFields" + } }, - "created_at": { - "type": "string", - "format": "date-time" + "virtual-machine": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscountPlanFields" + } } } }, - "ContainerResource": { + "DiscountPlanFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { + "resource_id": { + "type": "integer" + }, + "resource_name": { "type": "string" }, - "flavor": { - "$ref": "#/components/schemas/FlavorResource" + "resource_count": { + "type": "integer" }, - "status": { + "discount_type": { "type": "string" }, - "image": { + "discount_code": { "type": "string" }, - "fixed_ip": { - "type": "string" + "discount_percent": { + "type": "number" }, - "floating_ip": { - "type": "string" + "discount_amount": { + "type": "number" }, - "created_at": { - "type": "string", - "format": "date-time" + "discount_status": { + "type": "string" } } }, - "ClusterResource": { + "SuccessResponseModel": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" + "status": { + "type": "boolean", + "default": false }, - "kubernetes_version": { + "message": { "type": "string" - }, - "status": { + } + } + }, + "UpdateDiscountsStatusPayload": { + "required": ["discount_status"], + "type": "object", + "properties": { + "discount_status": { "type": "string" - }, - "master_count": { - "type": "integer" - }, - "node_count": { - "type": "integer" - }, - "node_flavor": { - "$ref": "#/components/schemas/FlavorResource" - }, - "enable_public_ip": { - "type": "boolean" - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "OrganizationResourceResponse": { + "GetDiscountResponse": { "type": "object", "properties": { "status": { @@ -9789,43 +13074,42 @@ "message": { "type": "string" }, - "organization": { - "$ref": "#/components/schemas/OrganizationResources" + "discount_entites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscountFields" + } } } }, - "CompliancePayload": { - "required": [ - "base_value", - "gpu_model", - "resource_type", - "variation_max", - "variation_min", - "variation_unit" - ], + "DiscountFields": { "type": "object", "properties": { - "gpu_model": { + "org_id": { + "type": "integer" + }, + "org_name": { "type": "string" }, - "resource_type": { + "plan_type": { "type": "string" }, - "base_value": { + "vm_id": { "type": "integer" }, - "variation_min": { - "type": "integer" + "vm_name": { + "type": "string" }, - "variation_max": { - "type": "integer" + "end_date": { + "type": "string", + "format": "date-time" }, - "variation_unit": { - "type": "integer" + "discount_status": { + "type": "string" } } }, - "ComplianceResponse": { + "GetDiscountDetailResponse": { "type": "object", "properties": { "status": { @@ -9834,116 +13118,159 @@ "message": { "type": "string" }, - "compliance": { - "$ref": "#/components/schemas/ComplianceFields" + "discounts_entity": { + "$ref": "#/components/schemas/DiscountEntityModel" } } }, - "ComplianceFields": { + "DiscountEntityModel": { "type": "object", "properties": { - "gpu_model": { + "entity": { "type": "string" }, - "cpu": { + "data": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/DiscountPlanFields" } + } + } + }, + "BillingResponse": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "ram": { + "calculated_bills": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/OrganizationObjectResponse" } + } + } + }, + "OrganizationObjectResponse": { + "type": "object", + "properties": { + "org_id": { + "type": "integer" }, - "hdd": { + "resources": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/InfrahubResourceObjectResponse" } } } }, - "CreateUpdateComplianceResponse": { + "InfrahubResourceObjectResponse": { "type": "object", "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "infrahub_id": { + "type": "integer" + }, "status": { - "type": "boolean" + "type": "string" }, - "message": { + "host": { "type": "string" }, - "compliance": { - "$ref": "#/components/schemas/ComplianceModelFields" + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PricebookResourceObjectResponse" + } + }, + "price": { + "type": "number" + }, + "actual_price": { + "type": "number" + }, + "host_price": { + "type": "number" + }, + "actual_host_price": { + "type": "number" + }, + "nexgen_price": { + "type": "number" + }, + "nexgen_actual_price": { + "type": "number" } } }, - "ComplianceModelFields": { + "PricebookResourceObjectResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "gpu_model": { + "type": { "type": "string" }, - "resource_type": { + "name": { "type": "string" }, - "base_value": { + "amount": { "type": "integer" }, - "variation_min": { - "type": "integer" + "rate": { + "type": "number" }, - "variation_max": { - "type": "integer" + "discounted_rate": { + "type": "number" }, - "variation_unit": { - "type": "integer" - } - } - }, - "PricebookModel": { - "type": "object", - "properties": { - "id": { - "type": "integer" + "price": { + "type": "number" }, - "name": { - "type": "string" + "actual_price": { + "type": "number" }, - "value": { + "host_price": { "type": "number" }, - "original_value": { + "host_original_price": { "type": "number" }, - "discount_applied": { + "nexgen_price": { + "type": "number" + }, + "nexgen_original_price": { + "type": "number" + } + } + }, + "GetVersionResponse": { + "type": "object", + "properties": { + "status": { "type": "boolean" }, - "start_time": { - "type": "string", - "format": "date-time" + "message": { + "type": "string" }, - "end_time": { - "type": "string", - "format": "date-time" + "version": { + "type": "string" } } }, - "CreateDiscountsPayload": { - "required": [ - "discount_resources", - "discount_status", - "org_id" - ], + "CreateContractPayload": { + "required": ["discount_resources", "expiration_policy", "org_id"], "type": "object", "properties": { "org_id": { "type": "integer" }, + "description": { + "type": "string" + }, "discount_resources": { "type": "array", "items": { @@ -9958,27 +13285,12 @@ "type": "string", "format": "date-time" }, - "discount_status": { - "type": "string" - } - } - }, - "ResourcePayload": { - "required": [ - "discount_percent", - "resource_id" - ], - "type": "object", - "properties": { - "resource_id": { + "expiration_policy": { "type": "integer" - }, - "discount_percent": { - "type": "number" } } }, - "CreateDiscountResponse": { + "GetContractsListResponseModel": { "type": "object", "properties": { "status": { @@ -9987,25 +13299,28 @@ "message": { "type": "string" }, - "discount_plan": { - "$ref": "#/components/schemas/InsertDiscountPlanFields" + "contracts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminContractFields" + } + }, + "count": { + "type": "integer" } } }, - "InsertDiscountPlanFields": { + "AdminContractFields": { "type": "object", "properties": { - "org_id": { + "id": { "type": "integer" }, "org_name": { "type": "string" }, - "discount_resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountResourceFields" - } + "description": { + "type": "string" }, "start_date": { "type": "string", @@ -10015,46 +13330,89 @@ "type": "string", "format": "date-time" }, - "discount_status": { + "expiration_policy": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "gpu_name": { + "type": "string" + }, + "percent": { + "type": "number" + }, + "amount": { + "type": "number" + }, + "discount_type": { "type": "string" + }, + "resource_count": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "DiscountResourceFields": { + "AdminCreateContractResponseModel": { "type": "object", "properties": { - "resource_id": { - "type": "integer" + "status": { + "type": "boolean" }, - "discount_percent": { - "type": "number" + "message": { + "type": "string" + }, + "contract": { + "$ref": "#/components/schemas/CreateContarctFields" } } }, - "GetAllDiscountForAllOrganizationResponse": { + "CreateContarctFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "org_id": { + "type": "integer" + }, + "description": { "type": "string" }, + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "expiration_policy": { + "type": "integer" + }, "discount_plans": { "type": "array", "items": { - "$ref": "#/components/schemas/InsertDiscountPlanFields" + "$ref": "#/components/schemas/DiscountPlanFields" } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "UpdateDiscountsPayload": { - "required": [ - "discount_resources", - "discount_status" - ], + "UpdateContractPayload": { + "required": ["discount_resources", "expiration_policy"], "type": "object", "properties": { + "description": { + "type": "string" + }, "discount_resources": { "type": "array", "items": { @@ -10069,24 +13427,12 @@ "type": "string", "format": "date-time" }, - "discount_status": { - "type": "string" - } - } - }, - "SuccessResponseModel": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" + "expiration_policy": { + "type": "integer" } } }, - "DiscountDetailResponse": { + "GetContractDetailResponseModel": { "type": "object", "properties": { "status": { @@ -10095,139 +13441,171 @@ "message": { "type": "string" }, - "discount_plan": { + "contract": { + "$ref": "#/components/schemas/AdminGetContractDetailFields" + }, + "discount_plans": { "type": "array", "items": { - "$ref": "#/components/schemas/InsertDiscountPlanFields" + "$ref": "#/components/schemas/DiscountPlanFields" } } } }, - "UpdateDiscountsStatusPayload": { - "required": [ - "discount_status" - ], + "AdminGetContractDetailFields": { "type": "object", "properties": { - "discount_status": { + "id": { + "type": "integer" + }, + "org_id": { + "type": "integer" + }, + "description": { "type": "string" + }, + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "expiration_policy": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "BillingResponse": { + "GetCustomerContractsListResponseModel": { "type": "object", "properties": { - "type": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "calculated_bills": { + "contracts": { "type": "array", "items": { - "$ref": "#/components/schemas/OrganizationObjectResponse" + "$ref": "#/components/schemas/CustomerContractFields" } + }, + "count": { + "type": "integer" } } }, - "OrganizationObjectResponse": { + "CustomerContractFields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "org_id": { "type": "integer" }, - "resources": { + "description": { + "type": "string" + }, + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "expiration_policy": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "discounts": { "type": "array", "items": { - "$ref": "#/components/schemas/InfrahubResourceObjectResponse" + "$ref": "#/components/schemas/DiscountPlanFields" } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "InfrahubResourceObjectResponse": { + "CustomerContractDetailResponseModel": { "type": "object", "properties": { - "type": { - "type": "string" + "status": { + "type": "boolean" }, - "name": { + "message": { "type": "string" }, - "infrahub_id": { - "type": "integer" - }, + "contracts": { + "$ref": "#/components/schemas/CustomerContractFields" + } + } + }, + "GetContractEventsResponseModel": { + "type": "object", + "properties": { "status": { - "type": "string" + "type": "boolean" }, - "host": { + "message": { "type": "string" }, - "resources": { + "contract_events": { "type": "array", "items": { - "$ref": "#/components/schemas/PricebookResourceObjectResponse" + "$ref": "#/components/schemas/AdminContractEventFields" } }, - "price": { - "type": "number" - }, - "actual_price": { - "type": "number" - }, - "host_price": { - "type": "number" - }, - "actual_host_price": { - "type": "number" - }, - "nexgen_price": { - "type": "number" - }, - "nexgen_actual_price": { - "type": "number" + "count": { + "type": "integer" } } }, - "PricebookResourceObjectResponse": { + "AdminContractEventFields": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "amount": { + "id": { "type": "integer" }, - "rate": { - "type": "number" - }, - "discounted_rate": { - "type": "number" + "user_id": { + "type": "integer" }, - "price": { - "type": "number" + "org_id": { + "type": "integer" }, - "actual_price": { - "type": "number" + "time": { + "type": "string", + "format": "date-time" }, - "host_price": { - "type": "number" + "type": { + "type": "string" }, - "host_original_price": { - "type": "number" + "reason": { + "type": "string" }, - "nexgen_price": { - "type": "number" + "message": { + "type": "string" }, - "nexgen_original_price": { - "type": "number" + "created_at": { + "type": "string", + "format": "date-time" } } }, "Adminaddorganizationpayload": { - "required": [ - "organization_id" - ], + "required": ["organization_id"], "type": "object", "properties": { "organization_id": { @@ -10371,6 +13749,169 @@ }, "active": { "type": "boolean" + }, + "exclude_billing": { + "type": "boolean" + } + } + }, + "Excludebillingpostpayload": { + "required": ["exclude", "resource_id"], + "type": "object", + "properties": { + "resource_id": { + "type": "integer" + }, + "exclude": { + "type": "boolean" + } + } + }, + "Excludebillingpostresponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/Excludebillingpostpayload" + } + } + }, + "Billingimmuneresourcesresponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Billingimmuneresources" + } + } + } + }, + "Billingimmuneresources": { + "type": "object", + "properties": { + "resource_id": { + "type": "integer" + }, + "resource_type": { + "type": "string" + }, + "organization_id": { + "type": "integer" + } + } + }, + "Adminpaymenthistoryresponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "status": { + "type": "boolean" + }, + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Adminpaymenthistoryfields" + } + } + } + }, + "Adminpaymenthistoryfields": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "medium": { + "type": "string" + }, + "status": { + "type": "string" + }, + "transaction_id": { + "type": "string" + }, + "payment_id": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "UsersInfoListResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "users_info": { + "$ref": "#/components/schemas/UsersInfoFields" + } + } + }, + "UsersInfoFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "organization_id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "business": { + "type": "boolean" + }, + "company_name": { + "type": "string" + }, + "vat_number": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "billing_address1": { + "type": "string" + }, + "billing_address2": { + "type": "string" + }, + "zip_code": { + "type": "string" + }, + "country": { + "type": "string" + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, @@ -10480,16 +14021,69 @@ "type": "string" } } + }, + "Userinfopostpayload": { + "required": ["business", "country", "zip_code"], + "type": "object", + "properties": { + "business": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "company_name": { + "type": "string" + }, + "vat_number": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "billing_address1": { + "type": "string" + }, + "billing_address2": { + "type": "string" + }, + "zip_code": { + "type": "string" + }, + "country": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "AddUserInfoSuccessResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/UsersInfoFields" + } + } } }, "responses": { - "MaskError": { - "description": "When any error occurs on mask", - "content": {} - }, "ParseError": { "description": "When a mask can't be parsed", "content": {} + }, + "MaskError": { + "description": "When any error occurs on mask", + "content": {} } }, "securitySchemes": { @@ -10506,5 +14100,6 @@ "in": "header" } } - } + }, + "x-original-swagger-version": "2.0" } diff --git a/api.orig.json b/openapi/api.orig.json similarity index 65% rename from api.orig.json rename to openapi/api.orig.json index 0d175fe..cb18d24 100644 --- a/api.orig.json +++ b/openapi/api.orig.json @@ -6,7 +6,7 @@ }, "servers": [ { - "url": "https://infrahub-api.nexgencloud.com/v1" + "url": "/v1" } ], "tags": [ @@ -54,6 +54,10 @@ "name": "admin", "description": "API Key" }, + { + "name": "User", + "description": "User Admin APIs" + }, { "name": "dashboard", "description": "Dashboard APIs" @@ -142,6 +146,34 @@ "name": "compliance", "description": "Compliance APIs" }, + { + "name": "firewalls", + "description": "Firewalls APIs" + }, + { + "name": "firewall-attachment", + "description": "Firewall Attachments APIs" + }, + { + "name": "user detail choice", + "description": "User Detail Choice APIs" + }, + { + "name": "Admin Images", + "description": "Admin Images Organization APIs" + }, + { + "name": "Admin Flavors", + "description": "Admin Flavors APIs" + }, + { + "name": "Admin Virtual Machines", + "description": "Admin VM APIs" + }, + { + "name": "Admin Environments", + "description": "Admin Environments APIs" + }, { "name": "Pricebook", "description": "Pricebook APIs" @@ -154,6 +186,22 @@ "name": "Calculate", "description": "Calculate APIs" }, + { + "name": "Admin", + "description": "Admin APIs" + }, + { + "name": "Admin Contract", + "description": "Admin Contract APIs" + }, + { + "name": "Customer Contract", + "description": "Customer Contract APIs" + }, + { + "name": "Contract Event", + "description": "Contract Event APIs" + }, { "name": "alive" }, @@ -168,6 +216,9 @@ }, { "name": "payment" + }, + { + "name": "user" } ], "paths": { @@ -180,11 +231,11 @@ "operationId": "Get API Key", "responses": { "200": { - "description": "Getting API Key success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/API%20Key" + "$ref": "#/components/schemas/GetApiKeyResponseModel" } } } @@ -233,11 +284,11 @@ "operationId": "Generate API Key", "responses": { "200": { - "description": "API Key generated successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/API%20Key%20generation" + "$ref": "#/components/schemas/GenerateApiKeyResponseModel" } } } @@ -277,9 +328,17 @@ "/api-key/verify": {}, "/auth/admin/credit-warning-mail/{org_id}": {}, "/auth/admin/data-usages-warning-mail/{org_id}": {}, + "/auth/admin/hibernation-restoration-mail": {}, "/auth/admin/organizations": {}, + "/auth/admin/organizations/summary": {}, "/auth/admin/organizations/{id}": {}, + "/auth/admin/payment-confirmation-mail/{org_id}": {}, "/auth/admin/termination-warning-mail/{org_id}": {}, + "/auth/admin/users": {}, + "/auth/admin/users/{id}": {}, + "/auth/admin/users/{user_id}/update": {}, + "/auth/admin/version": {}, + "/auth/admin/vm-status-mail": {}, "/auth/invites": { "get": { "tags": [ @@ -289,11 +348,11 @@ "operationId": "List Invites", "responses": { "200": { - "description": "Getting invites successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Invites" + "$ref": "#/components/schemas/GetInvitesResponseModel" } } } @@ -342,7 +401,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Invite%20User" + "$ref": "#/components/schemas/InviteUserPayload" } } }, @@ -350,11 +409,11 @@ }, "responses": { "201": { - "description": "Inviting user successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Invite" + "$ref": "#/components/schemas/InviteUserResponseModel" } } } @@ -428,7 +487,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/CommonResponseModel" } } } @@ -492,7 +551,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User%20Info%20Response" + "$ref": "#/components/schemas/AuthUserInfoResponseModel" } } } @@ -541,11 +600,11 @@ "operationId": "Get organization info", "responses": { "200": { - "description": "Successfully retrieved organizations info", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Organization%20Model" + "$ref": "#/components/schemas/GetOrganizationResponseModel" } } } @@ -596,7 +655,71 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Remove%20member" + "$ref": "#/components/schemas/RemoveMemberPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveMemberFromOrganizationResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/auth/organizations/update": { + "put": { + "tags": [ + "organization" + ], + "summary": "Update organization info", + "operationId": "Update organization info", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrganizationPayload" } } }, @@ -604,11 +727,11 @@ }, "responses": { "200": { - "description": "The member was removed from your organization", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Remove%20Member%20Response" + "$ref": "#/components/schemas/UpdateOrganizationResponseModel" } } } @@ -662,7 +785,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Permissions" + "$ref": "#/components/schemas/GetPermissionsResponseModel" } } } @@ -712,11 +835,11 @@ "operationId": "List Policies", "responses": { "200": { - "description": "Getting policies success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Policies" + "$ref": "#/components/schemas/GetPoliciesResponseModel" } } } @@ -768,11 +891,11 @@ "operationId": "List RBAC Roles", "responses": { "200": { - "description": "Getting RBAC roles success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBAC%20Roles" + "$ref": "#/components/schemas/GetRbacRolesResponseModel" } } } @@ -821,7 +944,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBAC%20Role%20Payload" + "$ref": "#/components/schemas/CreateUpdateRbacRolePayload" } } }, @@ -829,11 +952,11 @@ }, "responses": { "201": { - "description": "Creating RBAC role success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBAC%20Role" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -903,11 +1026,11 @@ ], "responses": { "200": { - "description": "Getting RBAC role detail success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBAC%20Role" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -976,7 +1099,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBAC%20Role%20Payload" + "$ref": "#/components/schemas/CreateUpdateRbacRolePayload" } } }, @@ -984,11 +1107,11 @@ }, "responses": { "200": { - "description": "RBAC Role updated successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBAC%20Role" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -1056,11 +1179,11 @@ ], "responses": { "200": { - "description": "RBAC Role deleted successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/CommonResponseModel" } } } @@ -1110,6 +1233,7 @@ ] } }, + "/auth/send/welcome-email/{user_id}": {}, "/auth/sendgrid-webhook": {}, "/auth/token": {}, "/auth/users/me/permissions": { @@ -1121,11 +1245,11 @@ "operationId": "List Current User Permissions", "responses": { "200": { - "description": "Getting my permissions successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Permissions%20for%20UserPermission" + "$ref": "#/components/schemas/GetUserPermissionsResponseModel" } } } @@ -1184,11 +1308,11 @@ ], "responses": { "200": { - "description": "Getting user permissions successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Permissions%20for%20UserPermission" + "$ref": "#/components/schemas/GetUserPermissionsResponseModel" } } } @@ -1259,7 +1383,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Assign%20RBAC%20Role%20Payload" + "$ref": "#/components/schemas/AssignRbacRolePayload" } } }, @@ -1267,11 +1391,11 @@ }, "responses": { "200": { - "description": "Assigning RBAC Role success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RBAC%20Role" + "$ref": "#/components/schemas/RbacRoleDetailResponseModel" } } } @@ -1341,11 +1465,11 @@ ], "responses": { "200": { - "description": "RBAC member role deleted successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/CommonResponseModel" } } } @@ -1396,12 +1520,25 @@ } }, "/internal/users/{id}/permissions": {}, + "/core/admin/environments/bootstrap-enviroments": {}, + "/core/admin/flavors": {}, + "/core/admin/flavors/{flavor_id}": {}, + "/core/admin/flavors/{flavor_id}/vms": {}, + "/core/admin/images": {}, + "/core/admin/images/{image_id}": {}, "/core/admin/keypairs": {}, "/core/admin/organizations/{id}/hibernate": {}, "/core/admin/resources": {}, + "/core/admin/resources/count": {}, + "/core/admin/resources/defaults": {}, + "/core/admin/resources/sync": {}, "/core/admin/resources/{id}": {}, + "/core/admin/version": {}, "/core/admin/virtual-machines": {}, + "/core/admin/virtual-machines/delete-expired-contracted-vms": {}, + "/core/admin/virtual-machines/summary": {}, "/core/admin/virtual-machines/{id}": {}, + "/core/admin/virtual-machines/{id}/lock": {}, "/core/admin/virtual-machines/{id}/stop": {}, "/core/admin/virtual-machines/{virtual_machine_id}/events": {}, "/core/admin/virtual-machines/{virtual_machine_id}/hibernate": {}, @@ -1411,8 +1548,9 @@ "tags": [ "compliance" ], - "summary": "Get Compliance List", - "operationId": "Get Compliance List", + "summary": "Retrieve GPU compliance", + "description": "Returns a list of compliance objects each corresponding to available GPU models. These compliance objects contain minimum and maximum values for RAM in GB, number of vCPUs, and system disk capacity in GB. Use the optional `gpu` model parameter in the query string to filter responses by GPU model. For additional details on GPU compliance, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#adhering-to-gpu-compliance).", + "operationId": "Retrieve compliance", "parameters": [ { "name": "gpu", @@ -1423,7 +1561,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Compliance list retrieved successfully.", "content": { "application/json": { "schema": { @@ -1572,7 +1710,7 @@ "tags": [ "compliance" ], - "summary": "Create Compliance", + "summary": "Create compliance", "operationId": "Create Compliance", "requestBody": { "content": { @@ -1739,8 +1877,9 @@ "tags": [ "dashboard" ], - "summary": "Get Instances, Containers and Volumes Overview", - "operationId": "Get Instances, Containers and Volumes Overview", + "summary": "Retrieve Dashboard", + "description": "Returns hardware and pricing overview for your active resources, including virtual machines, containers, and volumes. For additional information on the Dashboard feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/dashboard).", + "operationId": "Retrieve Dashboard", "responses": { "200": { "description": "Getting dashboard info success", @@ -1792,11 +1931,12 @@ "tags": [ "environment" ], - "summary": "List Environments", - "operationId": "List Environments", + "summary": "List environments", + "description": "Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features).", + "operationId": "List environments", "responses": { "200": { - "description": "Getting environments successful", + "description": "Successful retrieval of environments list.", "content": { "application/json": { "schema": { @@ -1843,8 +1983,9 @@ "tags": [ "environment" ], - "summary": "Create Environment", - "operationId": "Create Environment", + "summary": "Create environment", + "description": "Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body.", + "operationId": "Create environment", "requestBody": { "content": { "application/json": { @@ -1857,7 +1998,7 @@ }, "responses": { "200": { - "description": "Environment is created successfully", + "description": "Environment has been created successfully", "content": { "application/json": { "schema": { @@ -1927,8 +2068,9 @@ "tags": [ "environment" ], - "summary": "Get an environment detail", - "operationId": "Get an environment details", + "summary": "Retrieve environment", + "description": "Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.", + "operationId": "Retrieve environment", "parameters": [ { "name": "id", @@ -1941,7 +2083,7 @@ ], "responses": { "200": { - "description": "Getting detail successful", + "description": "Environment details retrieved successfully.", "content": { "application/json": { "schema": { @@ -1998,8 +2140,9 @@ "tags": [ "environment" ], - "summary": "Update Environment", - "operationId": "Update an environment", + "summary": "Update environment", + "description": "Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment.", + "operationId": "Update environment", "parameters": [ { "name": "id", @@ -2022,7 +2165,7 @@ }, "responses": { "200": { - "description": "Update an environment success", + "description": "Environment name successfully updated.", "content": { "application/json": { "schema": { @@ -2080,8 +2223,9 @@ "tags": [ "environment" ], - "summary": "Delete an environment", - "operationId": "Delete an environment", + "summary": "Delete environment", + "description": "Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment.", + "operationId": "Delete environment", "parameters": [ { "name": "id", @@ -2094,7 +2238,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "The environment has been successfully deleted.", "content": { "application/json": { "schema": { @@ -2148,28 +2292,20 @@ ] } }, - "/core/flavors": { + "/core/firewalls": { "get": { "tags": [ - "flavor" - ], - "summary": "Retrieve Flavors", - "operationId": "Retrieve Flavors", - "parameters": [ - { - "name": "region", - "in": "query", - "description": "Region Name", - "schema": {} - } + "firewalls" ], + "summary": "Retrieve Firewalls", + "operationId": "Retrieve Firewalls", "responses": { "200": { - "description": "Getting flavors successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Flavor%20List%20Response" + "$ref": "#/components/schemas/FirewallsListResponse" } } } @@ -2194,8 +2330,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -2217,22 +2353,30 @@ "apiKey": [] } ] - } - }, - "/core/gpus": { - "get": { + }, + "post": { "tags": [ - "gpu" + "firewalls" ], - "summary": "Get GPU List", - "operationId": "Get GPU List", + "summary": "Create Firewall", + "operationId": "Create Firewall", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFirewallPayload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Getting GPU list successful", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GPU%20List" + "$ref": "#/components/schemas/FirewallResponse" } } } @@ -2257,61 +2401,8 @@ } } }, - "500": { - "description": "Internal Server Error", - "content": {} - } - }, - "security": [ - { - "accessToken": [] - }, - { - "apiKey": [] - } - ] - } - }, - "/core/gpus/{id}": {}, - "/core/image-logos": {}, - "/core/images": { - "get": { - "tags": [ - "image" - ], - "summary": "Retrieve Images", - "operationId": "Retrieve Images", - "parameters": [ - { - "name": "region", - "in": "query", - "description": "Region Name", - "schema": {} - } - ], - "responses": { - "200": { - "description": "Getting images successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Images" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "401": { - "description": "Unauthorized", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -2330,8 +2421,8 @@ } } }, - "406": { - "description": "Not Acceptable", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -2352,22 +2443,20 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/core/internal/callbacks/test": {}, - "/core/internal/virtual-machines": {}, - "/core/internal/volumes": {}, - "/core/keypair/{id}": { - "put": { + "/core/firewalls/{firewall_id}/firewall-rules": { + "post": { "tags": [ - "keypair" + "firewalls" ], - "summary": "Update Keypair name", - "operationId": "Update Keypair name", + "summary": "Add Rules to Firewall", + "operationId": "Add Rules to Firewall", "parameters": [ { - "name": "id", + "name": "firewall_id", "in": "path", "required": true, "schema": { @@ -2379,7 +2468,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Update%20Keypair%20Name" + "$ref": "#/components/schemas/Create%20Firewall%20Rule%20Payload" } } }, @@ -2387,11 +2476,11 @@ }, "responses": { "200": { - "description": "Keypair name updated successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Update%20Keypair%20name%20response" + "$ref": "#/components/schemas/Firewall%20Rule" } } } @@ -2416,8 +2505,8 @@ } } }, - "404": { - "description": "Not Found", + "403": { + "description": "Forbidden", "content": { "application/json": { "schema": { @@ -2440,16 +2529,26 @@ } ], "x-codegen-request-body-name": "payload" - }, + } + }, + "/core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id}": { "delete": { "tags": [ - "keypair" + "firewalls" ], - "summary": "Delete Keypair", - "operationId": "Delete Keypair", + "summary": "Delete Firewall Rules from Firewall", + "operationId": "Delete Firewall Rules from Firewall", "parameters": [ { - "name": "id", + "name": "firewall_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "firewall_rule_id", "in": "path", "required": true, "schema": { @@ -2488,8 +2587,28 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "404": { - "description": "Not Found", + "description": "Not Exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -2513,69 +2632,28 @@ ] } }, - "/core/keypairs": { - "get": { + "/core/firewalls/{firewall_id}/update-attachments": { + "post": { "tags": [ - "keypair" + "firewall-attachment" ], - "summary": "Retrieve Keypairs", - "operationId": "Retrieve User Keypairs", - "responses": { - "200": { - "description": "Getting user keypairs successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Keypairs" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": {} - } - }, - "security": [ - { - "accessToken": [] - }, + "summary": "Attach Firewalls to VMs", + "operationId": "Attach Firewall to VMs", + "parameters": [ { - "apiKey": [] + "name": "firewall_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } } - ] - }, - "post": { - "tags": [ - "keypair" ], - "summary": "Import Keypair", - "operationId": "Import Keypair", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Import%20Keypair%20Payload" + "$ref": "#/components/schemas/AttachFirewallWithVM" } } }, @@ -2583,11 +2661,11 @@ }, "responses": { "200": { - "description": "Keypair is imported successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Import%20Keypair%20Response" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -2612,6 +2690,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "404": { "description": "Not Found", "content": { @@ -2648,20 +2736,30 @@ "x-codegen-request-body-name": "payload" } }, - "/core/marketplace/deployments": { + "/core/firewalls/{id}": { "get": { "tags": [ - "deployment" + "firewalls" + ], + "summary": "Details of Firewall by ID", + "operationId": "Details of Firewall by ID", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "List Deployments", - "operationId": "List Deployments", "responses": { "200": { - "description": "Getting deployments success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Deployments" + "$ref": "#/components/schemas/FirewallDetailResponse" } } } @@ -2686,6 +2784,26 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -2700,29 +2818,29 @@ } ] }, - "post": { + "delete": { "tags": [ - "deployment" + "firewalls" ], - "summary": "Start Deployment", - "operationId": "Start Deployment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Start%20Deployment%20Payload" - } + "summary": "Delete Firewall", + "operationId": "Delete Firewall", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "Deployment created successfully", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Start%20Deployment" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -2747,6 +2865,16 @@ } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "404": { "description": "Not Found", "content": { @@ -2779,34 +2907,32 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/core/marketplace/deployments/{id}": { + "/core/flavors": { "get": { "tags": [ - "deployment" + "flavor" ], - "summary": "Details of Deployment by ID", - "operationId": "Details of Deployment by ID", + "summary": "List flavors", + "description": "Returns a list of available virtual machine specification configurations, referred to as **flavors**. Include a `region_name` in the query string of the request to return only the flavors available in the specified region; the default value will retrieve flavors available in all regions. For more details on flavors, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors).", + "operationId": "List flavors", "parameters": [ { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } + "name": "region", + "in": "query", + "description": "Region Name", + "schema": {} } ], "responses": { "200": { - "description": "Getting deployment detail success", + "description": "Successful retrieval of flavors list.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Start%20Deployment" + "$ref": "#/components/schemas/Flavor%20List%20Response" } } } @@ -2854,30 +2980,23 @@ "apiKey": [] } ] - }, - "delete": { + } + }, + "/core/gpus": { + "get": { "tags": [ - "deployment" - ], - "summary": "Delete Deployment", - "operationId": "Delete Deployment", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "gpu" ], + "summary": "List GPUs", + "description": "Returns a list of all available GPUs that can be utilized in the creation of custom virtual machine configurations.", + "operationId": "List GPUs", "responses": { - "202": { - "description": "Success", + "200": { + "description": "Retrieval of GPUs list successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/GPU%20List" } } } @@ -2902,16 +3021,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -2927,28 +3036,31 @@ ] } }, - "/core/marketplace/templates": { + "/core/gpus/{id}": {}, + "/core/image-logos": {}, + "/core/images": { "get": { "tags": [ - "template" + "image" ], - "summary": "List Templates", - "operationId": "List Templates", + "summary": "List images", + "description": "Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. Include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. For more information on OS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images).", + "operationId": "List images", "parameters": [ { - "name": "visibility", + "name": "region", "in": "query", - "description": "visibility: public/private", + "description": "Region Name", "schema": {} } ], "responses": { "200": { - "description": "Getting templates success", + "description": "Retrieval of images list successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Templates" + "$ref": "#/components/schemas/Images" } } } @@ -2973,6 +3085,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "406": { "description": "Not Acceptable", "content": { @@ -2996,54 +3118,46 @@ "apiKey": [] } ] - }, - "post": { + } + }, + "/core/internal/callbacks/test": {}, + "/core/internal/virtual-machines": {}, + "/core/internal/volumes": {}, + "/core/keypair/{id}": { + "put": { "tags": [ - "template" + "keypair" + ], + "summary": "Update key pair name", + "description": "Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body.", + "operationId": "Update key pair name", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "Create Template", - "operationId": "Create Template", "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "required": [ - "content", - "description", - "is_public", - "name" - ], - "properties": { - "name": { - "type": "string", - "description": "name is required" - }, - "description": { - "type": "string", - "description": "description is required" - }, - "is_public": { - "type": "string", - "description": "is_public is required" - }, - "content": { - "type": "string", - "description": "YAML file is required", - "format": "binary" - } - } + "$ref": "#/components/schemas/Update%20Keypair%20Name" } } }, "required": true }, "responses": { - "201": { - "description": "Template added successfully", + "200": { + "description": "Keypair name updated successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Template" + "$ref": "#/components/schemas/Update%20Keypair%20name%20response" } } } @@ -3068,6 +3182,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -3080,16 +3204,16 @@ { "apiKey": [] } - ] - } - }, - "/core/marketplace/templates/{id}": { - "get": { + ], + "x-codegen-request-body-name": "payload" + }, + "delete": { "tags": [ - "template" + "keypair" ], - "summary": "Details of a Template by ID", - "operationId": "Details of a Template by ID", + "summary": "Delete key pair", + "description": "Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair.", + "operationId": "Delete key pair", "parameters": [ { "name": "id", @@ -3102,11 +3226,11 @@ ], "responses": { "200": { - "description": "Getting template detail success", + "description": "Keypair successfully deleted.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Template" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -3154,40 +3278,23 @@ "apiKey": [] } ] - }, - "put": { + } + }, + "/core/keypairs": { + "get": { "tags": [ - "template" - ], - "summary": "Update Template", - "operationId": "Update Template", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "keypair" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Update%20Template" - } - } - }, - "required": true - }, + "summary": "List key pairs", + "description": "Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features).", + "operationId": "List key pairs", "responses": { "200": { - "description": "Template updated successfully", + "description": "Retrieval of key pairs list successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Template" + "$ref": "#/components/schemas/Keypairs" } } } @@ -3212,16 +3319,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -3234,32 +3331,32 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] }, - "delete": { + "post": { "tags": [ - "template" + "keypair" ], - "summary": "Delete a Template", - "operationId": "Delete a Template", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" + "summary": "Import key pair", + "description": "Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key).", + "operationId": "Import key pair", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Import%20Keypair%20Payload" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "Keypair is imported successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Import%20Keypair%20Response" } } } @@ -3294,6 +3391,16 @@ } } }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -3306,23 +3413,24 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/core/profiles": { + "/core/marketplace/deployments": { "get": { "tags": [ - "profile" + "deployment" ], - "summary": "Get Profile List", - "operationId": "Get Profile List", + "summary": "List Deployments", + "operationId": "List Deployments", "responses": { "200": { - "description": "Getting profiles success.", + "description": "Getting deployments success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Profile%20List%20Response" + "$ref": "#/components/schemas/Deployments" } } } @@ -3363,27 +3471,27 @@ }, "post": { "tags": [ - "profile" + "deployment" ], - "summary": "Create a profile", - "operationId": "Create Profile", + "summary": "Start Deployment", + "operationId": "Start Deployment", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Create%20Profile%20Payload" + "$ref": "#/components/schemas/Start%20Deployment%20Payload" } } }, "required": true }, "responses": { - "201": { - "description": "Profile created successfully", + "200": { + "description": "Deployment created successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Create%20Profile%20Response" + "$ref": "#/components/schemas/Start%20Deployment" } } } @@ -3408,6 +3516,16 @@ } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "409": { "description": "Conflict", "content": { @@ -3434,13 +3552,13 @@ "x-codegen-request-body-name": "payload" } }, - "/core/profiles/{id}": { + "/core/marketplace/deployments/{id}": { "get": { "tags": [ - "profile" + "deployment" ], - "summary": "Get a Profile Detail", - "operationId": "Get a Profile Detail", + "summary": "Details of Deployment by ID", + "operationId": "Details of Deployment by ID", "parameters": [ { "name": "id", @@ -3453,11 +3571,11 @@ ], "responses": { "200": { - "description": "Getting profile detail success.", + "description": "Getting deployment detail success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Create%20Profile%20Response" + "$ref": "#/components/schemas/Start%20Deployment" } } } @@ -3508,10 +3626,10 @@ }, "delete": { "tags": [ - "profile" + "deployment" ], - "summary": "Delete Profile", - "operationId": "Delete Profile", + "summary": "Delete Deployment", + "operationId": "Delete Deployment", "parameters": [ { "name": "id", @@ -3523,7 +3641,7 @@ } ], "responses": { - "200": { + "202": { "description": "Success", "content": { "application/json": { @@ -3578,20 +3696,29 @@ ] } }, - "/core/regions": { + "/core/marketplace/templates": { "get": { "tags": [ - "region" + "template" + ], + "summary": "List templates", + "description": "Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#view-a-list-of-templates).", + "operationId": "List templates", + "parameters": [ + { + "name": "visibility", + "in": "query", + "description": "Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.", + "schema": {} + } ], - "summary": "Getting regions", - "operationId": "Getting regions", "responses": { "200": { - "description": "Getting regions successful.", + "description": "Templates list successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Regions" + "$ref": "#/components/schemas/Templates" } } } @@ -3616,6 +3743,16 @@ } } }, + "406": { + "description": "Not Acceptable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -3629,23 +3766,56 @@ "apiKey": [] } ] - } - }, - "/core/regions/{id}": {}, - "/core/sg-rules-protocols": { - "get": { + }, + "post": { "tags": [ - "security-rules" + "template" ], - "summary": "Retrieve Security Rule Protocols", - "operationId": "Retrieve Security Rule Protocols", + "summary": "Create template", + "description": "Creates a resource template for deployment.", + "operationId": "Create template", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "content", + "description", + "is_public", + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "name is required" + }, + "description": { + "type": "string", + "description": "description is required" + }, + "is_public": { + "type": "string", + "description": "is_public is required" + }, + "content": { + "type": "string", + "description": "YAML file is required", + "format": "binary" + } + } + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "Getting security rule protocols successful", + "201": { + "description": "Template added successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Security%20Rules%20Protocol%20Fields" + "$ref": "#/components/schemas/Template" } } } @@ -3685,80 +3855,47 @@ ] } }, - "/core/stocks": { + "/core/marketplace/templates/{id}": { "get": { "tags": [ - "stock" + "template" + ], + "summary": "Retrieve template details", + "description": "Retrieves the resource configuration details for a specified template. Provide the template ID in the path to retrieve details for the specified template. For additional information on template configuration details, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#retrieve-the-details-for-a-template).", + "operationId": "Retrieve template details", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "operationId": "Retrieve Stocks", "responses": { "200": { - "description": "Stocks Retrived Successfully.", + "description": "Template details retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/New%20Stock%20Retrive%20Response" + "$ref": "#/components/schemas/Template" } } } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "404": { - "description": "Stocks Not Found", - "content": {} - }, - "500": { - "description": "Internal Server Error", - "content": {} - } - }, - "security": [ - { - "accessToken": [] - }, - { - "apiKey": [] - } - ] - } - }, - "/core/stocks/details": {}, - "/core/stocks/upcoming": {}, - "/core/stocks/upcoming/{id}": {}, - "/core/stocks/upcoming/{node_id}/stock": {}, - "/core/stocks/upcoming/{node_id}/stock/{stock_id}": {}, - "/core/stocks/visibility": {}, - "/core/stocks/visibility/add-users": {}, - "/core/stocks/visibility/remove-users": {}, - "/core/virtual-machines": { - "get": { - "tags": [ - "virtual machine" - ], - "summary": "List Instances", - "operationId": "List Instances", - "responses": { - "200": { - "description": "Getting instances successful", + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Instances" + "$ref": "#/components/schemas/ErrorResponseModel" } } } }, - "400": { - "description": "Bad Request", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -3767,8 +3904,8 @@ } } }, - "401": { - "description": "Unauthorized", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -3791,17 +3928,28 @@ } ] }, - "post": { + "put": { "tags": [ - "virtual machine" + "template" + ], + "summary": "Update template", + "description": "Updates the details of a template. Modify the template name, description and/or `is_public` status to change the public/private visibility of the template.", + "operationId": "Update template", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "Create Instances", - "operationId": "Create Instances", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Create%20Instances%20Payload" + "$ref": "#/components/schemas/Update%20Template" } } }, @@ -3809,11 +3957,11 @@ }, "responses": { "200": { - "description": "Instances are created successfully", + "description": "Template updated successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Instances" + "$ref": "#/components/schemas/Template" } } } @@ -3848,26 +3996,6 @@ } } }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -3882,15 +4010,14 @@ } ], "x-codegen-request-body-name": "payload" - } - }, - "/core/virtual-machines/{id}": { - "get": { + }, + "delete": { "tags": [ - "virtual machine" + "template" ], - "summary": "Get an instance details", - "operationId": "Get an instance details", + "summary": "Delete template", + "description": "Permanently deletes a template. Supply the template ID in the path to delete the specified template.", + "operationId": "Delete template", "parameters": [ { "name": "id", @@ -3903,11 +4030,11 @@ ], "responses": { "200": { - "description": "Getting instance detail successful", + "description": "Template deleted successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Instance" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -3955,30 +4082,23 @@ "apiKey": [] } ] - }, - "delete": { + } + }, + "/core/profiles": { + "get": { "tags": [ - "virtual machine" - ], - "summary": "Delete an instance", - "operationId": "Delete an instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "profile" ], + "summary": "List profiles", + "description": "Returns a list of your existing provisioning profiles, providing virtual machine configuration details for each. For additional information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles#retrieve-a-list-of-profiles).", + "operationId": "List profiles", "responses": { "200": { - "description": "Success", + "description": "Getting profiles success.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Profile%20List%20Response" } } } @@ -4003,16 +4123,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4026,42 +4136,31 @@ "apiKey": [] } ] - } - }, - "/core/virtual-machines/{id}/attach-callback": { + }, "post": { "tags": [ - "callbacks" - ], - "summary": "Attach a callback to an instance", - "operationId": "Attach a callback to an instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "profile" ], + "summary": "Create profile", + "description": "Creates a provisioning profile to save the configuration of a virtual machine for future use. Include the profile name, description, and virtual machine configuration details in the request body. For more information about virtual machine profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles).", + "operationId": "Create profile", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Payload" + "$ref": "#/components/schemas/Create%20Profile%20Payload" } } }, "required": true }, "responses": { - "200": { - "description": "Callback URL successfully attached to your instance. Any action events on your instance will be posted to the provided URL", + "201": { + "description": "Profile created successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Response" + "$ref": "#/components/schemas/Create%20Profile%20Response" } } } @@ -4086,8 +4185,8 @@ } } }, - "404": { - "description": "Not Found", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -4112,13 +4211,14 @@ "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{id}/attach-floatingip": { - "post": { + "/core/profiles/{id}": { + "get": { "tags": [ - "floating ip" + "profile" ], - "summary": "Attach Floating IP to Instance", - "operationId": "Attach Floating IP to Instance", + "summary": "Retrieve profile details", + "description": "Retrieves details for an existing provisioning profile by supplying the profile ID in the request path. For more information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles).", + "operationId": "Retrieve profile details", "parameters": [ { "name": "id", @@ -4131,17 +4231,17 @@ ], "responses": { "200": { - "description": "Success", + "description": "Profile details retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Create%20Profile%20Response" } } } }, "400": { - "description": "Insufficient balance to create the resource", + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -4183,15 +4283,14 @@ "apiKey": [] } ] - } - }, - "/core/virtual-machines/{id}/delete-callback": { + }, "delete": { "tags": [ - "callbacks" + "profile" ], - "summary": "Delete a callback URL for an instance", - "operationId": "Delete a callback URL for an instance", + "summary": "Delete profile", + "description": "Permanently deletes a provisioning profile. Supply the profile ID in the path to delete the specified profile.", + "operationId": "Delete profile", "parameters": [ { "name": "id", @@ -4204,7 +4303,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Profile deleted successfully.", "content": { "application/json": { "schema": { @@ -4258,30 +4357,21 @@ ] } }, - "/core/virtual-machines/{id}/detach-floatingip": { - "post": { + "/core/regions": { + "get": { "tags": [ - "floating ip" - ], - "summary": "Detach Floating IP to Instance", - "operationId": "Detach Floating IP to Instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "region" ], + "summary": "List regions", + "description": "Lists the currently available regions, each representing a distinct geographic location housing a data center. For additional information on regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions).", + "operationId": "List regions", "responses": { "200": { - "description": "Success", + "description": "Successful retrieval of regions list.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Regions" } } } @@ -4306,16 +4396,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4331,30 +4411,22 @@ ] } }, - "/core/virtual-machines/{id}/hard-reboot": { + "/core/regions/{id}": {}, + "/core/sg-rules-protocols": { "get": { "tags": [ - "virtual machine" - ], - "summary": "Hard Reboot Instance", - "operationId": "Hard Reboot Instance", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "security-rules" ], + "summary": "List firewall rule protocols", + "description": "Returns a list of all available protocols that can be used in the creation of firewall rules for your virtual machines.", + "operationId": "List firewall rule protocols", "responses": { "200": { - "description": "Success", + "description": "Protocols list successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Security%20Rules%20Protocol%20Fields" } } } @@ -4379,16 +4451,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4404,36 +4466,81 @@ ] } }, - "/core/virtual-machines/{id}/request-console": { + "/core/stocks": { "get": { "tags": [ - "vnc url" - ], - "summary": "Request Instance Console", - "operationId": "Request Console", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } + "stock" ], + "description": "Returns information on current and upcoming GPU availability, organized by region and GPU model. For additional information on GPU stocks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/gpu-stock-information).", + "operationId": "Retrieve GPU stocks", "responses": { "200": { - "description": "Please wait a few seconds and visit the below link to access your VNC console URL", + "description": "GPU stocks retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Request%20Console" + "$ref": "#/components/schemas/New%20Stock%20Retrive%20Response" } } } }, - "400": { - "description": "Bad Request", + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Stocks Not Found", + "content": {} + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/stocks/details": {}, + "/core/stocks/upcoming": {}, + "/core/stocks/upcoming/{id}": {}, + "/core/stocks/upcoming/{node_id}/stock": {}, + "/core/stocks/upcoming/{node_id}/stock/{stock_id}": {}, + "/core/stocks/visibility": {}, + "/core/stocks/visibility/add-users": {}, + "/core/stocks/visibility/remove-users": {}, + "/core/user/resources/defaults": { + "get": { + "tags": [ + "user detail choice" + ], + "summary": "Retrieve default flavors and images for user", + "operationId": "Retrieve default flavors and images for user", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDefaultChoicesForUserResponse" + } + } + } + }, + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -4452,8 +4559,8 @@ } } }, - "404": { - "description": "Not Found", + "405": { + "description": "Method Not Allowed", "content": { "application/json": { "schema": { @@ -4477,28 +4584,71 @@ ] } }, - "/core/virtual-machines/{id}/sg-rules": { - "post": { + "/core/virtual-machines": { + "get": { "tags": [ "virtual machine" ], - "summary": "Add Security Rule", - "operationId": "Add Security Rule", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer" + "summary": "List all virtual machines", + "description": "Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first.", + "operationId": "List virtual machines", + "responses": { + "200": { + "description": "Successful retrieval of virtual machine list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Instances" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] } + ] + }, + "post": { + "tags": [ + "virtual machine" ], + "summary": "Create virtual machine", + "description": "Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features).", + "operationId": "Create virtual machine", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Create%20Security%20Rule%20Payload" + "$ref": "#/components/schemas/Create%20Instances%20Payload" } } }, @@ -4506,11 +4656,11 @@ }, "responses": { "200": { - "description": "Security Rule created successfully", + "description": "Virtual machine(s) created successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Security%20Group%20Rule" + "$ref": "#/components/schemas/Instances" } } } @@ -4545,6 +4695,16 @@ } } }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "409": { "description": "Conflict", "content": { @@ -4571,16 +4731,16 @@ "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{id}/start": { + "/core/virtual-machines/contract/{contract_id}/virtual-machines": { "get": { "tags": [ "virtual machine" ], - "summary": "Start Instance", - "operationId": "Start Instance", + "summary": "Retrieve virtual machines associated with a contract", + "operationId": "Retrieve virtual machines associated with a contract", "parameters": [ { - "name": "id", + "name": "contract_id", "in": "path", "required": true, "schema": { @@ -4594,7 +4754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/ContractInstancesResponse" } } } @@ -4619,16 +4779,6 @@ } } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4644,13 +4794,14 @@ ] } }, - "/core/virtual-machines/{id}/stop": { + "/core/virtual-machines/{id}": { "get": { "tags": [ "virtual machine" ], - "summary": "Stop Instance", - "operationId": "Stop Instance", + "summary": "Retrieve virtual machine details", + "description": "Retrieves the details of an existing virtual machine. Supply the virtual machine ID in the path, and Infrahub will return the corresponding Virtual Machine object.", + "operationId": "Retrieve virtual machine details", "parameters": [ { "name": "id", @@ -4663,11 +4814,11 @@ ], "responses": { "200": { - "description": "Success", + "description": "Virtual machine details retrieved successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Instance" } } } @@ -4715,15 +4866,14 @@ "apiKey": [] } ] - } - }, - "/core/virtual-machines/{id}/update-callback": { - "put": { + }, + "delete": { "tags": [ - "callbacks" + "virtual machine" ], - "summary": "Update a callback URL", - "operationId": "Update a callback URL", + "summary": "Delete virtual machine", + "description": "Permanently deletes a virtual machine. Supply the virtual machine ID in the path to delete the specified virtual machine.", + "operationId": "Delete virtual machine", "parameters": [ { "name": "id", @@ -4734,23 +4884,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Payload" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Callback URL successfully updated.", + "description": "Virtual machine deleted successfully.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Response" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -4785,6 +4925,16 @@ } } }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -4797,20 +4947,20 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/core/virtual-machines/{virtual_machine_id}/attach-volumes": { + "/core/virtual-machines/{id}/attach-callback": { "post": { "tags": [ - "volume attachment" + "callbacks" ], - "summary": "Attach Volumes", - "operationId": "Attach Volumes", + "summary": "Attach callback to virtual machine", + "description": "Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine).", + "operationId": "Attach callback to virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -4822,7 +4972,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Volumes%20Payload" + "$ref": "#/components/schemas/Attach%20Callback%20Payload" } } }, @@ -4830,11 +4980,11 @@ }, "responses": { "200": { - "description": "Volumes attaching now.", + "description": "Callback URL successfully attached to your virtual machine. Any action events on your virtual machine will be posted to the provided URL", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Volumes" + "$ref": "#/components/schemas/Attach%20Callback%20Response" } } } @@ -4869,16 +5019,6 @@ } } }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -4895,24 +5035,17 @@ "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{virtual_machine_id}/console/{job_id}": { - "get": { + "/core/virtual-machines/{id}/attach-floatingip": { + "post": { "tags": [ - "vnc url" + "floating ip" ], - "summary": "Get VNC Console Link", - "operationId": "Get VNC Console Link", + "summary": "Attach public IP to virtual machine", + "description": "Initiates the creation of a public IP address and attaches it to an existing virtual machine, making it accessible through the internet. Include the virtual machine ID in the path to attach a public IP to the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip).", + "operationId": "Attach public IP to virtual machine", "parameters": [ { - "name": "virtual_machine_id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "job_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -4922,17 +5055,17 @@ ], "responses": { "200": { - "description": "Get VNC Console Link Success", + "description": "Public IP successfully attached to VM.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VNC%20URL" + "$ref": "#/components/schemas/ResponseModel" } } } }, "400": { - "description": "Bad Request", + "description": "Insufficient balance to create the resource", "content": { "application/json": { "schema": { @@ -4976,16 +5109,17 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/detach-volumes": { - "post": { + "/core/virtual-machines/{id}/delete-callback": { + "delete": { "tags": [ - "volume attachment" + "callbacks" ], - "summary": "Detach Volumes", - "operationId": "Detach Volumes", + "summary": "Delete virtual machine callback", + "description": "Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Delete virtual machine callback", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -4993,23 +5127,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Detach%20Volumes%20Payload" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Volumes detaching now.", + "description": "Virtual machine callback URL successfully deleted.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Detach%20Volumes" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -5044,16 +5168,6 @@ } } }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -5066,34 +5180,34 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/core/virtual-machines/{virtual_machine_id}/events": { - "get": { + "/core/virtual-machines/{id}/detach-floatingip": { + "post": { "tags": [ - "virtual machine events" + "floating ip" ], - "summary": "Fetch all of the instance events", - "operationId": "Fetch all of the instance events", + "summary": "Detach public IP from virtual machine", + "description": "Removes a public IP address from an existing virtual machine, disabling internet accessibility to the VM. Include the virtual machine ID in the path to detach the public IP from the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip).", + "operationId": "Detach public IP from virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { - "type": "string" + "type": "integer" } } ], "responses": { "200": { - "description": "Getting instance events success", + "description": "Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InstanceEvents" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -5143,16 +5257,17 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/hibernate": { + "/core/virtual-machines/{id}/hard-reboot": { "get": { "tags": [ "virtual machine" ], - "summary": "Hibernate Instance", - "operationId": "Hibernate Instance", + "summary": "Hard reboot virtual machine", + "description": "Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine.", + "operationId": "Hard reboot virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5162,7 +5277,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Hard reboot process has been successfully initiated.", "content": { "application/json": { "schema": { @@ -5216,16 +5331,16 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/hibernate-restore": { + "/core/virtual-machines/{id}/request-console": { "get": { "tags": [ - "virtual machine" + "vnc url" ], - "summary": "Restore Instance from Hibernation", - "operationId": "Restore Instance from Hibernation", + "summary": "Request Instance Console", + "operationId": "Request Console", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5235,11 +5350,11 @@ ], "responses": { "200": { - "description": "Success", + "description": "Please wait a few seconds and visit the below link to access your VNC console URL", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Request%20Console" } } } @@ -5289,49 +5404,41 @@ ] } }, - "/core/virtual-machines/{virtual_machine_id}/metrics": { - "get": { + "/core/virtual-machines/{id}/sg-rules": { + "post": { "tags": [ "virtual machine" ], - "summary": "Get instance metrics", - "operationId": "Retrieved metrics successfully", + "summary": "Add firewall rule to virtual machine", + "description": "Creates a firewall rule and associates it with a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/security-rules).", + "operationId": "Add firewall rule to virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { "type": "integer" } - }, - { - "name": "duration", - "in": "query", - "schema": { - "type": "string", - "enum": [ - "1h", - "2h", - "4h", - "6h", - "12h", - "1d", - "3d", - "7d", - "15d", - "30d" - ] - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Create%20Security%20Rule%20Payload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "The firewall rule has been successfully added to the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/Security%20Group%20Rule" } } } @@ -5366,8 +5473,8 @@ } } }, - "406": { - "description": "Not Acceptable", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -5388,19 +5495,21 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/core/virtual-machines/{virtual_machine_id}/resize": { - "post": { + "/core/virtual-machines/{id}/start": { + "get": { "tags": [ "virtual machine" ], - "summary": "Resize Virtual Machine", - "operationId": "Resize Virtual Machine", + "summary": "Start virtual machine", + "description": "Initiates the startup of a virtual machine. Supply the virtual machine ID in the path to initiate the starting of the specified virtual machine.", + "operationId": "Start virtual machine", "parameters": [ { - "name": "virtual_machine_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5408,19 +5517,9 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InstanceResizePayload" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Success", + "description": "Virtual machine started successfully.", "content": { "application/json": { "schema": { @@ -5459,16 +5558,6 @@ } } }, - "405": { - "description": "Method Not Allowed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -5481,28 +5570,20 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id}": { - "delete": { + "/core/virtual-machines/{id}/stop": { + "get": { "tags": [ "virtual machine" ], - "summary": "Delete a security group rule", - "operationId": "Delete a Security Rule", + "summary": "Stop virtual machine", + "description": "Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine.", + "operationId": "Stop virtual machine", "parameters": [ { - "name": "virtual_machine_id", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "sg_rule_id", + "name": "id", "in": "path", "required": true, "schema": { @@ -5512,7 +5593,7 @@ ], "responses": { "200": { - "description": "Success", + "description": "Virtual machine shut down successfully.", "content": { "application/json": { "schema": { @@ -5566,20 +5647,41 @@ ] } }, - "/core/volume-types": { - "get": { + "/core/virtual-machines/{id}/update-callback": { + "put": { "tags": [ - "volume" + "callbacks" + ], + "summary": "Update virtual machine callback", + "description": "Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Update virtual machine callback", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "GET Volume Types", - "operationId": "Get Volume Types", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attach%20Callback%20Payload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Retrieved Volume Types.", + "description": "Virtual machine callback URL successfully updated.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Volume%20Types" + "$ref": "#/components/schemas/Attach%20Callback%20Response" } } } @@ -5604,51 +5706,8 @@ } } }, - "500": { - "description": "Internal Server Error", - "content": {} - } - }, - "security": [ - { - "accessToken": [] - }, - { - "apiKey": [] - } - ] - } - }, - "/core/volumes": { - "get": { - "tags": [ - "volume" - ], - "summary": "List Volumes", - "operationId": "List Volumes", - "responses": { - "200": { - "description": "Getting volumes successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Volumes" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, - "401": { - "description": "Unauthorized", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -5669,19 +5728,33 @@ { "apiKey": [] } - ] - }, + ], + "x-codegen-request-body-name": "payload" + } + }, + "/core/virtual-machines/{virtual_machine_id}/attach-volumes": { "post": { "tags": [ - "volume" + "volume attachment" + ], + "summary": "Attach volumes to virtual machine", + "description": "Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1).", + "operationId": "Attach volumes to virtual machine", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "summary": "Create Volume", - "operationId": "Create Volume", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Create%20Volume%20Payload" + "$ref": "#/components/schemas/Attach%20Volumes%20Payload" } } }, @@ -5689,11 +5762,11 @@ }, "responses": { "200": { - "description": "Volume created successfully", + "description": "Volumes have been successfully attached to the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Volume" + "$ref": "#/components/schemas/Attach%20Volumes" } } } @@ -5738,16 +5811,6 @@ } } }, - "409": { - "description": "Conflict", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponseModel" - } - } - } - }, "500": { "description": "Internal Server Error", "content": {} @@ -5764,16 +5827,24 @@ "x-codegen-request-body-name": "payload" } }, - "/core/volumes/{id}": { - "delete": { + "/core/virtual-machines/{virtual_machine_id}/console/{job_id}": { + "get": { "tags": [ - "volume" + "vnc url" ], - "summary": "Delete Volume", - "operationId": "Delete Volume", + "summary": "Get VNC Console Link", + "operationId": "Get VNC Console Link", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "job_id", "in": "path", "required": true, "schema": { @@ -5783,11 +5854,11 @@ ], "responses": { "200": { - "description": "Success", + "description": "Get VNC Console Link Success", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/VNC%20URL" } } } @@ -5837,16 +5908,17 @@ ] } }, - "/core/volumes/{id}/attach-callback": { + "/core/virtual-machines/{virtual_machine_id}/detach-volumes": { "post": { "tags": [ - "callbacks" + "volume attachment" ], - "summary": "Attach a callback to a volume", - "operationId": "Attach a callback to a volume", + "summary": "Detach volumes from virtual machine", + "description": "Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine.", + "operationId": "Detach volumes from virtual machine", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", "in": "path", "required": true, "schema": { @@ -5858,7 +5930,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Payload" + "$ref": "#/components/schemas/Detach%20Volumes%20Payload" } } }, @@ -5866,11 +5938,11 @@ }, "responses": { "200": { - "description": "Callback URL successfully attached to your volume. Any action events on your volume will be posted to the provided URL", + "description": "Volumes have been successfully detached from the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Response" + "$ref": "#/components/schemas/Detach%20Volumes" } } } @@ -5905,6 +5977,16 @@ } } }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, "500": { "description": "Internal Server Error", "content": {} @@ -5921,30 +6003,31 @@ "x-codegen-request-body-name": "payload" } }, - "/core/volumes/{id}/delete-callback": { - "delete": { + "/core/virtual-machines/{virtual_machine_id}/events": { + "get": { "tags": [ - "callbacks" + "virtual machine events" ], - "summary": "Delete callback URL for a volume", - "operationId": "Delete callback URL for a volume", + "summary": "List virtual machine events", + "description": "Retrieves a list of all events in a virtual machine's history, which records actions performed on the specified virtual machine. Include the virtual machine ID in the path to retrieve the history of events. For more details on virtual machine events history, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#events-history).", + "operationId": "List virtual machine events", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", "in": "path", "required": true, "schema": { - "type": "integer" + "type": "string" } } ], "responses": { "200": { - "description": "Success", + "description": "Virtual machines event list successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResponseModel" + "$ref": "#/components/schemas/InstanceEvents" } } } @@ -5994,16 +6077,17 @@ ] } }, - "/core/volumes/{id}/update-callback": { - "put": { + "/core/virtual-machines/{virtual_machine_id}/hibernate": { + "get": { "tags": [ - "callbacks" + "virtual machine" ], - "summary": "Update callback URL for volume", - "operationId": "Update callback URL for volume", + "summary": "Hibernate virtual machine", + "description": "Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated.", + "operationId": "Hibernate virtual machine", "parameters": [ { - "name": "id", + "name": "virtual_machine_id", "in": "path", "required": true, "schema": { @@ -6011,23 +6095,13 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Payload" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Callback URL successfully updated.", + "description": "Hibernation request for the virtual machine was successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Attach%20Callback%20Response" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6074,26 +6148,34 @@ { "apiKey": [] } - ], - "x-codegen-request-body-name": "payload" + ] } }, - "/pricebook": { + "/core/virtual-machines/{virtual_machine_id}/hibernate-restore": { "get": { "tags": [ - "Pricebook" + "virtual machine" + ], + "summary": "Restore virtual machine from hibernation", + "description": "Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation.", + "operationId": "Restore virtual machine from hibernation", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } ], - "operationId": "Retrive Pricebook", "responses": { "200": { - "description": "Success", + "description": "The request to restore the virtual machine from hibernation was successful.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Pricebook%20Model" - } + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6118,8 +6200,8 @@ } } }, - "405": { - "description": "Method Not Allowed", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6143,45 +6225,40 @@ ] } }, - "/pricebook/calculate": {}, - "/pricebook/calculate/{id}": {}, - "/pricebook/discounts/flat-per-resource": {}, - "/pricebook/discounts/flat-per-resource/{org_id}": {}, - "/pricebook/discounts/flat-per-resource/{org_id}/update-status": {}, - "/billing/admin/add_organization": {}, - "/billing/admin/credit/{organization_id}": {}, - "/billing/admin/recharge_history/{organization_id}": {}, - "/billing/admin/threshold/{organization_id}": {}, - "/billing/admin/usage/{organization_id}": {}, - "/billing/alive": { - "get": { + "/core/virtual-machines/{virtual_machine_id}/label": { + "put": { "tags": [ - "alive" + "virtual machine" ], - "summary": "GET: Alive", - "operationId": "get_alive", - "responses": { - "200": { - "description": "Success", - "content": {} + "summary": "Edit labels of an existing VM", + "operationId": "Edit labels of an existing VM", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } } - } - } - }, - "/billing/billing/last-day-cost": { - "get": { - "tags": [ - "billing" ], - "summary": "GET: Last Day Cost", - "operationId": "get_last_day_cost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edit%20label%20of%20an%20existing%20VM%20Payload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "Labels edited successfully", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Last%20day%20cost%20response" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6206,8 +6283,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6216,8 +6293,8 @@ } } }, - "404": { - "description": "Not Found", + "409": { + "description": "Conflict", "content": { "application/json": { "schema": { @@ -6238,23 +6315,54 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/billing/billing/usage": { + "/core/virtual-machines/{virtual_machine_id}/metrics": { "get": { "tags": [ - "billing" + "virtual machine" + ], + "summary": "Retrieve virtual machine performance metrics", + "description": "Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics).", + "operationId": "Retrieve virtual machine performance metrics", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "duration", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "1h", + "2h", + "4h", + "6h", + "12h", + "1d", + "3d", + "7d", + "15d", + "30d" + ] + } + } ], - "summary": "GET: Billing usage", - "operationId": "get_usage", "responses": { "200": { - "description": "Success", + "description": "Virtual machine performance metrics have been successfully retrieved.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Billing%20metrices%20response" + "$ref": "#/components/schemas/MetricsFields" } } } @@ -6279,8 +6387,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6289,8 +6397,8 @@ } } }, - "404": { - "description": "Not Found", + "406": { + "description": "Not Acceptable", "content": { "application/json": { "schema": { @@ -6314,20 +6422,41 @@ ] } }, - "/billing/payment/payment-details": { - "get": { + "/core/virtual-machines/{virtual_machine_id}/resize": { + "post": { "tags": [ - "payment" + "virtual machine" ], - "summary": "GET: View payment details", - "operationId": "get_details", + "summary": "Resize virtual machine", + "description": "Updates the configuration specifications for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine).", + "operationId": "Resize virtual machine", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InstanceResizePayload" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "Success", + "description": "The resizing of the virtual machine configuration was successful.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Payment%20Details%20Response" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6352,8 +6481,8 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", "content": { "application/json": { "schema": { @@ -6362,8 +6491,8 @@ } } }, - "404": { - "description": "Not Found", + "405": { + "description": "Method Not Allowed", "content": { "application/json": { "schema": { @@ -6384,33 +6513,43 @@ { "apiKey": [] } - ] + ], + "x-codegen-request-body-name": "payload" } }, - "/billing/payment/payment-initiate": { - "post": { + "/core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id}": { + "delete": { "tags": [ - "payment" + "virtual machine" ], - "summary": "POST: Initiate payment", - "operationId": "post_payment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Payment%20Initiate%20Payload" - } + "summary": "Delete firewall rule from virtual machine", + "description": "Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine.", + "operationId": "Delete firewall rule from virtual machine", + "parameters": [ + { + "name": "virtual_machine_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" } }, - "required": true - }, + { + "name": "sg_rule_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { - "description": "Success", + "description": "The firewall rule has been successfully removed from the virtual machine.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Payment%20Initiate%20Response" + "$ref": "#/components/schemas/ResponseModel" } } } @@ -6435,8 +6574,82 @@ } } }, - "403": { - "description": "Forbidden", + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/virtual-machines/{vm_id}/attach-firewalls": { + "post": { + "tags": [ + "virtual machine" + ], + "summary": "Attach Firewalls to a VM", + "description": "Attach Firewalls to a VM", + "operationId": "Attach Firewalls to a VM", + "parameters": [ + { + "name": "vm_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachFirewallsToVMPayload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6471,20 +6684,21 @@ "x-codegen-request-body-name": "payload" } }, - "/billing/user-credit/credit": { + "/core/volume-types": { "get": { "tags": [ - "credit" + "volume" ], - "summary": "GET: View credit and threshold", - "operationId": "Check balance as an organization", + "summary": "List volume types", + "description": "Retrieves a list of available volume types that can be used in the creation of a new volume.", + "operationId": "List volume types", "responses": { "200": { - "description": "Success", + "description": "Successful retrieval of volume types list", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Get%20credit%20and%20threshold%20info%20in%20response" + "$ref": "#/components/schemas/Volume%20Types" } } } @@ -6509,8 +6723,42 @@ } } }, - "403": { - "description": "Forbidden", + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/volumes": { + "get": { + "tags": [ + "volume" + ], + "summary": "List volumes", + "description": "Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).", + "operationId": "List volumes", + "responses": { + "200": { + "description": "Successful retrieval of volumes list.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Volumes" + } + } + } + }, + "400": { + "description": "Bad Request", "content": { "application/json": { "schema": { @@ -6519,8 +6767,8 @@ } } }, - "404": { - "description": "Not Found", + "401": { + "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -6542,144 +6790,3278 @@ "apiKey": [] } ] - } - } - }, - "components": { - "schemas": { - "Request Login Response": { - "type": "object", - "properties": { - "status": { - "type": "boolean" + }, + "post": { + "tags": [ + "volume" + ], + "summary": "Create volume", + "description": "Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features).", + "operationId": "Create volume", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Create%20Volume%20Payload" + } + } }, - "message": { - "type": "string" + "required": true + }, + "responses": { + "200": { + "description": "Volume successfully created.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Volume" + } + } + } }, - "data": { - "$ref": "#/components/schemas/Request Login Data Response" - } - } - }, - "Request Login Data Response": { - "type": "object", - "properties": { - "authorization_url": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } }, - "session_id": { - "type": "string" - } - } - }, - "ErrorResponseModel": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "default": false + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } }, - "message": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } }, - "error_reason": { - "type": "string" + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} } - } - }, - "Get Token": { - "required": [ - "callback_code", - "session_id" - ], - "type": "object", - "properties": { - "session_id": { - "type": "string" + }, + "security": [ + { + "accessToken": [] }, - "callback_code": { + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/core/volumes/{id}": { + "delete": { + "tags": [ + "volume" + ], + "summary": "Delete volume", + "description": "Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted.", + "operationId": "Delete volume", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Volume successfully deleted.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/volumes/{id}/attach-callback": { + "post": { + "tags": [ + "callbacks" + ], + "summary": "Attach callback to volume", + "description": "Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Attach callback to volume", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attach%20Callback%20Payload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Callback URL successfully attached to your volume. Any action events on your volume will be posted to the provided URL", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attach%20Callback%20Response" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/core/volumes/{id}/delete-callback": { + "delete": { + "tags": [ + "callbacks" + ], + "summary": "Delete volume callback", + "description": "Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Delete volume callback", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Volume callback URL successfully deleted.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/core/volumes/{id}/update-callback": { + "put": { + "tags": [ + "callbacks" + ], + "summary": "Update volume callback", + "description": "Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).", + "operationId": "Update volume callback", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attach%20Callback%20Payload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Callback URL successfully updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Attach%20Callback%20Response" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/pricebook": { + "get": { + "tags": [ + "Pricebook" + ], + "operationId": "Retrive Pricebook", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PricebookModel" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/pricebook/admin/contracts": {}, + "/pricebook/admin/contracts/check-expire-delete-vms": {}, + "/pricebook/admin/contracts/{contract_id}": {}, + "/pricebook/admin/contracts/{contract_id}/events": {}, + "/pricebook/admin/version": {}, + "/pricebook/calculate": {}, + "/pricebook/calculate/{id}": {}, + "/pricebook/contracts": { + "get": { + "tags": [ + "Customer Contract" + ], + "summary": "List Contracts for Customer", + "operationId": "List Contracts for Customer", + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCustomerContractsListResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/pricebook/contracts/{contract_id}": { + "get": { + "tags": [ + "Customer Contract" + ], + "summary": "Details of Contract by ID for Customer", + "operationId": "Details of Contract by ID for Customer", + "parameters": [ + { + "name": "contract_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerContractDetailResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "405": { + "description": "Method Not Allowed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/pricebook/discounts/entities": {}, + "/pricebook/discounts/entities/{plan_type}/{entity_id}": {}, + "/pricebook/discounts/entities/{plan_type}/{entity_id}/update-status": {}, + "/pricebook/discounts/flat-per-resource": {}, + "/pricebook/discounts/flat-per-resource/{customer_id}": {}, + "/billing/admin/add_organization": {}, + "/billing/admin/billing/info/{organization_id}": {}, + "/billing/admin/credit/{organization_id}": {}, + "/billing/admin/exclude": {}, + "/billing/admin/payment_history/{organization_id}": {}, + "/billing/admin/recharge_history/{organization_id}": {}, + "/billing/admin/threshold/{organization_id}": {}, + "/billing/admin/usage/{organization_id}": {}, + "/billing/admin/version": {}, + "/billing/alive": { + "get": { + "tags": [ + "alive" + ], + "summary": "GET: Alive", + "operationId": "get_alive", + "responses": { + "200": { + "description": "Success", + "content": {} + } + } + } + }, + "/billing/billing/last-day-cost": { + "get": { + "tags": [ + "billing" + ], + "summary": "GET: Last Day Cost", + "operationId": "get_last_day_cost", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Last%20day%20cost%20response" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/billing/usage": { + "get": { + "tags": [ + "billing" + ], + "summary": "GET: Billing usage", + "operationId": "get_usage", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Billing%20metrices%20response" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/payment/payment-details": { + "get": { + "tags": [ + "payment" + ], + "summary": "GET: View payment details", + "operationId": "get_details", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment%20Details%20Response" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/payment/payment-initiate": { + "post": { + "tags": [ + "payment" + ], + "summary": "POST: Initiate payment", + "operationId": "post_payment", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment%20Initiate%20Payload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payment%20Initiate%20Response" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + }, + "/billing/user-credit/credit": { + "get": { + "tags": [ + "credit" + ], + "summary": "GET: View credit and threshold", + "operationId": "Check balance as an organization", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Get%20credit%20and%20threshold%20info%20in%20response" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + } + }, + "/billing/user/info": { + "get": { + "tags": [ + "user" + ], + "summary": "GET: Fetch User Info", + "operationId": "get_user", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsersInfoListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ] + }, + "put": { + "tags": [ + "user" + ], + "summary": "PUT: Update user info", + "operationId": "Update user info", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User%20info%20post%20payload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserInfoSuccessResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + }, + "post": { + "tags": [ + "user" + ], + "summary": "POST: Insert user info", + "operationId": "post_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User%20info%20post%20payload" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserInfoSuccessResponseModel" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponseModel" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": {} + } + }, + "security": [ + { + "accessToken": [] + }, + { + "apiKey": [] + } + ], + "x-codegen-request-body-name": "payload" + } + } + }, + "components": { + "schemas": { + "AuthRequestLoginResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/AuthRequestLoginFields" + } + } + }, + "AuthRequestLoginFields": { + "type": "object", + "properties": { + "authorization_url": { + "type": "string" + }, + "session_id": { + "type": "string" + } + } + }, + "ErrorResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + }, + "error_reason": { + "type": "string" + } + } + }, + "GetTokenPayload": { + "required": [ + "callback_code", + "session_id" + ], + "type": "object", + "properties": { + "session_id": { + "type": "string" + }, + "callback_code": { + "type": "string" + } + } + }, + "AuthGetTokenResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "token": { + "$ref": "#/components/schemas/TokenFields" + }, + "first_login": { + "type": "boolean" + } + } + }, + "TokenFields": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "id_token": { + "type": "string" + }, + "refresh_token": { + "type": "string" + } + } + }, + "RefreshTokenPayload": { + "required": [ + "id_token", + "refresh_token" + ], + "type": "object", + "properties": { + "id_token": { + "type": "string" + }, + "refresh_token": { + "type": "string" + } + } + }, + "LogoutPayload": { + "required": [ + "refresh_token" + ], + "type": "object", + "properties": { + "refresh_token": { + "type": "string" + } + } + }, + "AuthUserInfoResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/AuthUserFields" + } + } + }, + "AuthUserFields": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "username": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "CommonResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "GetOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organization": { + "$ref": "#/components/schemas/OrganizationFields" + } + } + }, + "OrganizationFields": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "credit": { + "type": "integer" + }, + "threshold": { + "type": "integer" + }, + "total_instances": { + "type": "integer" + }, + "total_volumes": { + "type": "integer" + }, + "total_containers": { + "type": "integer" + }, + "total_clusters": { + "type": "integer" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationUserResponseModel" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "OrganizationUserResponseModel": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "sub": { + "type": "string" + }, + "email": { + "type": "string" + }, + "username": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role": { + "type": "string" + }, + "rbac_roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RbacRoleField" + } + }, + "joined_at": { + "type": "string", + "format": "date-time" + }, + "last_login": { + "type": "string", + "format": "date-time" + } + } + }, + "RbacRoleField": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "UpdateOrganizationPayload": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "UpdateOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "RemoveMemberPayload": { + "required": [ + "email" + ], + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "RemoveMemberFromOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "GetApiKeyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "api_key": { + "$ref": "#/components/schemas/ApiKeyFields" + } + } + }, + "ApiKeyFields": { + "type": "object", + "properties": { + "key": { + "type": "string" + } + } + }, + "GenerateApiKeyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "api_key": { + "type": "string" + } + } + }, + "VerifyApiKeyPayload": { + "type": "object", + "properties": { + "api_key": { + "type": "string" + } + } + }, + "VerifyApiKeyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "api_key": { + "$ref": "#/components/schemas/ApiKeyVerifyFields" + } + } + }, + "ApiKeyVerifyFields": { + "type": "object", + "properties": { + "user_id": { + "type": "integer" + }, + "org_id": { + "type": "integer" + }, + "user_role": { + "type": "string" + }, + "sub": { + "type": "string" + } + } + }, + "InviteUserPayload": { + "required": [ + "email" + ], + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + }, + "GetInvitesResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "invites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteFields" + } + } + } + }, + "InviteFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "status": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "InviteUserResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "invite": { + "$ref": "#/components/schemas/InviteFields" + } + } + }, + "CreateUpdatePermissionPayload": { + "required": [ + "endpoint", + "method", + "permission", + "resource" + ], + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "method": { + "type": "string" + }, + "endpoint": { + "type": "string" + } + } + }, + "GetPermissionsResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionFields" + } + } + } + }, + "PermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + }, + "method": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "CreateUpdatePermissionResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "permission": { + "$ref": "#/components/schemas/PermissionFields" + } + } + }, + "GetUserPermissionsResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserPermissionFields" + } + } + } + }, + "UserPermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + } + } + }, + "CreateUpdatePolicyPayload": { + "required": [ + "description", + "is_public", + "name", + "permissions" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "is_public": { + "type": "boolean" + }, + "permissions": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "GetPoliciesResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PolicyFields" + } + } + } + }, + "PolicyFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PolicyPermissionFields" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "PolicyPermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + } + } + }, + "CreateUpdatePolicyResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "policy": { + "$ref": "#/components/schemas/PolicyFields" + } + } + }, + "CreateUpdateRbacRolePayload": { + "required": [ + "description", + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "policies": { + "type": "array", + "items": { + "type": "integer" + } + }, + "permissions": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "GetRbacRolesResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RbacRoleFields" + } + } + } + }, + "RbacRoleFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "policies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RolePolicyFields" + } + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RolePermissionFields" + } + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "RolePolicyFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "RolePermissionFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "resource": { + "type": "string" + }, + "permission": { + "type": "string" + } + } + }, + "RbacRoleDetailResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "role": { + "$ref": "#/components/schemas/RbacRoleFields" + } + } + }, + "AssignRbacRolePayload": { + "required": [ + "role_id" + ], + "type": "object", + "properties": { + "role_id": { + "type": "integer" + } + } + }, + "AdminOrganizationsResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrganizationFields" + } + }, + "organization_count": { + "type": "integer" + } + } + }, + "AdminOrganizationsSummaryResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminOrganizationSummaryFields" + } + } + } + }, + "AdminOrganizationSummaryFields": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "AdminOrganizationResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organizations": { + "$ref": "#/components/schemas/OrganizationFields" + } + } + }, + "AdminVersionResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "AdminHibernationRestorationPayloadModel": { + "required": [ + "org_id", + "status", + "vm_id", + "vm_name" + ], + "type": "object", + "properties": { + "org_id": { + "type": "integer" + }, + "vm_name": { + "type": "string" + }, + "vm_id": { + "type": "integer" + }, + "status": { + "type": "string" + } + } + }, + "UserTransferPayload": { + "required": [ + "org_id", + "role" + ], + "type": "object", + "properties": { + "org_id": { + "type": "integer" + }, + "role": { + "type": "string" + } + } + }, + "AdminUsersResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminUserFields" + } + } + } + }, + "AdminUserFields": { + "required": [ + "email", + "id", + "org_id", + "org_name", + "username" + ], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "org_id": { + "type": "integer" + }, + "org_name": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "last_login": { + "type": "string", + "format": "date-time" + } + } + }, + "AdminUserResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/AdminUserFields" + } + } + }, + "Dashboard Info Response": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "overview": { + "$ref": "#/components/schemas/Overview Info" + } + } + }, + "Overview Info": { + "type": "object", + "properties": { + "instance": { + "$ref": "#/components/schemas/Instance Overview Fields" + }, + "container": { + "$ref": "#/components/schemas/Container Overview Fields" + }, + "volume": { + "$ref": "#/components/schemas/Volume Overview Fields" + } + } + }, + "Instance Overview Fields": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "vcpus": { + "type": "integer" + }, + "gpus": { + "type": "integer" + }, + "ram": { + "type": "integer" + }, + "cost_per_hour": { + "type": "number" + } + } + }, + "Container Overview Fields": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "vcpus": { + "type": "integer" + }, + "gpus": { + "type": "integer" + }, + "ram": { + "type": "integer" + }, + "cost_per_hour": { + "type": "number" + } + } + }, + "Volume Overview Fields": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "using": { + "type": "integer" + }, + "cost_per_hour": { + "type": "number" + } + } + }, + "New Stock Retrive Response": { + "type": "object", + "properties": { + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/New Stock Response" + } + } + } + }, + "New Stock Response": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "stock-type": { + "type": "string" + }, + "models": { + "type": "array", + "items": { + "$ref": "#/components/schemas/New Model Response" + } + } + } + }, + "New Model Response": { + "type": "object", + "properties": { + "model": { + "type": "string" + }, + "available": { + "type": "string" + }, + "planned_7_days": { + "type": "string" + }, + "planned_30_days": { + "type": "string" + }, + "planned_100_days": { + "type": "string" + }, + "configurations": { + "$ref": "#/components/schemas/New Configurations Response" + } + } + }, + "New Configurations Response": { + "type": "object", + "properties": { + "1x": { + "type": "integer" + }, + "2x": { + "type": "integer" + }, + "4x": { + "type": "integer" + }, + "8x": { + "type": "integer" + }, + "10x": { + "type": "integer" + } + } + }, + "Stock Visibility User List Response": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Single Visibility User Response" + } + } + } + }, + "Single Visibility User Response": { + "required": [ + "id", + "stock_visible", + "user_id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "user_id": { + "type": "integer" + }, + "stock_visible": { + "type": "boolean" + } + } + }, + "Stock Visibility User Payload": { + "required": [ + "user_ids" + ], + "type": "object", + "properties": { + "user_ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "ResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "Node Stock Payload Model": { + "type": "object", + "properties": { + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node Payload Model" + } + } + } + }, + "Node Payload Model": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node Power Usage Model" + } + } + } + }, + "Node Power Usage Model": { + "required": [ + "openstack_id" + ], + "type": "object", + "properties": { + "openstack_id": { + "type": "string" + }, + "openstack_name": { + "type": "string" + }, + "nexgen_name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "provision_date": { + "type": "string", + "format": "date-time" + }, + "sunset_date": { + "type": "string", + "format": "date-time" + }, + "flavors": { + "type": "array", + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "items": { + "type": "string" + } + }, + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node Stocks Payload" + } + }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } + }, + "power_usages": { + "$ref": "#/components/schemas/Power Usage Model" + } + } + }, + "Node Stocks Payload": { + "required": [ + "in_use", + "total", + "type" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "total": { + "type": "integer" + }, + "in_use": { + "type": "integer" + } + } + }, + "Power Usage Model": { + "required": [ + "unit", + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "number" + }, + "unit": { + "type": "string" + } + } + }, + "Node Stock Response Model": { + "type": "object", + "properties": { + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node Response Model" + } + } + } + }, + "Node Response Model": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node Model" + } + } + } + }, + "Node Model": { + "required": [ + "openstack_id" + ], + "type": "object", + "properties": { + "openstack_id": { + "type": "string" + }, + "openstack_name": { + "type": "string" + }, + "nexgen_name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "provision_date": { + "type": "string", + "format": "date-time" + }, + "sunset_date": { + "type": "string", + "format": "date-time" + }, + "flavors": { + "type": "array", + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "items": { + "type": "string" + } + }, + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node Stocks Payload" + } + }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "Future Nodes Stock Model": { + "type": "object", + "properties": { + "future_stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Future Node Response Model" + } + } + } + }, + "Future Node Response Model": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Future Node Model" + } + } + } + }, + "Future Node Model": { + "required": [ + "expected_provision_date" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true + }, + "openstack_name": { + "type": "string" + }, + "nexgen_name": { + "type": "string" + }, + "expected_provision_date": { + "type": "string", + "description": "Date and time in the format YYYY-MM-DD HH:mm:ss", + "format": "date-time" + }, + "stocks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Future Node Stock Model" + } + } + } + }, + "Future Node Stock Model": { + "required": [ + "expected_amount" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true + }, + "name": { + "type": "string" + }, + "expected_amount": { + "type": "integer" + } + } + }, + "New Stock Update Response Model": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + } + } + }, + "Future Node Update Model": { + "required": [ + "expected_provision_date", + "nexgen_name", + "openstack_name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "readOnly": true + }, + "region_id": { + "type": "integer" + }, + "openstack_name": { + "type": "string" + }, + "nexgen_name": { + "type": "string" + }, + "expected_provision_date": { + "type": "string", + "format": "date-time" + } + } + }, + "Create Environment": { + "required": [ + "name", + "region" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the environment being created." + }, + "region": { + "type": "string", + "description": "The geographic location of the data center where the environment is being created. To learn more about regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions)." + } + } + }, + "Environment": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "environment": { + "$ref": "#/components/schemas/Environment Fields" + } + } + }, + "Environment Fields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "Environments": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "environments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Environment Fields" + } + } + } + }, + "Update Environment": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "type": "string", + "description": "The new name of the environment." + } + } + }, + "InstanceEvents": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "instance_events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceEventsFields" + } + } + } + }, + "InstanceEventsFields": { + "type": "object", + "properties": { + "instance_id": { + "type": "integer" + }, + "user_id": { + "type": "integer" + }, + "org_id": { + "type": "integer" + }, + "time": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "object": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "Create Instances Payload": { + "required": [ + "count", + "environment_name", + "flavor_name", + "key_name", + "name" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the virtual machine being created." + }, + "environment_name": { + "type": "string", + "description": "The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) in which the virtual machine is to be created." + }, + "image_name": { + "type": "string", + "description": "The [operating system (OS) image](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images) name designated for installation on the virtual machine." + }, + "volume_name": { + "type": "string", + "description": "The names of the volume(s) to be attached to the virtual machine being created." + }, + "create_bootable_volume": { + "type": "boolean", + "description": "Indicates whether to create a bootable volume for the virtual machine. When set to `true`, a bootable volume will be created; the default value is `false`." + }, + "flavor_name": { + "type": "string", + "description": "The name of the GPU hardware configuration ([flavor](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors)) for the virtual machines being created." + }, + "flavor": { + "$ref": "#/components/schemas/Flavor Object Fields" + }, + "key_name": { + "type": "string", + "description": "The name of the existing SSH key pair to be used for secure access to the virtual machine. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair)." + }, + "user_data": { + "type": "string", + "description": "Optional initialization configuration commands to manage the configuration of a virtual machine at launch using cloud-init scripts. For more information about custom VM configuration using cloud-init, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/initialization-configuration)." + }, + "callback_url": { + "maxLength": 250, + "type": "string", + "description": "An optional URL where actions performed on the virtual machine will be sent. For additional information on event callbacks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks)." + }, + "assign_floating_ip": { + "type": "boolean", + "description": "When this field is set to `true`, it attaches a [public IP address](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip) to the virtual machine, enabling internet accessibility." + }, + "security_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Create Security Rule Payload" + } + }, + "profile": { + "$ref": "#/components/schemas/Profile Object Fields" + }, + "count": { + "type": "integer", + "description": "The number of virtual machines to be created." + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Flavor Object Fields": { + "type": "object", + "properties": { + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { + "type": "string" + }, + "gpu_count": { + "type": "integer" + } + } + }, + "Create Security Rule Payload": { + "required": [ + "direction", + "ethertype", + "protocol", + "remote_ip_prefix" + ], + "type": "object", + "properties": { + "direction": { + "type": "string", + "description": "The direction of traffic that the firewall rule applies to." + }, + "protocol": { + "type": "string", + "description": "The network protocol associated with the rule. Call the [`GET /core/sg-rules-protocols`](https://infrahub-api-doc.nexgencloud.com/#get-/core/sg-rules-protocols) endpoint to retrieve a list of permitted network protocols.", + "example": "any", + "enum": [ + "any", + "ah", + "dccp", + "egp", + "esp", + "gre", + "hopopt", + "icmp", + "igmp", + "ip", + "ipip", + "ipv6-encap", + "ipv6-frag", + "ipv6-icmp", + "icmpv6", + "ipv6-nonxt", + "ipv6-opts", + "ipv6-route", + "ospf", + "pgm", + "rsvp", + "sctp", + "tcp", + "udp", + "udplite", + "vrrp" + ] + }, + "ethertype": { + "type": "string", + "description": "The Ethernet type associated with the rule." + }, + "remote_ip_prefix": { + "type": "string", + "description": "The IP address range that is allowed to access the specified port. Use \"0.0.0.0/0\" to allow any IP address." + } + } + }, + "Profile Object Fields": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "Instances": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instance Fields" + } + } + } + }, + "Instance Fields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "environment": { + "$ref": "#/components/schemas/Instance Environment Fields" + }, + "image": { + "$ref": "#/components/schemas/Instance Image Fields" + }, + "flavor": { + "$ref": "#/components/schemas/Instance Flavor Fields" + }, + "os": { + "type": "string" + }, + "keypair": { + "$ref": "#/components/schemas/Instance Keypair Fields" + }, + "volume_attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Volume Attachment Fields" + } + }, + "security_rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Security Rules Fields for Instance" + } + }, + "power_state": { + "type": "string" + }, + "vm_state": { + "type": "string" + }, + "fixed_ip": { + "type": "string" + }, + "floating_ip": { + "type": "string" + }, + "floating_ip_status": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "contract_id": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Instance Environment Fields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "org_id": { + "type": "integer" + }, + "region": { + "type": "string" + } + } + }, + "Instance Image Fields": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "Instance Flavor Fields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "cpu": { + "type": "integer" + }, + "ram": { + "type": "integer" + }, + "disk": { + "type": "integer" + }, + "ephemeral": { + "type": "integer" + }, + "gpu": { + "type": "string" + }, + "gpu_count": { + "type": "integer" + } + } + }, + "Instance Keypair Fields": { + "type": "object", + "properties": { + "name": { "type": "string" } } }, - "Get Token Response": { + "Volume Attachment Fields": { "type": "object", "properties": { + "volume": { + "$ref": "#/components/schemas/Volume Fields for Instance" + }, "status": { - "type": "boolean" + "type": "string" }, - "message": { + "device": { "type": "string" }, - "token": { - "$ref": "#/components/schemas/Token Fields" + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Token Fields": { + "Volume Fields for Instance": { "type": "object", "properties": { - "access_token": { - "type": "string" + "id": { + "type": "integer" }, - "id_token": { + "name": { "type": "string" }, - "refresh_token": { - "type": "string" - } - } - }, - "Refresh Token": { - "required": [ - "id_token", - "refresh_token" - ], - "type": "object", - "properties": { - "id_token": { + "description": { "type": "string" }, - "refresh_token": { + "volume_type": { "type": "string" + }, + "size": { + "type": "integer" } } }, - "Logout": { - "required": [ - "refresh_token" - ], + "Security Rules Fields for Instance": { "type": "object", "properties": { - "refresh_token": { + "id": { + "type": "integer" + }, + "direction": { "type": "string" - } - } - }, - "User Info Response": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "protocol": { "type": "string" }, - "user": { - "$ref": "#/components/schemas/User Fields" - } - } - }, - "User Fields": { - "type": "object", - "properties": { - "email": { + "port_range_min": { + "type": "integer" + }, + "port_range_max": { + "type": "integer" + }, + "ethertype": { "type": "string" }, - "name": { + "remote_ip_prefix": { "type": "string" }, - "username": { + "status": { "type": "string" }, "created_at": { @@ -6688,7 +10070,7 @@ } } }, - "Organization Model": { + "Instance": { "type": "object", "properties": { "status": { @@ -6697,122 +10079,145 @@ "message": { "type": "string" }, - "organization": { - "$ref": "#/components/schemas/Organization Info Model" + "instance": { + "$ref": "#/components/schemas/Instance Fields" } } }, - "Organization Info Model": { - "required": [ - "id", - "name" - ], + "Security Group Rule": { "type": "object", "properties": { - "id": { - "type": "integer" + "status": { + "type": "boolean" }, - "name": { + "message": { "type": "string" }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Organization User Model" - } - }, - "created_at": { - "type": "string", - "format": "date-time" + "security_rule": { + "$ref": "#/components/schemas/Security Group Rule Fields" } } }, - "Organization User Model": { + "Security Group Rule Fields": { "type": "object", "properties": { "id": { "type": "integer" }, - "sub": { + "direction": { "type": "string" }, - "email": { + "protocol": { "type": "string" }, - "username": { - "type": "string" + "port_range_min": { + "type": "integer" }, - "name": { + "port_range_max": { + "type": "integer" + }, + "ethertype": { "type": "string" }, - "role": { + "remote_ip_prefix": { "type": "string" }, - "rbac_roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RBAC Role Field for Organization" - } + "status": { + "type": "string" }, - "joined_at": { + "created_at": { "type": "string", "format": "date-time" } } }, - "RBAC Role Field for Organization": { + "MetricsFields": { "type": "object", "properties": { - "name": { - "type": "string" + "cpu": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "memory.usages": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "network.in": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "network.out": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "disk.read": { + "$ref": "#/components/schemas/MetricItemFields" + }, + "disk.write": { + "$ref": "#/components/schemas/MetricItemFields" } } }, - "Remove member": { - "required": [ - "email" - ], + "MetricItemFields": { "type": "object", "properties": { - "email": { + "unit": { "type": "string" - } - } - }, - "Remove Member Response": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { - "type": "string" + "columns": { + "type": "array", + "example": [ + "time", + "granularity", + "value" + ], + "items": { + "type": "string" + } + }, + "data": { + "type": "array", + "example": [ + [ + "2023-09-01T01:19:00+00:00", + 60, + 1041433070000000 + ], + [ + "2023-09-01T01:24:00+00:00", + 60, + 1041441320000000 + ] + ], + "items": { + "type": "array", + "items": { + "type": "object", + "properties": {} + } + } } } }, - "API Key": { + "InstanceResizePayload": { "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { + "flavor_name": { "type": "string" }, - "api_key": { - "$ref": "#/components/schemas/API Key Fields" + "flavor": { + "$ref": "#/components/schemas/Flavor Object Fields" } } }, - "API Key Fields": { + "Edit label of an existing VM Payload": { "type": "object", "properties": { - "key": { - "type": "string" + "labels": { + "type": "array", + "items": { + "type": "string" + } } } }, - "API Key generation": { + "ContractInstancesResponse": { "type": "object", "properties": { "status": { @@ -6821,97 +10226,145 @@ "message": { "type": "string" }, - "api_key": { - "type": "string" + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContractInstanceFields" + } } } }, - "API Key Payload": { + "ContractInstanceFields": { "type": "object", "properties": { - "api_key": { + "id": { + "type": "integer" + }, + "name": { "type": "string" - } - } - }, - "ApiKeyVerifyResponse": { - "type": "object", - "properties": { + }, "status": { - "type": "boolean" + "type": "string" }, - "message": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "flavor_name": { "type": "string" }, - "api_key": { - "$ref": "#/components/schemas/ApiKeyVerifyFields" + "gpu_count": { + "type": "integer" } } }, - "ApiKeyVerifyFields": { + "AttachFirewallsToVMPayload": { + "required": [ + "firewalls" + ], "type": "object", "properties": { - "user_id": { - "type": "integer" - }, - "org_id": { - "type": "integer" - }, - "user_role": { - "type": "string" - }, - "sub": { - "type": "string" + "firewalls": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "Invite User": { + "FlavorPayload": { "required": [ - "email" + "cpu", + "disk", + "gpu", + "gpu_count", + "is_public", + "name", + "ram", + "region_name" ], "type": "object", "properties": { - "email": { + "name": { + "type": "string" + }, + "region_name": { + "type": "string" + }, + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { "type": "string" + }, + "gpu_count": { + "type": "integer" + }, + "is_public": { + "type": "boolean" } } }, - "Invites": { + "FlavorResponse": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { - "type": "string" - }, - "invites": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Invite Fields" - } + "type": "string" + }, + "flavor": { + "$ref": "#/components/schemas/Flavor Fields" } } }, - "Invite Fields": { + "Flavor Fields": { "type": "object", "properties": { "id": { "type": "integer" }, - "email": { + "name": { "type": "string" }, - "status": { + "region_name": { + "type": "string" + }, + "cpu": { + "type": "integer" + }, + "ram": { + "type": "integer" + }, + "disk": { + "type": "integer" + }, + "ephemeral": { + "type": "integer" + }, + "gpu": { "type": "string" }, + "gpu_count": { + "type": "integer" + }, + "stock_available": { + "type": "boolean" + }, "created_at": { "type": "string", "format": "date-time" } } }, - "Invite": { + "Flavor List Response": { "type": "object", "properties": { "status": { @@ -6920,101 +10373,118 @@ "message": { "type": "string" }, - "invite": { - "$ref": "#/components/schemas/Invite Fields" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Flavor Item Get Response" + } } } }, - "ResponseModel": { + "Flavor Item Get Response": { "type": "object", "properties": { - "status": { - "type": "boolean" + "gpu": { + "type": "string" }, - "message": { + "region_name": { "type": "string" + }, + "flavors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Flavor Fields" + } } } }, - "PermissionPayload": { - "required": [ - "endpoint", - "method", - "permission", - "resource" - ], + "Images": { "type": "object", "properties": { - "resource": { - "type": "string" - }, - "permission": { - "type": "string" + "status": { + "type": "boolean" }, - "method": { + "message": { "type": "string" }, - "endpoint": { - "type": "string" + "images": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Image Get Response" + } } } }, - "Permissions": { + "Image Get Response": { "type": "object", "properties": { - "status": { - "type": "boolean" + "region_name": { + "type": "string" }, - "message": { + "type": { "type": "string" }, - "permissions": { + "logo": { + "type": "string" + }, + "images": { "type": "array", "items": { - "$ref": "#/components/schemas/Permission Fields" + "$ref": "#/components/schemas/Image Fields" } } } }, - "Permission Fields": { + "Image Fields": { "type": "object", "properties": { "id": { "type": "integer" }, - "resource": { + "name": { "type": "string" }, - "permission": { + "region_name": { "type": "string" }, - "method": { + "type": { "type": "string" }, - "endpoint": { + "version": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "size": { + "type": "integer" + }, + "display_size": { + "type": "string" + }, + "description": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LableResonse" + } + }, + "is_public": { + "type": "boolean" } } }, - "PermissionResponse": { + "LableResonse": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "label": { "type": "string" - }, - "permission": { - "$ref": "#/components/schemas/Permission Fields" } } }, - "Permissions for UserPermission": { + "Image Logos": { "type": "object", "properties": { "status": { @@ -7023,55 +10493,52 @@ "message": { "type": "string" }, - "permissions": { + "logos": { "type": "array", "items": { - "$ref": "#/components/schemas/Permission Fields for UserPermission" + "$ref": "#/components/schemas/Logo Get Response" } } } }, - "Permission Fields for UserPermission": { + "Logo Get Response": { "type": "object", "properties": { "id": { "type": "integer" }, - "resource": { + "type": { "type": "string" }, - "permission": { + "url": { "type": "string" } } }, - "PolicyPayload": { + "Import Keypair Payload": { "required": [ - "description", - "is_public", + "environment_name", "name", - "permissions" + "public_key" ], "type": "object", "properties": { "name": { - "type": "string" - }, - "description": { - "type": "string" + "maxLength": 50, + "type": "string", + "description": "The name of the key pair that is being created." }, - "is_public": { - "type": "boolean" + "environment_name": { + "type": "string", + "description": "The name of the environment where the key pair is being created." }, - "permissions": { - "type": "array", - "items": { - "type": "integer" - } + "public_key": { + "type": "string", + "description": "The public key that is being used to import an SSH key pair." } } }, - "Policies": { + "Import Keypair Response": { "type": "object", "properties": { "status": { @@ -7080,15 +10547,12 @@ "message": { "type": "string" }, - "policies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Policy Fields" - } + "keypair": { + "$ref": "#/components/schemas/Keypair Fields" } } }, - "Policy Fields": { + "Keypair Fields": { "type": "object", "properties": { "id": { @@ -7097,14 +10561,14 @@ "name": { "type": "string" }, - "description": { + "environment": { "type": "string" }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Policy Permission Fields" - } + "public_key": { + "type": "string" + }, + "fingerprint": { + "type": "string" }, "created_at": { "type": "string", @@ -7112,21 +10576,37 @@ } } }, - "Policy Permission Fields": { + "Keypairs": { "type": "object", "properties": { - "id": { - "type": "integer" + "status": { + "type": "boolean" }, - "resource": { + "message": { "type": "string" }, - "permission": { - "type": "string" + "Keypairs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Keypair Fields" + } + } + } + }, + "Update Keypair Name": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "type": "string", + "description": "The new key pair name." } } }, - "PolicyResponse": { + "Update Keypair name response": { "type": "object", "properties": { "status": { @@ -7135,39 +10615,26 @@ "message": { "type": "string" }, - "policy": { - "$ref": "#/components/schemas/Policy Fields" + "keypair": { + "$ref": "#/components/schemas/Keypair Fields" } } }, - "RBAC Role Payload": { - "required": [ - "description", - "name" - ], + "Request Console": { "type": "object", "properties": { - "name": { - "type": "string" + "status": { + "type": "boolean" }, - "description": { + "message": { "type": "string" }, - "policies": { - "type": "array", - "items": { - "type": "integer" - } - }, - "permissions": { - "type": "array", - "items": { - "type": "integer" - } + "url": { + "type": "string" } } }, - "RBAC Roles": { + "VNC URL": { "type": "object", "properties": { "status": { @@ -7176,98 +10643,130 @@ "message": { "type": "string" }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RBAC Role Fields" - } + "vnc_url": { + "$ref": "#/components/schemas/VNC URL Fields" } } }, - "RBAC Role Fields": { + "VNC URL Fields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { + "vnc_url": { "type": "string" + } + } + }, + "Create Volume Payload": { + "required": [ + "description", + "environment_name", + "name", + "size", + "volume_type" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the volume being created." + }, + "environment_name": { + "type": "string", + "description": "The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) within which the volume is being created." }, "description": { - "type": "string" + "type": "string", + "description": "A brief description or comment about the volume." }, - "policies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role Policy Fields" - } + "volume_type": { + "type": "string", + "description": "Specifies the type of volume being created, which determines the storage technology it will use. Call the \"[List volume types](https://infrahub-api-doc.nexgencloud.com/#get-/core/volumes)\" endpoint to retrieve a list of available volume model types." }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role Permission Fields" - } + "size": { + "type": "integer", + "description": "The size of the volume in GB. 1048576GB storage capacity per volume." }, - "created_at": { + "image_id": { + "type": "integer", + "description": "The ID of the operating system image that will be associated with the volume. By providing an `image_id` in the create volume request, you will create a bootable volume." + }, + "callback_url": { + "maxLength": 250, "type": "string", - "format": "date-time" + "description": "A URL that can be attached to the volume you are creating. This `callback_url` will post any action events that occur to your volume to the provided URL." } } }, - "Role Policy Fields": { + "Volume": { "type": "object", "properties": { - "id": { - "type": "integer" + "status": { + "type": "boolean" }, - "name": { + "message": { "type": "string" }, - "description": { - "type": "string" + "volume": { + "$ref": "#/components/schemas/Volume Fields" } } }, - "Role Permission Fields": { + "Volume Fields": { "type": "object", "properties": { "id": { "type": "integer" }, - "resource": { + "name": { "type": "string" }, - "permission": { + "environment": { + "$ref": "#/components/schemas/Environment Fields for Volume" + }, + "description": { "type": "string" - } - } - }, - "RBAC Role": { - "type": "object", - "properties": { + }, + "volume_type": { + "type": "string" + }, + "size": { + "type": "string" + }, "status": { + "type": "string" + }, + "bootable": { "type": "boolean" }, - "message": { + "image_id": { + "type": "integer" + }, + "callback_url": { "type": "string" }, - "role": { - "$ref": "#/components/schemas/RBAC Role Fields" + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" } } }, - "Assign RBAC Role Payload": { - "required": [ - "role_id" - ], + "Environment Fields for Volume": { "type": "object", "properties": { - "role_id": { - "type": "integer" + "name": { + "type": "string" } } }, - "OrganizationsResponseModel": { + "Volumes": { "type": "object", "properties": { "status": { @@ -7276,15 +10775,15 @@ "message": { "type": "string" }, - "organizations": { + "volumes": { "type": "array", "items": { - "$ref": "#/components/schemas/Organization Info Model" + "$ref": "#/components/schemas/Volume Fields" } } } }, - "OrganizationResponseModel": { + "Volume Types": { "type": "object", "properties": { "status": { @@ -7293,165 +10792,167 @@ "message": { "type": "string" }, - "organizations": { - "$ref": "#/components/schemas/Organization Info Model" + "volume_types": { + "type": "array", + "items": { + "type": "string" + } } } }, - "Dashboard Info Response": { + "Attach Volumes Payload": { "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "overview": { - "$ref": "#/components/schemas/Overview Info" + "volume_ids": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "Overview Info": { + "Attach Volumes": { "type": "object", "properties": { - "instance": { - "$ref": "#/components/schemas/Instance Overview Fields" + "status": { + "type": "boolean" }, - "container": { - "$ref": "#/components/schemas/Container Overview Fields" + "message": { + "type": "string" }, - "volume": { - "$ref": "#/components/schemas/Volume Overview Fields" + "volume_attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attach Volume Fields" + } } } }, - "Instance Overview Fields": { + "Attach Volume Fields": { "type": "object", "properties": { - "count": { + "id": { "type": "integer" }, - "vcpus": { + "instance_id": { "type": "integer" }, - "gpus": { + "volume_id": { "type": "integer" }, - "ram": { - "type": "integer" + "status": { + "type": "string" }, - "cost_per_hour": { - "type": "number" + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Container Overview Fields": { + "Detach Volumes Payload": { "type": "object", "properties": { - "count": { - "type": "integer" - }, - "vcpus": { - "type": "integer" - }, - "gpus": { - "type": "integer" - }, - "ram": { - "type": "integer" - }, - "cost_per_hour": { - "type": "number" + "volume_ids": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "Volume Overview Fields": { + "Detach Volumes": { "type": "object", "properties": { - "count": { - "type": "integer" + "status": { + "type": "boolean" }, - "using": { - "type": "integer" + "message": { + "type": "string" }, - "cost_per_hour": { - "type": "number" + "volume_attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Attach Volume Fields" + } } } }, - "New Stock Retrive Response": { + "Create GPU": { + "required": [ + "name" + ], "type": "object", "properties": { - "stocks": { + "name": { + "type": "string" + }, + "regions": { "type": "array", "items": { - "$ref": "#/components/schemas/New Stock Response" + "type": "string" } + }, + "example_metadata": { + "type": "string", + "description": "A valid JSON string.", + "example": "{\"key\": \"value\"}" } } }, - "New Stock Response": { + "GPU": { "type": "object", "properties": { - "region": { - "type": "string" + "status": { + "type": "boolean" }, - "stock-type": { + "message": { "type": "string" }, - "models": { - "type": "array", - "items": { - "$ref": "#/components/schemas/New Model Response" - } + "gpu": { + "$ref": "#/components/schemas/GPU Fields" } } }, - "New Model Response": { + "GPU Fields": { "type": "object", "properties": { - "model": { - "type": "string" + "id": { + "type": "integer" }, - "available": { + "name": { "type": "string" }, - "planned_7_days": { - "type": "string" + "regions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GPU Region Fields" + } }, - "planned_30_days": { + "example_metadata": { "type": "string" }, - "planned_100_days": { - "type": "string" + "created_at": { + "type": "string", + "format": "date-time" }, - "configurations": { - "$ref": "#/components/schemas/New Configurations Response" + "updated_at": { + "type": "string", + "format": "date-time" } } }, - "New Configurations Response": { + "GPU Region Fields": { "type": "object", "properties": { - "1x": { - "type": "integer" - }, - "2x": { - "type": "integer" - }, - "4x": { - "type": "integer" - }, - "8x": { + "id": { "type": "integer" }, - "10x": { - "type": "integer" + "name": { + "type": "string" } } }, - "Stock Visibility User List Response": { + "GPU List": { "type": "object", "properties": { "status": { @@ -7460,274 +10961,342 @@ "message": { "type": "string" }, - "users": { + "gpu_list": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GPU Fields" + } + } + } + }, + "Update GPU": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "regions": { "type": "array", "items": { - "$ref": "#/components/schemas/Single Visibility User Response" + "type": "string" } + }, + "example_metadata": { + "type": "string", + "description": "A valid JSON string.", + "example": "{\"key\": \"value\"}" } } }, - "Single Visibility User Response": { + "Attach Callback Payload": { "required": [ - "id", - "stock_visible", - "user_id" + "url" ], "type": "object", "properties": { - "id": { - "type": "integer" - }, - "user_id": { - "type": "integer" - }, - "stock_visible": { - "type": "boolean" + "url": { + "type": "string" } } }, - "Stock Visibility User Payload": { + "Attach Callback Response": { "type": "object", "properties": { - "user_ids": { - "type": "array", - "items": { - "type": "integer" - } + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "url": { + "type": "string" } } }, - "Node Stock Payload Model": { + "InternalInstancesResponse": { "type": "object", "properties": { - "stocks": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "instances": { "type": "array", "items": { - "$ref": "#/components/schemas/Node Payload Model" + "$ref": "#/components/schemas/InternalInstanceFields" } } } }, - "Node Payload Model": { + "InternalInstanceFields": { "type": "object", "properties": { - "region": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "nodes": { + "openstack_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "environment": { + "$ref": "#/components/schemas/InternalEnvironmentFields" + }, + "image": { + "$ref": "#/components/schemas/InternalInstanceImageFields" + }, + "flavor": { + "$ref": "#/components/schemas/InternalInstanceFlavorFields" + }, + "keypair": { + "$ref": "#/components/schemas/InternalInstanceKeypairFields" + }, + "volume_attachments": { "type": "array", "items": { - "$ref": "#/components/schemas/Node Power Usage Model" + "$ref": "#/components/schemas/InternalVolumeAttachmentFields" } - } - } - }, - "Node Power Usage Model": { - "required": [ - "openstack_id" - ], - "type": "object", - "properties": { - "openstack_id": { + }, + "boot_source": { "type": "string" }, - "openstack_name": { + "power_state": { "type": "string" }, - "nexgen_name": { + "vm_state": { "type": "string" }, - "status": { + "fixed_ip": { "type": "string" }, - "provision_date": { - "type": "string", - "format": "date-time" + "floating_ip": { + "type": "string" }, - "sunset_date": { - "type": "string", - "format": "date-time" + "floating_ip_status": { + "type": "string" }, - "stocks": { + "user_data": { + "type": "string" + }, + "security_rules": { "type": "array", "items": { - "$ref": "#/components/schemas/Node Stocks Payload" + "$ref": "#/components/schemas/InternalSecurityRulesFieldsForInstance" } }, - "power_usages": { - "$ref": "#/components/schemas/Power Usage Model" + "callback_url": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Node Stocks Payload": { - "required": [ - "in_use", - "total", - "type" - ], + "InternalEnvironmentFields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "name": { "type": "string" }, - "type": { + "region": { "type": "string" }, - "total": { - "type": "integer" - }, - "in_use": { - "type": "integer" + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Power Usage Model": { - "required": [ - "unit", - "value" - ], + "InternalInstanceImageFields": { "type": "object", "properties": { - "value": { - "type": "number" + "id": { + "type": "integer" }, - "unit": { + "name": { + "type": "string" + }, + "region_name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { "type": "string" } } }, - "Node Stock Response Model": { - "type": "object", - "properties": { - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Node Response Model" - } - } - } - }, - "Node Response Model": { + "InternalInstanceFlavorFields": { "type": "object", "properties": { - "region": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Node Model" - } + "region_name": { + "type": "string" + }, + "cpu": { + "type": "integer" + }, + "ram": { + "type": "integer" + }, + "disk": { + "type": "integer" + }, + "gpu": { + "type": "string" + }, + "gpu_count": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Node Model": { - "required": [ - "openstack_id" - ], + "InternalInstanceKeypairFields": { "type": "object", "properties": { - "openstack_id": { - "type": "string" + "id": { + "type": "integer" }, - "openstack_name": { + "name": { "type": "string" }, - "nexgen_name": { + "environment": { "type": "string" }, - "status": { + "public_key": { "type": "string" }, - "provision_date": { - "type": "string", - "format": "date-time" + "fingerprint": { + "type": "string" }, - "sunset_date": { + "created_at": { "type": "string", "format": "date-time" - }, - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Node Stocks Payload" - } } } }, - "Future Nodes Stock Model": { + "InternalVolumeAttachmentFields": { "type": "object", "properties": { - "future_stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Future Node Response Model" - } + "volume": { + "$ref": "#/components/schemas/InternalVolumeFields" + }, + "status": { + "type": "string" + }, + "device": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Future Node Response Model": { + "InternalVolumeFields": { "type": "object", "properties": { - "region": { + "id": { + "type": "integer" + }, + "name": { "type": "string" }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Future Node Model" - } + "description": { + "type": "string" + }, + "volume_type": { + "type": "string" + }, + "size": { + "type": "string" } } }, - "Future Node Model": { - "required": [ - "expected_provision_date" - ], + "InternalSecurityRulesFieldsForInstance": { "type": "object", "properties": { "id": { - "type": "integer", - "readOnly": true + "type": "integer" }, - "openstack_name": { + "direction": { "type": "string" }, - "nexgen_name": { + "protocol": { "type": "string" }, - "expected_provision_date": { + "port_range_min": { + "type": "integer" + }, + "port_range_max": { + "type": "integer" + }, + "ethertype": { + "type": "string" + }, + "remote_ip_prefix": { + "type": "string" + }, + "status": { + "type": "string" + }, + "created_at": { "type": "string", "format": "date-time" + } + } + }, + "InternalVolumesResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" }, - "stocks": { + "message": { + "type": "string" + }, + "volumes": { "type": "array", "items": { - "$ref": "#/components/schemas/Future Node Stock Model" + "$ref": "#/components/schemas/InternalVolumeFields" } } } }, - "Future Node Stock Model": { + "RegionPayload": { "required": [ - "expected_amount" + "name" ], "type": "object", "properties": { - "id": { - "type": "integer", - "readOnly": true - }, "name": { "type": "string" }, - "expected_amount": { - "type": "integer" + "description": { + "type": "string" } } }, - "New Stock Update Response Model": { + "RegionResponse": { "type": "object", "properties": { "status": { @@ -7735,52 +11304,44 @@ }, "message": { "type": "string" + }, + "region": { + "$ref": "#/components/schemas/Region Fields" } } }, - "Future Node Update Model": { - "required": [ - "expected_provision_date", - "nexgen_name", - "openstack_name" - ], + "Region Fields": { "type": "object", "properties": { "id": { - "type": "integer", - "readOnly": true - }, - "region_id": { "type": "integer" }, - "openstack_name": { + "name": { "type": "string" }, - "nexgen_name": { + "description": { "type": "string" - }, - "expected_provision_date": { - "type": "string", - "format": "date-time" } } }, - "Create Environment": { - "required": [ - "name", - "region" - ], + "Regions": { "type": "object", "properties": { - "name": { - "type": "string" + "status": { + "type": "boolean" }, - "region": { + "message": { "type": "string" + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Region Fields" + } } } }, - "Environments": { + "Template": { "type": "object", "properties": { "status": { @@ -7789,15 +11350,12 @@ "message": { "type": "string" }, - "environments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Environment Fields" - } + "template": { + "$ref": "#/components/schemas/Template Fields" } } }, - "Environment Fields": { + "Template Fields": { "type": "object", "properties": { "id": { @@ -7806,16 +11364,22 @@ "name": { "type": "string" }, - "region": { + "description": { + "type": "string" + }, + "content": { "type": "string" }, + "is_public": { + "type": "boolean" + }, "created_at": { "type": "string", "format": "date-time" } } }, - "Environment": { + "Templates": { "type": "object", "properties": { "status": { @@ -7824,23 +11388,54 @@ "message": { "type": "string" }, - "environment": { - "$ref": "#/components/schemas/Environment Fields" + "templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Template Fields" + } } } }, - "Update Environment": { + "Update Template": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "is_public": { + "type": "boolean" + } + } + }, + "Start Deployment Payload": { "required": [ - "name" + "description", + "name", + "template_id" ], "type": "object", "properties": { "name": { "type": "string" + }, + "description": { + "type": "string" + }, + "template_id": { + "type": "integer" + }, + "variables": { + "type": "object", + "additionalProperties": { + "type": "string" + } } } }, - "InstanceEvents": { + "Start Deployment": { "type": "object", "properties": { "status": { @@ -7849,129 +11444,158 @@ "message": { "type": "string" }, - "instance_events": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstanceEventsFields" - } + "deployment": { + "$ref": "#/components/schemas/Deployment Fields for start deployments" } } }, - "InstanceEventsFields": { + "Deployment Fields for start deployments": { "type": "object", "properties": { - "instance_id": { - "type": "integer" - }, - "user_id": { - "type": "integer" - }, - "org_id": { + "id": { "type": "integer" }, - "time": { - "type": "string", - "format": "date-time" + "name": { + "type": "string" }, - "type": { + "description": { "type": "string" }, - "reason": { + "template": { "type": "string" }, - "object": { + "status": { "type": "string" }, - "message": { + "variables": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Create Instances Payload": { - "required": [ - "count", - "environment_name", - "key_name", - "name" - ], + "Deployments": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "environment_name": { - "type": "string" - }, - "image_name": { - "type": "string" + "status": { + "type": "boolean" }, - "volume_name": { + "message": { "type": "string" }, - "create_bootable_volume": { - "type": "boolean" + "deployments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Deployment Fields" + } + } + } + }, + "Deployment Fields": { + "type": "object", + "properties": { + "id": { + "type": "integer" }, - "flavor_name": { + "name": { "type": "string" }, - "flavor": { - "$ref": "#/components/schemas/Flavor Object Fields" - }, - "key_name": { + "description": { "type": "string" }, - "user_data": { + "template": { "type": "string" }, - "callback_url": { + "status": { "type": "string" }, - "assign_floating_ip": { + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "Security Rules Protocol Fields": { + "type": "object", + "properties": { + "status": { "type": "boolean" }, - "profile": { - "$ref": "#/components/schemas/Profile Object Fields" + "message": { + "type": "string" }, - "count": { - "type": "integer" + "protocols": { + "type": "array", + "items": { + "type": "string" + } } } }, - "Flavor Object Fields": { + "Create Profile Payload": { + "required": [ + "data", + "name" + ], "type": "object", "properties": { - "cpu": { - "type": "integer" + "name": { + "maxLength": 50, + "type": "string", + "description": "The name of the profile being created." }, - "ram": { - "type": "number" + "description": { + "maxLength": 150, + "type": "string", + "description": "The optional description for the profile being created." }, - "disk": { - "type": "integer" + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The data object which contains the configuration of the virtual machine profile being created." + } + } + }, + "Create Profile Response": { + "type": "object", + "properties": { + "status": { + "type": "boolean" }, - "gpu": { + "message": { "type": "string" }, - "gpu_count": { - "type": "integer" + "profile": { + "$ref": "#/components/schemas/Profile Fields" } } }, - "Profile Object Fields": { - "required": [ - "name" - ], + "Profile Fields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "name": { "type": "string" }, "description": { "type": "string" + }, + "data": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Instances": { + "Profile List Response": { "type": "object", "properties": { "status": { @@ -7980,18 +11604,29 @@ "message": { "type": "string" }, - "instances": { + "profiles": { "type": "array", "items": { - "$ref": "#/components/schemas/Instance Admin Fields" + "$ref": "#/components/schemas/Profile Fields" } + } + } + }, + "InstanceAdmin": { + "type": "object", + "properties": { + "status": { + "type": "boolean" }, - "instance_count": { - "type": "integer" + "message": { + "type": "string" + }, + "instance": { + "$ref": "#/components/schemas/InstanceAdminFields" } } }, - "Instance Admin Fields": { + "InstanceAdminFields": { "type": "object", "properties": { "id": { @@ -8012,6 +11647,9 @@ "flavor": { "$ref": "#/components/schemas/Instance Flavor Fields" }, + "os": { + "type": "string" + }, "keypair": { "$ref": "#/components/schemas/Instance Keypair Fields" }, @@ -8042,90 +11680,268 @@ "floating_ip_status": { "type": "string" }, + "locked": { + "type": "boolean" + }, + "contract_id": { + "type": "integer" + }, "created_at": { "type": "string", "format": "date-time" }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, "openstack_id": { "type": "string" + }, + "host": { + "type": "string" } } }, - "Instance Environment Fields": { + "InstancesAdmin": { "type": "object", "properties": { - "name": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "org_id": { + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InstanceAdminFields" + } + }, + "instance_count": { + "type": "integer" + } + } + }, + "AdminOrganizationResourceList": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "organizations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminOrganizationResources" + } + } + } + }, + "AdminOrganizationResources": { + "type": "object", + "properties": { + "organization_id": { + "type": "integer" + }, + "environments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminEnvrionmentResources" + } + } + } + }, + "AdminEnvrionmentResources": { + "type": "object", + "properties": { + "id": { "type": "integer" }, + "name": { + "type": "string" + }, "region": { "type": "string" + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminInstanceResources" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminVolumeResource" + } + }, + "containers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminContainerResource" + } + }, + "clusters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminClusterResource" + } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Instance Image Fields": { + "AdminInstanceResources": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "name": { "type": "string" + }, + "openstack_id": { + "type": "string" + }, + "host": { + "type": "string" + }, + "status": { + "type": "string" + }, + "flavor": { + "$ref": "#/components/schemas/AdminFlavorResource" + }, + "image_id": { + "type": "integer" + }, + "volume_id": { + "type": "integer" + }, + "keypair_name": { + "type": "string" + }, + "fixed_ip": { + "type": "string" + }, + "floating_ip": { + "type": "string" + }, + "contract_id": { + "type": "integer" + }, + "floating_ip_status": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Instance Flavor Fields": { + "AdminFlavorResource": { "type": "object", "properties": { "id": { "type": "integer" }, + "openstack_id": { + "type": "string" + }, "name": { "type": "string" }, + "region_name": { + "type": "string" + }, "cpu": { "type": "integer" }, - "ram": { - "type": "integer" + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { + "type": "string" + }, + "status": { + "type": "string" + }, + "gpu_count": { + "type": "integer" + }, + "stock_available": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminNodeResource" + } + }, + "vms": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_public": { + "type": "boolean" + }, + "is_custom": { + "type": "boolean" }, - "disk": { + "ephemeral": { "type": "integer" }, - "gpu": { + "description": { "type": "string" }, - "gpu_count": { - "type": "integer" + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Instance Keypair Fields": { + "AdminNodeResource": { "type": "object", "properties": { - "name": { + "id": { + "type": "integer" + }, + "openstack_id": { "type": "string" - } - } - }, - "Volume Attachment Fields": { - "type": "object", - "properties": { - "volume": { - "$ref": "#/components/schemas/Volume Fields for Instance" }, - "status": { + "name": { "type": "string" }, - "device": { + "available": { + "type": "integer" + }, + "status": { "type": "string" }, - "created_at": { + "provision_date": { "type": "string", "format": "date-time" + }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "Volume Fields for Instance": { + "AdminVolumeResource": { "type": "object", "properties": { "id": { @@ -8134,42 +11950,49 @@ "name": { "type": "string" }, - "description": { + "openstack_id": { "type": "string" }, - "volume_type": { + "type": { "type": "string" }, "size": { "type": "integer" + }, + "status": { + "type": "string" + }, + "bootable": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Security Rules Fields for Instance": { + "AdminContainerResource": { "type": "object", "properties": { "id": { "type": "integer" }, - "direction": { - "type": "string" - }, - "protocol": { + "name": { "type": "string" }, - "port_range_min": { - "type": "integer" + "flavor": { + "$ref": "#/components/schemas/AdminFlavorResource" }, - "port_range_max": { - "type": "integer" + "status": { + "type": "string" }, - "ethertype": { + "image": { "type": "string" }, - "remote_ip_prefix": { + "fixed_ip": { "type": "string" }, - "status": { + "floating_ip": { "type": "string" }, "created_at": { @@ -8178,44 +12001,40 @@ } } }, - "Instance": { + "AdminClusterResource": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "name": { "type": "string" }, - "instance": { - "$ref": "#/components/schemas/Instance Admin Fields" - } - } - }, - "Create Security Rule Payload": { - "required": [ - "direction", - "ethertype", - "protocol", - "remote_ip_prefix" - ], - "type": "object", - "properties": { - "direction": { + "kubernetes_version": { "type": "string" }, - "protocol": { + "status": { "type": "string" }, - "ethertype": { - "type": "string" + "master_count": { + "type": "integer" }, - "remote_ip_prefix": { - "type": "string" + "node_count": { + "type": "integer" + }, + "node_flavor": { + "$ref": "#/components/schemas/AdminFlavorResource" + }, + "enable_public_ip": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Security Group Rule": { + "AdminOrganizationResourceResponse": { "type": "object", "properties": { "status": { @@ -8224,95 +12043,57 @@ "message": { "type": "string" }, - "security_rule": { - "$ref": "#/components/schemas/Security Group Rule Fields" + "organization": { + "$ref": "#/components/schemas/AdminOrganizationResources" } } }, - "Security Group Rule Fields": { + "AdminGetVersionResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "direction": { - "type": "string" - }, - "protocol": { - "type": "string" - }, - "port_range_min": { - "type": "integer" - }, - "port_range_max": { - "type": "integer" - }, - "ethertype": { - "type": "string" + "status": { + "type": "boolean" }, - "remote_ip_prefix": { + "message": { "type": "string" }, - "status": { + "version": { "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "InstanceResizePayload": { + "AdminCountResourcesOrganizations": { "type": "object", "properties": { - "flavor_name": { - "type": "string" - }, - "flavor": { - "$ref": "#/components/schemas/Flavor Object Fields" + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminCountResourcesOrganization" + } } } }, - "FlavorPayload": { - "required": [ - "cpu", - "disk", - "gpu", - "gpu_count", - "is_public", - "name", - "ram", - "region_name" - ], + "AdminCountResourcesOrganization": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "region_name": { - "type": "string" - }, - "cpu": { + "organization_id": { "type": "integer" }, - "ram": { - "type": "number" - }, - "disk": { + "total_instances": { "type": "integer" }, - "gpu": { - "type": "string" + "total_volumes": { + "type": "integer" }, - "gpu_count": { + "total_containers": { "type": "integer" }, - "is_public": { - "type": "boolean" + "total_clusters": { + "type": "integer" } } }, - "Flavor List Response": { + "InstancesSummaryAdmin": { "type": "object", "properties": { "status": { @@ -8321,32 +12102,15 @@ "message": { "type": "string" }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Flavor Item Get Response" - } - } - } - }, - "Flavor Item Get Response": { - "type": "object", - "properties": { - "gpu": { - "type": "string" - }, - "region_name": { - "type": "string" - }, - "flavors": { + "instances": { "type": "array", "items": { - "$ref": "#/components/schemas/Flavor Fields" + "$ref": "#/components/schemas/Instances Summary Fields" } } } }, - "Flavor Fields": { + "Instances Summary Fields": { "type": "object", "properties": { "id": { @@ -8355,48 +12119,87 @@ "name": { "type": "string" }, - "region_name": { + "environment": { "type": "string" }, - "cpu": { + "org_id": { "type": "integer" }, - "ram": { + "environment_id": { "type": "integer" }, - "disk": { + "image": { + "type": "string" + }, + "image_id": { "type": "integer" }, - "gpu": { + "flavor": { "type": "string" }, - "gpu_count": { + "flavor_id": { "type": "integer" }, - "stock_available": { - "type": "boolean" + "keypair": { + "type": "string" + }, + "keypair_id": { + "type": "integer" + }, + "fixed_ip": { + "type": "string" + }, + "floating_ip": { + "type": "string" + }, + "floating_ip_status": { + "type": "string" + }, + "status": { + "type": "string" }, "created_at": { "type": "string", "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" } } }, - "FlavorResponse": { + "CompliancePayload": { + "required": [ + "base_value", + "gpu_model", + "resource_type", + "variation_max", + "variation_min", + "variation_unit" + ], "type": "object", "properties": { - "status": { - "type": "boolean" + "gpu_model": { + "type": "string" }, - "message": { + "resource_type": { "type": "string" }, - "flavor": { - "$ref": "#/components/schemas/Flavor Fields" + "base_value": { + "type": "integer" + }, + "variation_min": { + "type": "integer" + }, + "variation_max": { + "type": "integer" + }, + "variation_unit": { + "type": "integer" } } }, - "Images": { + "CreateUpdateComplianceResponse": { "type": "object", "properties": { "status": { @@ -8405,61 +12208,38 @@ "message": { "type": "string" }, - "images": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Image Get Response" - } - } - } - }, - "Image Get Response": { - "type": "object", - "properties": { - "region_name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "logo": { - "type": "string" - }, - "images": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Image Fields" - } + "compliance": { + "$ref": "#/components/schemas/ComplianceModelFields" } } }, - "Image Fields": { + "ComplianceModelFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { + "gpu_model": { "type": "string" }, - "region_name": { + "resource_type": { "type": "string" }, - "type": { - "type": "string" + "base_value": { + "type": "integer" }, - "version": { - "type": "string" + "variation_min": { + "type": "integer" }, - "size": { + "variation_max": { "type": "integer" }, - "display_size": { - "type": "string" + "variation_unit": { + "type": "integer" } } }, - "Image Logos": { + "ComplianceResponse": { "type": "object", "properties": { "status": { @@ -8468,48 +12248,56 @@ "message": { "type": "string" }, - "logos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Logo Get Response" - } + "compliance": { + "$ref": "#/components/schemas/ComplianceFields" } } }, - "Logo Get Response": { + "ComplianceFields": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "type": { + "gpu_model": { "type": "string" }, - "url": { - "type": "string" + "cpu": { + "type": "array", + "items": { + "type": "integer" + } + }, + "ram": { + "type": "array", + "items": { + "type": "integer" + } + }, + "hdd": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "Import Keypair Payload": { + "CreateFirewallPayload": { "required": [ - "environment_name", - "name", - "public_key" + "environment_id", + "name" ], "type": "object", "properties": { "name": { "type": "string" }, - "environment_name": { + "description": { "type": "string" }, - "public_key": { - "type": "string" + "environment_id": { + "type": "integer" } } }, - "Keypairs": { + "FirewallResponse": { "type": "object", "properties": { "status": { @@ -8518,15 +12306,12 @@ "message": { "type": "string" }, - "Keypairs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Keypair Fields" - } + "firewall": { + "$ref": "#/components/schemas/FirewallFields" } } }, - "Keypair Fields": { + "FirewallFields": { "type": "object", "properties": { "id": { @@ -8535,13 +12320,13 @@ "name": { "type": "string" }, - "environment": { + "description": { "type": "string" }, - "public_key": { - "type": "string" + "environment": { + "$ref": "#/components/schemas/FirewallEnvironmentFields" }, - "fingerprint": { + "status": { "type": "string" }, "created_at": { @@ -8550,32 +12335,21 @@ } } }, - "Import Keypair Response": { + "FirewallEnvironmentFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "name": { "type": "string" }, - "keypair": { - "$ref": "#/components/schemas/Keypair Fields" - } - } - }, - "Update Keypair Name": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { + "region": { "type": "string" } } }, - "Update Keypair name response": { + "FirewallsListResponse": { "type": "object", "properties": { "status": { @@ -8584,94 +12358,102 @@ "message": { "type": "string" }, - "keypair": { - "$ref": "#/components/schemas/Keypair Fields" + "firewalls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FirewallDetailFields" + } } } }, - "Request Console": { + "FirewallDetailFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "name": { "type": "string" }, - "url": { + "description": { "type": "string" - } - } - }, - "VNC URL": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "environment": { + "$ref": "#/components/schemas/FirewallEnvironmentFields" + }, + "status": { "type": "string" }, - "vnc_url": { - "$ref": "#/components/schemas/VNC URL Fields" + "created_at": { + "type": "string", + "format": "date-time" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SecurityGroupRuleFields" + } + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Firewall Attachment Model" + } } } }, - "VNC URL Fields": { + "SecurityGroupRuleFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "vnc_url": { - "type": "string" - } - } - }, - "Create Volume Payload": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "environment_name": { - "type": "string" - }, - "description": { + "direction": { "type": "string" }, - "volume_type": { + "protocol": { "type": "string" }, - "size": { + "port_range_min": { "type": "integer" }, - "image_id": { + "port_range_max": { "type": "integer" }, - "callback_url": { + "ethertype": { + "type": "string" + }, + "remote_ip_prefix": { + "type": "string" + }, + "status": { "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Volumes": { + "Firewall Attachment Model": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "status": { "type": "string" }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Volume Fields" - } + "vm": { + "$ref": "#/components/schemas/Firewall Attachment VM Model" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Volume Fields": { + "Firewall Attachment VM Model": { "type": "object", "properties": { "id": { @@ -8680,49 +12462,51 @@ "name": { "type": "string" }, - "environment": { - "$ref": "#/components/schemas/Environment Fields for Volume" - }, - "description": { - "type": "string" - }, - "volume_type": { - "type": "string" - }, - "size": { + "flavor": { "type": "string" }, - "status": { + "environment": { "type": "string" }, - "bootable": { - "type": "boolean" - }, - "image_id": { - "type": "integer" - }, - "callback_url": { + "status": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" - }, - "updated_at": { - "type": "string", - "format": "date-time" } } }, - "Environment Fields for Volume": { + "Create Firewall Rule Payload": { + "required": [ + "direction", + "ethertype", + "protocol", + "remote_ip_prefix" + ], "type": "object", "properties": { - "name": { + "direction": { + "type": "string" + }, + "protocol": { + "type": "string" + }, + "port_range_min": { + "type": "integer" + }, + "port_range_max": { + "type": "integer" + }, + "ethertype": { + "type": "string" + }, + "remote_ip_prefix": { "type": "string" } } }, - "Volume": { + "Firewall Rule": { "type": "object", "properties": { "status": { @@ -8731,12 +12515,12 @@ "message": { "type": "string" }, - "volume": { - "$ref": "#/components/schemas/Volume Fields" + "firewall_rule": { + "$ref": "#/components/schemas/SecurityGroupRuleFields" } } }, - "Volume Types": { + "FirewallDetailResponse": { "type": "object", "properties": { "status": { @@ -8745,18 +12529,18 @@ "message": { "type": "string" }, - "volume_types": { - "type": "array", - "items": { - "type": "string" - } + "firewall": { + "$ref": "#/components/schemas/FirewallDetailFields" } } }, - "Attach Volumes Payload": { + "AttachFirewallWithVM": { + "required": [ + "vms" + ], "type": "object", "properties": { - "volume_ids": { + "vms": { "type": "array", "items": { "type": "integer" @@ -8764,48 +12548,20 @@ } } }, - "Attach Volumes": { + "SetDefaultsPayload": { + "required": [ + "flavors", + "images" + ], "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "volume_attachments": { + "flavors": { "type": "array", "items": { - "$ref": "#/components/schemas/Attach Volume Fields" + "type": "integer" } - } - } - }, - "Attach Volume Fields": { - "type": "object", - "properties": { - "id": { - "type": "integer" }, - "instance_id": { - "type": "integer" - }, - "volume_id": { - "type": "integer" - }, - "status": { - "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" - } - } - }, - "Detach Volumes Payload": { - "type": "object", - "properties": { - "volume_ids": { + "images": { "type": "array", "items": { "type": "integer" @@ -8813,7 +12569,7 @@ } } }, - "Detach Volumes": { + "UserDefaultChoicesForAdminResponse": { "type": "object", "properties": { "status": { @@ -8822,35 +12578,32 @@ "message": { "type": "string" }, - "volume_attachments": { + "user_default_choices": { "type": "array", "items": { - "$ref": "#/components/schemas/Attach Volume Fields" + "$ref": "#/components/schemas/UserDefaultChoiceForAdminFields" } } } }, - "Create GPU": { - "required": [ - "name" - ], + "UserDefaultChoiceForAdminFields": { "type": "object", "properties": { - "name": { + "id": { + "type": "integer" + }, + "region_name": { "type": "string" }, - "regions": { - "type": "array", - "items": { - "type": "string" - } + "flavor_id": { + "type": "integer" }, - "example_metadata": { - "type": "string" + "image_id": { + "type": "integer" } } }, - "GPU List": { + "UserDefaultChoicesForUserResponse": { "type": "object", "properties": { "status": { @@ -8859,110 +12612,86 @@ "message": { "type": "string" }, - "gpu_list": { + "user_default_choices": { "type": "array", "items": { - "$ref": "#/components/schemas/GPU Fields" + "$ref": "#/components/schemas/UserDefaultChoiceForUserFields" } } } }, - "GPU Fields": { + "UserDefaultChoiceForUserFields": { "type": "object", "properties": { - "id": { + "region_id": { "type": "integer" }, - "name": { - "type": "string" - }, - "regions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GPU Region Fields" - } + "environment_id": { + "type": "integer" }, - "example_metadata": { - "type": "string" + "keypair_id": { + "type": "integer" }, - "created_at": { - "type": "string", - "format": "date-time" + "flavor_id": { + "type": "integer" }, - "updated_at": { - "type": "string", - "format": "date-time" + "image_id": { + "type": "integer" } } }, - "GPU Region Fields": { + "AdminAddUpdateImageOrganizationPayload": { + "required": [ + "is_public", + "name", + "openstack_id", + "organizations", + "region_id", + "size", + "type", + "version" + ], "type": "object", "properties": { - "id": { + "name": { + "type": "string" + }, + "openstack_id": { + "type": "string" + }, + "region_id": { "type": "integer" }, - "name": { + "type": { "type": "string" - } - } - }, - "GPU": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "version": { "type": "string" }, - "gpu": { - "$ref": "#/components/schemas/GPU Fields" - } - } - }, - "Update GPU": { - "type": "object", - "properties": { - "name": { + "size": { + "type": "integer" + }, + "is_public": { + "type": "boolean" + }, + "description": { "type": "string" }, - "regions": { + "labels": { "type": "array", "items": { "type": "string" } }, - "example_metadata": { - "type": "string" - } - } - }, - "Attach Callback Payload": { - "required": [ - "url" - ], - "type": "object", - "properties": { - "url": { - "type": "string" - } - } - }, - "Attach Callback Response": { - "type": "object", - "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "url": { - "type": "string" + "organizations": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "InternalInstancesResponse": { + "AdminImageAdminResponse": { "type": "object", "properties": { "status": { @@ -8971,15 +12700,15 @@ "message": { "type": "string" }, - "instances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InternalInstanceFields" - } + "image": { + "$ref": "#/components/schemas/AdminImageAdminResponseImage" } } }, - "InternalInstanceFields": { + "AdminImageAdminResponseImage": { + "required": [ + "organizations" + ], "type": "object", "properties": { "id": { @@ -8991,82 +12720,63 @@ "openstack_id": { "type": "string" }, - "status": { - "type": "string" - }, - "environment": { - "$ref": "#/components/schemas/InternalEnvironmentFields" - }, - "image": { - "$ref": "#/components/schemas/InternalInstanceImageFields" - }, - "flavor": { - "$ref": "#/components/schemas/InternalInstanceFlavorFields" - }, - "keypair": { - "$ref": "#/components/schemas/InternalInstanceKeypairFields" - }, - "volume_attachments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InternalVolumeAttachmentFields" - } - }, - "boot_source": { - "type": "string" + "region_id": { + "type": "integer" }, - "power_state": { + "region_name": { "type": "string" }, - "vm_state": { + "type": { "type": "string" }, - "fixed_ip": { + "version": { "type": "string" }, - "floating_ip": { - "type": "string" + "size": { + "type": "integer" }, - "floating_ip_status": { - "type": "string" + "is_public": { + "type": "boolean" }, - "user_data": { + "description": { "type": "string" }, - "security_rules": { + "labels": { "type": "array", "items": { - "$ref": "#/components/schemas/InternalSecurityRulesFieldsForInstance" + "$ref": "#/components/schemas/LableResonse" } }, - "callback_url": { - "type": "string" - }, "created_at": { "type": "string", "format": "date-time" + }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "InternalEnvironmentFields": { + "AdminImageListAdminResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" + "status": { + "type": "boolean" }, - "region": { + "message": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminImageAdminFields" + } } } }, - "InternalInstanceImageFields": { + "AdminImageAdminFields": { "type": "object", "properties": { "id": { @@ -9075,6 +12785,12 @@ "name": { "type": "string" }, + "openstack_id": { + "type": "string" + }, + "region_id": { + "type": "integer" + }, "region_name": { "type": "string" }, @@ -9083,85 +12799,102 @@ }, "version": { "type": "string" + }, + "size": { + "type": "integer" + }, + "is_public": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LableResonse" + } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "InternalInstanceFlavorFields": { + "AddUpdateFlavorOrganizationPayload": { + "required": [ + "cpu", + "disk", + "gpu_count", + "gpu_id", + "is_public", + "name", + "openstack_id", + "organizations", + "ram", + "region_id" + ], "type": "object", "properties": { - "id": { - "type": "integer" - }, "name": { "type": "string" }, - "region_name": { + "description": { "type": "string" }, + "openstack_id": { + "type": "string" + }, + "region_id": { + "type": "integer" + }, "cpu": { "type": "integer" }, "ram": { - "type": "integer" + "type": "number" }, "disk": { "type": "integer" }, - "gpu": { - "type": "string" - }, - "gpu_count": { + "ephemeral": { "type": "integer" }, - "created_at": { - "type": "string", - "format": "date-time" - } - } - }, - "InternalInstanceKeypairFields": { - "type": "object", - "properties": { - "id": { + "gpu_id": { "type": "integer" }, - "name": { - "type": "string" - }, - "environment": { - "type": "string" - }, - "public_key": { - "type": "string" + "gpu_count": { + "type": "integer" }, - "fingerprint": { - "type": "string" + "is_public": { + "type": "boolean" }, - "created_at": { - "type": "string", - "format": "date-time" + "organizations": { + "type": "array", + "items": { + "type": "integer" + } } } }, - "InternalVolumeAttachmentFields": { + "FlavorAdminResponse": { "type": "object", "properties": { - "volume": { - "$ref": "#/components/schemas/InternalVolumeFields" - }, "status": { - "type": "string" + "type": "boolean" }, - "device": { + "message": { "type": "string" }, - "created_at": { - "type": "string", - "format": "date-time" + "flavor": { + "$ref": "#/components/schemas/FlavorAdminResponseFlavors" } } }, - "InternalVolumeFields": { + "FlavorAdminResponseFlavors": { + "required": [ + "organizations" + ], "type": "object", "properties": { "id": { @@ -9173,48 +12906,70 @@ "description": { "type": "string" }, - "volume_type": { + "openstack_id": { "type": "string" }, - "size": { - "type": "string" - } - } - }, - "InternalSecurityRulesFieldsForInstance": { - "type": "object", - "properties": { - "id": { + "region_id": { "type": "integer" }, - "direction": { + "region": { "type": "string" }, - "protocol": { - "type": "string" + "cpu": { + "type": "integer" }, - "port_range_min": { + "ram": { + "type": "number" + }, + "disk": { "type": "integer" }, - "port_range_max": { + "ephemeral": { "type": "integer" }, - "ethertype": { + "gpu": { "type": "string" }, - "remote_ip_prefix": { - "type": "string" + "gpu_count": { + "type": "integer" + }, + "order": { + "type": "integer" + }, + "is_public": { + "type": "boolean" + }, + "is_custom": { + "type": "boolean" }, "status": { "type": "string" }, + "organizations": { + "type": "array", + "items": { + "type": "integer" + } + }, + "flavors": { + "type": "array", + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "items": { + "type": "string" + } + }, "created_at": { "type": "string", "format": "date-time" } } }, - "InternalVolumesResponse": { + "AdminFlavorResourcesList": { "type": "object", "properties": { "status": { @@ -9223,29 +12978,15 @@ "message": { "type": "string" }, - "volumes": { + "flavors": { "type": "array", "items": { - "$ref": "#/components/schemas/InternalVolumeFields" + "$ref": "#/components/schemas/AdminFlavorResource" } } } }, - "RegionPayload": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "Regions": { + "FlavorDetailResponse": { "type": "object", "properties": { "status": { @@ -9254,137 +12995,114 @@ "message": { "type": "string" }, - "regions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Region Fields" - } + "flavor": { + "$ref": "#/components/schemas/AdminFlavorDetailFields" } } }, - "Region Fields": { + "AdminFlavorDetailFields": { "type": "object", "properties": { "id": { "type": "integer" }, + "openstack_id": { + "type": "string" + }, "name": { "type": "string" }, - "description": { + "region_name": { "type": "string" - } - } - }, - "RegionResponse": { - "type": "object", - "properties": { - "status": { - "type": "boolean" }, - "message": { + "cpu": { + "type": "integer" + }, + "ram": { + "type": "number" + }, + "disk": { + "type": "integer" + }, + "gpu": { "type": "string" }, - "region": { - "$ref": "#/components/schemas/Region Fields" - } - } - }, - "Templates": { - "type": "object", - "properties": { "status": { + "type": "string" + }, + "gpu_count": { + "type": "integer" + }, + "stock_available": { + "type": "boolean" + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminFlavorDetailNodeFields" + } + }, + "vms": { + "type": "array", + "items": { + "type": "integer" + } + }, + "is_public": { "type": "boolean" }, - "message": { - "type": "string" + "is_custom": { + "type": "boolean" }, - "templates": { + "org_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/Template Fields" + "type": "integer" } - } - } - }, - "Template Fields": { - "type": "object", - "properties": { - "id": { - "type": "integer" }, - "name": { - "type": "string" + "ephemeral": { + "type": "integer" }, "description": { "type": "string" }, - "content": { - "type": "string" - }, - "is_public": { - "type": "boolean" - }, "created_at": { "type": "string", "format": "date-time" } } }, - "Template": { + "AdminFlavorDetailNodeFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "openstack_id": { "type": "string" }, - "template": { - "$ref": "#/components/schemas/Template Fields" - } - } - }, - "Update Template": { - "type": "object", - "properties": { "name": { "type": "string" }, - "description": { - "type": "string" - }, - "is_public": { - "type": "boolean" - } - } - }, - "Start Deployment Payload": { - "required": [ - "description", - "name", - "template_id" - ], - "type": "object", - "properties": { - "name": { - "type": "string" + "available": { + "type": "integer" }, - "description": { + "status": { "type": "string" }, - "template_id": { - "type": "integer" + "provision_date": { + "type": "string", + "format": "date-time" }, - "variables": { - "type": "object", - "additionalProperties": { + "projects": { + "type": "array", + "items": { "type": "string" } } } }, - "Deployments": { + "FlavorVMsResponse": { "type": "object", "properties": { "status": { @@ -9393,29 +13111,32 @@ "message": { "type": "string" }, - "deployments": { + "flavor_vms": { "type": "array", "items": { - "$ref": "#/components/schemas/Deployment Fields" + "$ref": "#/components/schemas/FlavorVMFields" } } } }, - "Deployment Fields": { + "FlavorVMFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { + "openstack_id": { "type": "string" }, - "description": { + "name": { "type": "string" }, - "template": { + "host": { "type": "string" }, + "org_id": { + "type": "integer" + }, "status": { "type": "string" }, @@ -9425,21 +13146,18 @@ } } }, - "Start Deployment": { + "AdminBootstrapEnvironmentPayload": { + "required": [ + "org_id" + ], "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "deployment": { - "$ref": "#/components/schemas/Deployment Fields for start deployments" + "org_id": { + "type": "integer" } } }, - "Deployment Fields for start deployments": { + "PricebookModel": { "type": "object", "properties": { "id": { @@ -9448,63 +13166,98 @@ "name": { "type": "string" }, - "description": { - "type": "string" + "value": { + "type": "number" }, - "template": { - "type": "string" + "original_value": { + "type": "number" }, - "status": { - "type": "string" + "discount_applied": { + "type": "boolean" }, - "variables": { - "type": "string" + "start_time": { + "type": "string", + "format": "date-time" }, - "created_at": { + "end_time": { "type": "string", "format": "date-time" } } }, - "Security Rules Protocol Fields": { + "CreateDiscountsPayload": { + "required": [ + "customers", + "discount_resources", + "discount_status" + ], "type": "object", "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" + "customers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomerPayload" + } }, - "protocols": { + "discount_resources": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ResourcePayload" } + }, + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "discount_status": { + "type": "string" } } }, - "Create Profile Payload": { + "CustomerPayload": { "required": [ - "data", - "name" + "id", + "plan_type" ], "type": "object", "properties": { - "name": { + "id": { + "type": "integer" + }, + "plan_type": { "type": "string" + } + } + }, + "ResourcePayload": { + "required": [ + "discount_type", + "resource_id" + ], + "type": "object", + "properties": { + "resource_id": { + "type": "integer" }, - "description": { + "discount_percent": { + "type": "number" + }, + "discount_type": { "type": "string" }, - "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "discount_amount": { + "type": "number" + }, + "resource_count": { + "type": "integer" } } }, - "Profile List Response": { + "GetAllDiscountForAllOrganizationResponse": { "type": "object", "properties": { "status": { @@ -9513,281 +13266,211 @@ "message": { "type": "string" }, - "profiles": { + "discount_plans": { "type": "array", "items": { - "$ref": "#/components/schemas/Profile Fields" + "$ref": "#/components/schemas/GetAllDiscountsFields" } } } }, - "Profile Fields": { + "GetAllDiscountsFields": { "type": "object", "properties": { - "id": { + "org_id": { "type": "integer" }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "data": { + "org_name": { "type": "string" }, - "created_at": { + "start_date": { "type": "string", "format": "date-time" - } - } - }, - "Create Profile Response": { - "type": "object", - "properties": { - "status": { - "type": "boolean" - }, - "message": { - "type": "string" }, - "profile": { - "$ref": "#/components/schemas/Profile Fields" - } - } - }, - "Organization Resource List": { - "type": "object", - "properties": { - "status": { - "type": "boolean" + "end_date": { + "type": "string", + "format": "date-time" }, - "message": { + "discount_status": { "type": "string" }, - "organizations": { + "discount_resources": { "type": "array", "items": { - "$ref": "#/components/schemas/Organization Resources" + "$ref": "#/components/schemas/DiscountResourceFields" } } } }, - "Organization Resources": { + "DiscountResourceFields": { "type": "object", "properties": { - "organization_id": { + "resource_id": { "type": "integer" }, - "environments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Envrionment Resources" - } + "discount_percent": { + "type": "number" } } }, - "Envrionment Resources": { + "CreateDiscountResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" + "status": { + "type": "boolean" }, - "region": { + "message": { "type": "string" }, - "instances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Instance Resources" - } - }, - "volumes": { + "discount_plan": { + "$ref": "#/components/schemas/InsertDiscountPlanFields" + } + } + }, + "InsertDiscountPlanFields": { + "type": "object", + "properties": { + "customers": { "type": "array", "items": { - "$ref": "#/components/schemas/Volume Resource" + "$ref": "#/components/schemas/CustomerFields" } }, - "containers": { + "discount_resources": { "type": "array", "items": { - "$ref": "#/components/schemas/Container Resource" + "$ref": "#/components/schemas/DiscountResourceFields" } }, - "clusters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Cluster Resource" - } + "start_date": { + "type": "string", + "format": "date-time" }, - "created_at": { + "end_date": { "type": "string", "format": "date-time" + }, + "discount_status": { + "type": "string" } } }, - "Instance Resources": { + "CustomerFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { - "type": "string" - }, - "host": { - "type": "string" - }, - "status": { - "type": "string" - }, - "flavor": { - "$ref": "#/components/schemas/Flavor Resource" - }, - "image_id": { - "type": "integer" - }, - "volume_id": { - "type": "integer" - }, - "keypair_name": { - "type": "string" - }, - "fixed_ip": { - "type": "string" - }, - "floating_ip": { - "type": "string" - }, - "floating_ip_status": { + "plan_type": { "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "Flavor Resource": { + "UpdateDiscountsPayload": { + "required": [ + "discount_resources", + "discount_status" + ], "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "cpu": { - "type": "integer" + "discount_resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourcePayload" + } }, - "ram": { - "type": "number" + "start_date": { + "type": "string", + "format": "date-time" }, - "disk": { - "type": "integer" + "end_date": { + "type": "string", + "format": "date-time" }, - "gpu": { + "discount_status": { "type": "string" - }, - "gpu_count": { - "type": "integer" } } }, - "Volume Resource": { + "GetEntityDiscountDetailResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "size": { - "type": "integer" - }, "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "bootable": { - "type": "boolean" + "organization": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscountPlanFields" + } }, - "created_at": { - "type": "string", - "format": "date-time" + "virtual-machine": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscountPlanFields" + } } } }, - "Container Resource": { + "DiscountPlanFields": { "type": "object", "properties": { "id": { "type": "integer" }, - "name": { + "resource_id": { + "type": "integer" + }, + "resource_name": { "type": "string" }, - "flavor": { - "$ref": "#/components/schemas/Flavor Resource" + "resource_count": { + "type": "integer" }, - "status": { + "discount_type": { "type": "string" }, - "image": { + "discount_code": { "type": "string" }, - "fixed_ip": { - "type": "string" + "discount_percent": { + "type": "number" }, - "floating_ip": { - "type": "string" + "discount_amount": { + "type": "number" }, - "created_at": { - "type": "string", - "format": "date-time" + "discount_status": { + "type": "string" } } }, - "Cluster Resource": { + "SuccessResponseModel": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "name": { - "type": "string" + "status": { + "type": "boolean", + "default": false }, - "kubernetes_version": { + "message": { "type": "string" - }, - "status": { + } + } + }, + "UpdateDiscountsStatusPayload": { + "required": [ + "discount_status" + ], + "type": "object", + "properties": { + "discount_status": { "type": "string" - }, - "master_count": { - "type": "integer" - }, - "node_count": { - "type": "integer" - }, - "node_flavor": { - "$ref": "#/components/schemas/Flavor Resource" - }, - "enable_public_ip": { - "type": "boolean" - }, - "created_at": { - "type": "string", - "format": "date-time" } } }, - "Organization Resource Response": { + "GetDiscountResponse": { "type": "object", "properties": { "status": { @@ -9796,43 +13479,42 @@ "message": { "type": "string" }, - "organization": { - "$ref": "#/components/schemas/Organization Resources" + "discount_entites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DiscountFields" + } } } }, - "CompliancePayload": { - "required": [ - "base_value", - "gpu_model", - "resource_type", - "variation_max", - "variation_min", - "variation_unit" - ], + "DiscountFields": { "type": "object", "properties": { - "gpu_model": { + "org_id": { + "type": "integer" + }, + "org_name": { "type": "string" }, - "resource_type": { + "plan_type": { "type": "string" }, - "base_value": { + "vm_id": { "type": "integer" }, - "variation_min": { - "type": "integer" + "vm_name": { + "type": "string" }, - "variation_max": { - "type": "integer" + "end_date": { + "type": "string", + "format": "date-time" }, - "variation_unit": { - "type": "integer" + "discount_status": { + "type": "string" } } }, - "ComplianceResponse": { + "GetDiscountDetailResponse": { "type": "object", "properties": { "status": { @@ -9841,109 +13523,153 @@ "message": { "type": "string" }, - "compliance": { - "$ref": "#/components/schemas/ComplianceFields" + "discounts_entity": { + "$ref": "#/components/schemas/DiscountEntityModel" } } }, - "ComplianceFields": { + "DiscountEntityModel": { "type": "object", "properties": { - "gpu_model": { + "entity": { "type": "string" }, - "cpu": { + "data": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/DiscountPlanFields" } + } + } + }, + "BillingResponse": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "ram": { + "calculated_bills": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/OrganizationObjectResponse" } + } + } + }, + "OrganizationObjectResponse": { + "type": "object", + "properties": { + "org_id": { + "type": "integer" }, - "hdd": { + "resources": { "type": "array", "items": { - "type": "integer" + "$ref": "#/components/schemas/InfrahubResourceObjectResponse" } } } }, - "CreateUpdateComplianceResponse": { + "InfrahubResourceObjectResponse": { "type": "object", "properties": { + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "infrahub_id": { + "type": "integer" + }, "status": { - "type": "boolean" + "type": "string" + }, + "host": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PricebookResourceObjectResponse" + } + }, + "price": { + "type": "number" + }, + "actual_price": { + "type": "number" + }, + "host_price": { + "type": "number" + }, + "actual_host_price": { + "type": "number" }, - "message": { - "type": "string" + "nexgen_price": { + "type": "number" }, - "compliance": { - "$ref": "#/components/schemas/ComplianceModelFields" + "nexgen_actual_price": { + "type": "number" } } }, - "ComplianceModelFields": { + "PricebookResourceObjectResponse": { "type": "object", "properties": { - "id": { - "type": "integer" - }, - "gpu_model": { + "type": { "type": "string" }, - "resource_type": { + "name": { "type": "string" }, - "base_value": { + "amount": { "type": "integer" }, - "variation_min": { - "type": "integer" + "rate": { + "type": "number" }, - "variation_max": { - "type": "integer" + "discounted_rate": { + "type": "number" }, - "variation_unit": { - "type": "integer" - } - } - }, - "Pricebook Model": { - "type": "object", - "properties": { - "id": { - "type": "integer" + "price": { + "type": "number" }, - "name": { - "type": "string" + "actual_price": { + "type": "number" }, - "value": { + "host_price": { "type": "number" }, - "original_value": { + "host_original_price": { "type": "number" }, - "discount_applied": { + "nexgen_price": { + "type": "number" + }, + "nexgen_original_price": { + "type": "number" + } + } + }, + "GetVersionResponse": { + "type": "object", + "properties": { + "status": { "type": "boolean" }, - "start_time": { - "type": "string", - "format": "date-time" + "message": { + "type": "string" }, - "end_time": { - "type": "string", - "format": "date-time" + "version": { + "type": "string" } } }, - "CreateDiscountsPayload": { + "CreateContractPayload": { "required": [ "discount_resources", - "discount_status", + "expiration_policy", "org_id" ], "type": "object", @@ -9951,6 +13677,9 @@ "org_id": { "type": "integer" }, + "description": { + "type": "string" + }, "discount_resources": { "type": "array", "items": { @@ -9965,27 +13694,12 @@ "type": "string", "format": "date-time" }, - "discount_status": { - "type": "string" - } - } - }, - "ResourcePayload": { - "required": [ - "discount_percent", - "resource_id" - ], - "type": "object", - "properties": { - "resource_id": { + "expiration_policy": { "type": "integer" - }, - "discount_percent": { - "type": "number" } } }, - "CreateDiscountResponse": { + "GetContractsListResponseModel": { "type": "object", "properties": { "status": { @@ -9994,25 +13708,28 @@ "message": { "type": "string" }, - "discount_plan": { - "$ref": "#/components/schemas/InsertDiscountPlanFields" + "contracts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdminContractFields" + } + }, + "count": { + "type": "integer" } } }, - "InsertDiscountPlanFields": { + "AdminContractFields": { "type": "object", "properties": { - "org_id": { + "id": { "type": "integer" }, "org_name": { "type": "string" }, - "discount_resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DiscountResourceFields" - } + "description": { + "type": "string" }, "start_date": { "type": "string", @@ -10022,46 +13739,92 @@ "type": "string", "format": "date-time" }, - "discount_status": { + "expiration_policy": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "gpu_name": { + "type": "string" + }, + "percent": { + "type": "number" + }, + "amount": { + "type": "number" + }, + "discount_type": { "type": "string" + }, + "resource_count": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "DiscountResourceFields": { + "AdminCreateContractResponseModel": { "type": "object", "properties": { - "resource_id": { - "type": "integer" + "status": { + "type": "boolean" }, - "discount_percent": { - "type": "number" + "message": { + "type": "string" + }, + "contract": { + "$ref": "#/components/schemas/CreateContarctFields" } } }, - "GetAllDiscountForAllOrganizationResponse": { + "CreateContarctFields": { "type": "object", "properties": { - "status": { - "type": "boolean" + "id": { + "type": "integer" }, - "message": { + "org_id": { + "type": "integer" + }, + "description": { "type": "string" }, + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "expiration_policy": { + "type": "integer" + }, "discount_plans": { "type": "array", "items": { - "$ref": "#/components/schemas/InsertDiscountPlanFields" + "$ref": "#/components/schemas/DiscountPlanFields" } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "UpdateDiscountsPayload": { + "UpdateContractPayload": { "required": [ "discount_resources", - "discount_status" + "expiration_policy" ], "type": "object", "properties": { + "description": { + "type": "string" + }, "discount_resources": { "type": "array", "items": { @@ -10076,24 +13839,12 @@ "type": "string", "format": "date-time" }, - "discount_status": { - "type": "string" - } - } - }, - "SuccessResponseModel": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" + "expiration_policy": { + "type": "integer" } } }, - "DiscountDetailResponse": { + "GetContractDetailResponseModel": { "type": "object", "properties": { "status": { @@ -10102,132 +13853,166 @@ "message": { "type": "string" }, - "discount_plan": { + "contract": { + "$ref": "#/components/schemas/AdminGetContractDetailFields" + }, + "discount_plans": { "type": "array", "items": { - "$ref": "#/components/schemas/InsertDiscountPlanFields" + "$ref": "#/components/schemas/DiscountPlanFields" } } } }, - "UpdateDiscountsStatusPayload": { - "required": [ - "discount_status" - ], + "AdminGetContractDetailFields": { "type": "object", "properties": { - "discount_status": { + "id": { + "type": "integer" + }, + "org_id": { + "type": "integer" + }, + "description": { "type": "string" + }, + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "expiration_policy": { + "type": "integer" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Billing Response": { + "GetCustomerContractsListResponseModel": { "type": "object", "properties": { - "type": { + "status": { + "type": "boolean" + }, + "message": { "type": "string" }, - "calculated_bills": { + "contracts": { "type": "array", "items": { - "$ref": "#/components/schemas/Organization Object Response" + "$ref": "#/components/schemas/CustomerContractFields" } + }, + "count": { + "type": "integer" } } }, - "Organization Object Response": { + "CustomerContractFields": { "type": "object", "properties": { + "id": { + "type": "integer" + }, "org_id": { "type": "integer" }, - "resources": { + "description": { + "type": "string" + }, + "start_date": { + "type": "string", + "format": "date-time" + }, + "end_date": { + "type": "string", + "format": "date-time" + }, + "expiration_policy": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "discounts": { "type": "array", "items": { - "$ref": "#/components/schemas/Infrahub Resource Object Response" + "$ref": "#/components/schemas/DiscountPlanFields" } + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, - "Infrahub Resource Object Response": { + "CustomerContractDetailResponseModel": { "type": "object", "properties": { - "type": { - "type": "string" + "status": { + "type": "boolean" }, - "name": { + "message": { "type": "string" }, - "infrahub_id": { - "type": "integer" - }, + "contracts": { + "$ref": "#/components/schemas/CustomerContractFields" + } + } + }, + "GetContractEventsResponseModel": { + "type": "object", + "properties": { "status": { - "type": "string" + "type": "boolean" }, - "host": { + "message": { "type": "string" }, - "resources": { + "contract_events": { "type": "array", "items": { - "$ref": "#/components/schemas/Pricebook Resource Object Response" + "$ref": "#/components/schemas/AdminContractEventFields" } }, - "price": { - "type": "number" - }, - "actual_price": { - "type": "number" - }, - "host_price": { - "type": "number" - }, - "actual_host_price": { - "type": "number" - }, - "nexgen_price": { - "type": "number" - }, - "nexgen_actual_price": { - "type": "number" + "count": { + "type": "integer" } } }, - "Pricebook Resource Object Response": { + "AdminContractEventFields": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "amount": { + "id": { "type": "integer" }, - "rate": { - "type": "number" - }, - "discounted_rate": { - "type": "number" + "user_id": { + "type": "integer" }, - "price": { - "type": "number" + "org_id": { + "type": "integer" }, - "actual_price": { - "type": "number" + "time": { + "type": "string", + "format": "date-time" }, - "host_price": { - "type": "number" + "type": { + "type": "string" }, - "host_original_price": { - "type": "number" + "reason": { + "type": "string" }, - "nexgen_price": { - "type": "number" + "message": { + "type": "string" }, - "nexgen_original_price": { - "type": "number" + "created_at": { + "type": "string", + "format": "date-time" } } }, @@ -10378,6 +14163,172 @@ }, "active": { "type": "boolean" + }, + "exclude_billing": { + "type": "boolean" + } + } + }, + "Exclude billing post payload": { + "required": [ + "exclude", + "resource_id" + ], + "type": "object", + "properties": { + "resource_id": { + "type": "integer" + }, + "exclude": { + "type": "boolean" + } + } + }, + "Exclude billing post response": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/Exclude billing post payload" + } + } + }, + "Billing immune resources response": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Billing immune resources" + } + } + } + }, + "Billing immune resources": { + "type": "object", + "properties": { + "resource_id": { + "type": "integer" + }, + "resource_type": { + "type": "string" + }, + "organization_id": { + "type": "integer" + } + } + }, + "Admin payment history response": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "status": { + "type": "boolean" + }, + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Admin payment history fields" + } + } + } + }, + "Admin payment history fields": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "medium": { + "type": "string" + }, + "status": { + "type": "string" + }, + "transaction_id": { + "type": "string" + }, + "payment_id": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "UsersInfoListResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "users_info": { + "$ref": "#/components/schemas/UsersInfoFields" + } + } + }, + "UsersInfoFields": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "organization_id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "business": { + "type": "boolean" + }, + "company_name": { + "type": "string" + }, + "vat_number": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "billing_address1": { + "type": "string" + }, + "billing_address2": { + "type": "string" + }, + "zip_code": { + "type": "string" + }, + "country": { + "type": "string" + }, + "state": { + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time" } } }, @@ -10487,16 +14438,73 @@ "type": "string" } } + }, + "User info post payload": { + "required": [ + "business", + "country", + "zip_code" + ], + "type": "object", + "properties": { + "business": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "company_name": { + "type": "string" + }, + "vat_number": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "billing_address1": { + "type": "string" + }, + "billing_address2": { + "type": "string" + }, + "zip_code": { + "type": "string" + }, + "country": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "AddUserInfoSuccessResponseModel": { + "type": "object", + "properties": { + "status": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "data": { + "$ref": "#/components/schemas/UsersInfoFields" + } + } } }, "responses": { - "MaskError": { - "description": "When any error occurs on mask", - "content": {} - }, "ParseError": { "description": "When a mask can't be parsed", "content": {} + }, + "MaskError": { + "description": "When any error occurs on mask", + "content": {} } }, "securitySchemes": { @@ -10513,5 +14521,6 @@ "in": "header" } } - } + }, + "x-original-swagger-version": "2.0" } diff --git a/openapi/config.yaml b/openapi/config.yaml new file mode 100644 index 0000000..0369cc6 --- /dev/null +++ b/openapi/config.yaml @@ -0,0 +1,6 @@ +generatorName: python +inputSpec: /local/openapi/api.json +outputDir: /local/ +additionalProperties: + packageName: hyperstack + packageVersion: 1.0.0 diff --git a/patch.jq b/openapi/patch.jq similarity index 97% rename from patch.jq rename to openapi/patch.jq index 4b1d8e0..b9dac65 100644 --- a/patch.jq +++ b/openapi/patch.jq @@ -10,4 +10,5 @@ walk(if type == "object" then with_entries( if .key == "$ref" then .value |= gsub(" |%20"; "") else . end) else . end) | # Remove duplicate tags -.tags |= (map(.key = .name | .value = .description) | from_entries | to_entries | map(.name = .key | .description = .value | del(.key, .value))) +.tags |= (map(.key = .name | .value = .description) | from_entries | to_entries | map(.name = .key | .description = .value | del(.key, .value))) | +. From 53d9e7b3a73a59479d8d666fdd2b8d036ecaa3ad Mon Sep 17 00:00:00 2001 From: Grzegorz Szczudlik <2914011+szczad@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:21:35 +0200 Subject: [PATCH 2/3] chore(api): Update API definition --- .openapi-generator/FILES | 713 ++++++- .openapi-generator/VERSION | 2 +- Makefile | 5 +- README.md | 324 +++- docs/APIKeyFields.md | 12 +- docs/APIKeyPayload.md | 29 - docs/AddUpdateFlavorOrganizationPayload.md | 40 + docs/AddUserInfoSuccessResponseModel.md | 31 + .../AdminAddUpdateImageOrganizationPayload.md | 38 + docs/AdminBootstrapEnvironmentPayload.md | 29 + ...terResource.md => AdminClusterResource.md} | 18 +- ...rResource.md => AdminContainerResource.md} | 18 +- docs/AdminContractEventFields.md | 36 + docs/AdminContractFields.md | 41 + docs/AdminCountResourcesOrganization.md | 33 + docs/AdminCountResourcesOrganizations.md | 29 + docs/AdminCreateContractResponseModel.md | 31 + docs/AdminEnvrionmentResources.md | 36 + docs/AdminFlavorDetailFields.md | 47 + docs/AdminFlavorDetailNodeFields.md | 35 + docs/AdminFlavorResource.md | 46 + docs/AdminFlavorResourcesList.md | 31 + docs/AdminGetContractDetailFields.md | 35 + docs/AdminGetVersionResponse.md | 31 + ...AdminHibernationRestorationPayloadModel.md | 32 + docs/AdminImageAdminFields.md | 40 + docs/AdminImageAdminResponse.md | 31 + docs/AdminImageAdminResponseImage.md | 41 + docs/AdminImageListAdminResponse.md | 31 + ...Resources.md => AdminInstanceResources.md} | 20 +- docs/AdminNodeResource.md | 35 + docs/AdminOrganizationResourceList.md | 31 + docs/AdminOrganizationResourceResponse.md | 31 + docs/AdminOrganizationResources.md | 30 + docs/AdminOrganizationResponseModel.md | 31 + docs/AdminOrganizationSummaryFields.md | 31 + docs/AdminOrganizationsResponseModel.md | 32 + .../AdminOrganizationsSummaryResponseModel.md | 31 + docs/AdminUserFields.md | 35 + docs/AdminUserResponseModel.md | 31 + docs/AdminUsersResponseModel.md | 31 + docs/AdminVersionResponseModel.md | 31 + ...lumeResource.md => AdminVolumeResource.md} | 17 +- docs/Adminaddorganizationpayload.md | 2 +- docs/Admincreditpostpayload.md | 2 +- docs/Adminpaymenthistoryfields.md | 34 + docs/Adminpaymenthistoryresponse.md | 31 + docs/Adminrechargehistoryfields.md | 2 +- docs/Adminrechargehistoryresponse.md | 2 +- docs/Adminthresholdpostpayload.md | 2 +- docs/ApiKeyApi.md | 16 +- docs/ApiKeyVerifyFields.md | 2 +- docs/AssignRBACRolePayload.md | 12 +- docs/AssigningMemberRoleApi.md | 22 +- docs/AttachCallbackPayload.md | 2 +- docs/AttachCallbackResponse.md | 2 +- docs/AttachFirewallWithVM.md | 29 + docs/AttachFirewallsToVMPayload.md | 29 + docs/AttachVolumeFields.md | 2 +- docs/AttachVolumes.md | 2 +- docs/AttachVolumesPayload.md | 2 +- docs/AuthApi.md | 6 +- docs/AuthGetTokenResponseModel.md | 32 + docs/AuthRequestLoginFields.md | 30 + docs/AuthRequestLoginResponseModel.md | 31 + docs/{UserFields.md => AuthUserFields.md} | 16 +- docs/AuthUserInfoResponseModel.md | 31 + docs/BillingResponse.md | 2 +- docs/Billingimmuneresources.md | 31 + docs/Billingimmuneresourcesresponse.md | 31 + docs/Billingmetricesfields.md | 3 +- docs/Billingmetricesresponse.md | 2 +- docs/CallbacksApi.md | 118 +- docs/CommonResponseModel.md | 30 + docs/ComplianceApi.md | 26 +- docs/ComplianceFields.md | 2 +- docs/ComplianceModelFields.md | 2 +- docs/CompliancePayload.md | 2 +- docs/ComplianceResponse.md | 2 +- docs/ContainerOverviewFields.md | 2 +- docs/ContractInstanceFields.md | 34 + docs/ContractInstancesResponse.md | 31 + docs/CreateContarctFields.md | 36 + docs/CreateContractPayload.md | 34 + docs/CreateDiscountResponse.md | 2 +- docs/CreateDiscountsPayload.md | 4 +- docs/CreateEnvironment.md | 6 +- docs/CreateFirewallPayload.md | 31 + docs/CreateFirewallRulePayload.md | 34 + docs/CreateGPU.md | 4 +- docs/CreateInstancesPayload.md | 26 +- docs/CreateProfilePayload.md | 8 +- docs/CreateProfileResponse.md | 2 +- docs/CreateSecurityRulePayload.md | 10 +- docs/CreateUpdateComplianceResponse.md | 2 +- docs/CreateUpdatePermissionPayload.md | 32 + docs/CreateUpdatePermissionResponseModel.md | 31 + docs/CreateUpdatePolicyPayload.md | 32 + docs/CreateUpdatePolicyResponseModel.md | 31 + docs/CreateUpdateRbacRolePayload.md | 32 + docs/CreateVolumePayload.md | 16 +- docs/CustomerContractApi.md | 189 ++ docs/CustomerContractDetailResponseModel.md | 31 + docs/CustomerContractFields.md | 37 + docs/CustomerFields.md | 30 + docs/CustomerPayload.md | 30 + docs/DashboardApi.md | 18 +- docs/DashboardInfoResponse.md | 2 +- docs/DeploymentFields.md | 2 +- docs/DeploymentFieldsforstartdeployments.md | 2 +- docs/Deployments.md | 2 +- docs/DetachVolumes.md | 2 +- docs/DetachVolumesPayload.md | 2 +- docs/DiscountDetailResponse.md | 31 - docs/DiscountEntityModel.md | 30 + docs/DiscountFields.md | 35 + docs/DiscountPlanFields.md | 37 + docs/DiscountResourceFields.md | 2 +- docs/EditlabelofanexistingVMPayload.md | 29 + docs/Environment.md | 2 +- docs/EnvironmentApi.md | 112 +- docs/EnvironmentFields.md | 2 +- docs/EnvironmentFieldsforVolume.md | 2 +- docs/Environments.md | 2 +- docs/EnvrionmentResources.md | 36 - docs/ErrorResponseModel.md | 2 +- docs/Excludebillingpostpayload.md | 30 + docs/Excludebillingpostresponse.md | 31 + docs/FirewallAttachmentApi.md | 102 + docs/FirewallAttachmentModel.md | 32 + docs/FirewallAttachmentVMModel.md | 34 + docs/FirewallDetailFields.md | 36 + docs/FirewallDetailResponse.md | 31 + docs/FirewallEnvironmentFields.md | 31 + docs/FirewallFields.md | 34 + ...etTokenResponse.md => FirewallResponse.md} | 18 +- docs/{APIKeygeneration.md => FirewallRule.md} | 18 +- docs/FirewallsApi.md | 551 ++++++ docs/FirewallsListResponse.md | 31 + docs/FlavorAdminResponse.md | 31 + docs/FlavorAdminResponseFlavors.md | 48 + docs/FlavorApi.md | 20 +- docs/FlavorDetailResponse.md | 31 + docs/FlavorFields.md | 3 +- docs/FlavorItemGetResponse.md | 2 +- docs/FlavorListResponse.md | 2 +- docs/FlavorObjectFields.md | 2 +- docs/FlavorPayload.md | 2 +- docs/FlavorResource.md | 35 - docs/FlavorResponse.md | 2 +- docs/FlavorVMFields.md | 35 + docs/FlavorVMsResponse.md | 31 + docs/FloatingIpApi.md | 38 +- docs/FutureNodeModel.md | 4 +- docs/FutureNodeResponseModel.md | 2 +- docs/FutureNodeStockModel.md | 2 +- docs/FutureNodeUpdateModel.md | 2 +- docs/FutureNodesStockModel.md | 2 +- docs/GPU.md | 2 +- docs/GPUFields.md | 2 +- docs/GPUList.md | 2 +- docs/GPURegionFields.md | 2 +- docs/GenerateApiKeyResponseModel.md | 31 + ...etAllDiscountForAllOrganizationResponse.md | 4 +- docs/GetAllDiscountsFields.md | 34 + docs/GetApiKeyResponseModel.md | 31 + docs/GetContractDetailResponseModel.md | 32 + docs/GetContractEventsResponseModel.md | 32 + docs/GetContractsListResponseModel.md | 32 + docs/GetCustomerContractsListResponseModel.md | 32 + docs/GetDiscountDetailResponse.md | 31 + docs/GetDiscountResponse.md | 31 + docs/GetEntityDiscountDetailResponse.md | 32 + ...{Invites.md => GetInvitesResponseModel.md} | 16 +- docs/GetOrganizationResponseModel.md | 31 + ...ions.md => GetPermissionsResponseModel.md} | 16 +- ...olicies.md => GetPoliciesResponseModel.md} | 16 +- docs/GetRbacRolesResponseModel.md | 31 + docs/{GetToken.md => GetTokenPayload.md} | 16 +- docs/GetUserPermissionsResponseModel.md | 31 + docs/GetVersionResponse.md | 31 + docs/Getcreditandthresholdinfo.md | 2 +- docs/Getcreditandthresholdinfoinresponse.md | 2 +- docs/GpuApi.md | 20 +- docs/ImageApi.md | 20 +- docs/ImageFields.md | 5 +- docs/ImageGetResponse.md | 2 +- docs/ImageLogos.md | 2 +- docs/Images.md | 2 +- docs/ImportKeypairPayload.md | 8 +- docs/ImportKeypairResponse.md | 2 +- docs/InfrahubResourceObjectResponse.md | 2 +- docs/InsertDiscountPlanFields.md | 5 +- docs/Instance.md | 4 +- docs/{Invite.md => InstanceAdmin.md} | 18 +- docs/InstanceAdminFields.md | 7 +- docs/InstanceEnvironmentFields.md | 3 +- docs/InstanceEvents.md | 2 +- docs/InstanceEventsFields.md | 2 +- docs/InstanceFields.md | 47 + docs/InstanceFlavorFields.md | 3 +- docs/InstanceImageFields.md | 2 +- docs/InstanceKeypairFields.md | 2 +- docs/InstanceOverviewFields.md | 2 +- docs/InstanceResizePayload.md | 2 +- docs/Instances.md | 5 +- docs/{APIKey.md => InstancesAdmin.md} | 19 +- docs/InstancesSummaryAdmin.md | 31 + docs/InstancesSummaryFields.md | 45 + docs/InternalEnvironmentFields.md | 2 +- docs/InternalInstanceFields.md | 2 +- docs/InternalInstanceFlavorFields.md | 2 +- docs/InternalInstanceImageFields.md | 2 +- docs/InternalInstanceKeypairFields.md | 2 +- docs/InternalInstancesResponse.md | 2 +- .../InternalSecurityRulesFieldsForInstance.md | 2 +- docs/InternalVolumeAttachmentFields.md | 2 +- docs/InternalVolumeFields.md | 2 +- docs/InternalVolumesResponse.md | 2 +- docs/InviteApi.md | 28 +- docs/InviteFields.md | 2 +- docs/{InviteUser.md => InviteUserPayload.md} | 16 +- docs/InviteUserResponseModel.md | 31 + docs/KeypairApi.md | 78 +- docs/KeypairFields.md | 2 +- docs/Keypairs.md | 2 +- docs/LableResonse.md | 30 + docs/Lastdaycostfields.md | 2 +- docs/Lastdaycostresponse.md | 2 +- docs/LogoGetResponse.md | 2 +- docs/{Logout.md => LogoutPayload.md} | 16 +- docs/MetricItemFields.md | 31 + docs/MetricsFields.md | 34 + docs/NewConfigurationsResponse.md | 2 +- docs/NewModelResponse.md | 2 +- docs/NewStockResponse.md | 2 +- docs/NewStockRetriveResponse.md | 2 +- docs/NewStockUpdateResponseModel.md | 2 +- docs/NodeModel.md | 5 +- docs/NodePayloadModel.md | 2 +- docs/NodePowerUsageModel.md | 5 +- docs/NodeResponseModel.md | 2 +- docs/NodeStockPayloadModel.md | 2 +- docs/NodeStockResponseModel.md | 2 +- docs/NodeStocksPayload.md | 2 +- docs/OrganizationApi.md | 111 +- docs/OrganizationFields.md | 38 + docs/OrganizationInfoModel.md | 32 - docs/OrganizationModel.md | 31 - docs/OrganizationObjectResponse.md | 2 +- docs/OrganizationResourceList.md | 31 - docs/OrganizationResourceResponse.md | 31 - docs/OrganizationResources.md | 30 - docs/OrganizationResponseModel.md | 31 - docs/OrganizationUserModel.md | 36 - docs/OrganizationUserResponseModel.md | 37 + docs/OrganizationsResponseModel.md | 31 - docs/OverviewInfo.md | 2 +- docs/PaymentDetailsFields.md | 2 +- docs/PaymentDetailsResponse.md | 2 +- docs/PaymentInitiateFields.md | 2 +- docs/PaymentInitiatePayload.md | 2 +- docs/PaymentInitiateResponse.md | 2 +- docs/PermissionApi.md | 6 +- docs/PermissionFields.md | 2 +- docs/PermissionFieldsforUserPermission.md | 31 - docs/PermissionPayload.md | 32 - docs/PermissionResponse.md | 31 - docs/PermissionsforUserPermission.md | 31 - docs/PolicyApi.md | 8 +- docs/PolicyFields.md | 2 +- docs/PolicyPayload.md | 32 - docs/PolicyPermissionFields.md | 2 +- docs/PolicyResponse.md | 31 - docs/PowerUsageModel.md | 2 +- docs/PricebookModel.md | 2 +- docs/PricebookResourceObjectResponse.md | 2 +- docs/ProfileApi.md | 80 +- docs/ProfileFields.md | 2 +- docs/ProfileListResponse.md | 2 +- docs/ProfileObjectFields.md | 2 +- docs/RBACRole.md | 31 - docs/RBACRoleFieldforOrganization.md | 29 - docs/RBACRoleFields.md | 12 +- docs/RBACRolePayload.md | 32 - docs/RBACRoles.md | 31 - docs/RbacRoleApi.md | 52 +- docs/RbacRoleDetailResponseModel.md | 31 + docs/RbacRoleField.md | 29 + ...RefreshToken.md => RefreshTokenPayload.md} | 16 +- docs/RegionApi.md | 20 +- docs/RegionFields.md | 2 +- docs/RegionPayload.md | 2 +- docs/RegionResponse.md | 2 +- docs/Regions.md | 2 +- ...moveMemberFromOrganizationResponseModel.md | 30 + docs/RemoveMemberPayload.md | 29 + docs/RemoveMemberResponse.md | 30 - docs/Removemember.md | 29 - docs/RequestConsole.md | 2 +- docs/RequestLoginDataResponse.md | 30 - docs/RequestLoginResponse.md | 31 - docs/ResourcePayload.md | 7 +- docs/ResponseModel.md | 2 +- docs/RolePermissionFields.md | 2 +- docs/RolePolicyFields.md | 2 +- docs/SecurityGroupRule.md | 2 +- docs/SecurityGroupRuleFields.md | 2 +- docs/SecurityRulesApi.md | 20 +- docs/SecurityRulesFieldsforInstance.md | 2 +- docs/SecurityRulesProtocolFields.md | 2 +- docs/SetDefaultsPayload.md | 30 + docs/SingleVisibilityUserResponse.md | 2 +- docs/StartDeployment.md | 2 +- docs/StartDeploymentPayload.md | 2 +- docs/StockApi.md | 16 +- docs/StockVisibilityUserListResponse.md | 2 +- docs/StockVisibilityUserPayload.md | 4 +- docs/SuccessResponseModel.md | 2 +- docs/Template.md | 2 +- docs/TemplateApi.md | 98 +- docs/TemplateFields.md | 2 +- docs/Templates.md | 2 +- docs/TokenFields.md | 2 +- docs/UpdateContractPayload.md | 33 + docs/UpdateDiscountsPayload.md | 2 +- docs/UpdateDiscountsStatusPayload.md | 2 +- docs/UpdateEnvironment.md | 4 +- docs/UpdateGPU.md | 4 +- docs/UpdateKeypairName.md | 4 +- docs/UpdateKeypairnameresponse.md | 2 +- docs/UpdateOrganizationPayload.md | 29 + docs/UpdateOrganizationResponseModel.md | 30 + docs/UpdateTemplate.md | 2 +- docs/UserApi.md | 276 +++ docs/UserDefaultChoiceForAdminFields.md | 32 + docs/UserDefaultChoiceForUserFields.md | 33 + docs/UserDefaultChoicesForAdminResponse.md | 31 + docs/UserDefaultChoicesForUserResponse.md | 31 + docs/UserDetailChoiceApi.md | 93 + docs/UserInfoResponse.md | 31 - docs/UserPermissionApi.md | 16 +- docs/UserPermissionFields.md | 31 + docs/UserTransferPayload.md | 30 + docs/Userinfopostpayload.md | 39 + docs/UsersInfoFields.md | 42 + docs/UsersInfoListResponse.md | 31 + docs/VNCURL.md | 2 +- docs/VNCURLFields.md | 2 +- docs/VerifyApiKeyPayload.md | 29 + ...sponse.md => VerifyApiKeyResponseModel.md} | 16 +- docs/VirtualMachineApi.md | 546 ++++-- docs/VirtualMachineEventsApi.md | 20 +- docs/Volume.md | 2 +- docs/VolumeApi.md | 50 +- docs/VolumeAttachmentApi.md | 40 +- docs/VolumeAttachmentFields.md | 2 +- docs/VolumeFields.md | 2 +- docs/VolumeFieldsforInstance.md | 2 +- docs/VolumeOverviewFields.md | 2 +- docs/VolumeTypes.md | 2 +- docs/Volumes.md | 2 +- hyperstack/__init__.py | 192 +- hyperstack/api/__init__.py | 5 + hyperstack/api/api_key_api.py | 24 +- hyperstack/api/assigning_member_role_api.py | 38 +- hyperstack/api/auth_api.py | 12 +- hyperstack/api/callbacks_api.py | 142 +- hyperstack/api/compliance_api.py | 29 +- hyperstack/api/customer_contract_api.py | 597 ++++++ hyperstack/api/dashboard_api.py | 23 +- hyperstack/api/environment_api.py | 161 +- hyperstack/api/firewall_attachment_api.py | 340 ++++ hyperstack/api/firewalls_api.py | 1713 +++++++++++++++++ hyperstack/api/flavor_api.py | 23 +- hyperstack/api/floating_ip_api.py | 46 +- hyperstack/api/gpu_api.py | 23 +- hyperstack/api/image_api.py | 23 +- hyperstack/api/invite_api.py | 50 +- hyperstack/api/keypair_api.py | 92 +- hyperstack/api/organization_api.py | 318 ++- hyperstack/api/permission_api.py | 12 +- hyperstack/api/policy_api.py | 12 +- hyperstack/api/profile_api.py | 124 +- hyperstack/api/rbac_role_api.py | 82 +- hyperstack/api/region_api.py | 23 +- hyperstack/api/security_rules_api.py | 23 +- hyperstack/api/stock_api.py | 23 +- hyperstack/api/template_api.py | 187 +- hyperstack/api/user_api.py | 862 +++++++++ hyperstack/api/user_detail_choice_api.py | 289 +++ hyperstack/api/user_permission_api.py | 22 +- hyperstack/api/virtual_machine_api.py | 1561 +++++++++++---- hyperstack/api/virtual_machine_events_api.py | 23 +- hyperstack/api/volume_api.py | 50 +- hyperstack/api/volume_attachment_api.py | 46 +- hyperstack/api_client.py | 25 +- hyperstack/configuration.py | 2 +- hyperstack/models/__init__.py | 185 +- .../add_update_flavor_organization_payload.py | 109 ++ ...> add_user_info_success_response_model.py} | 26 +- ...n_add_update_image_organization_payload.py | 105 + .../admin_bootstrap_environment_payload.py | 87 + ..._resource.py => admin_cluster_resource.py} | 26 +- ...esource.py => admin_container_resource.py} | 26 +- .../models/admin_contract_event_fields.py | 102 + hyperstack/models/admin_contract_fields.py | 112 ++ .../admin_count_resources_organization.py | 95 + .../admin_count_resources_organizations.py | 95 + .../admin_create_contract_response_model.py | 95 + ...rces.py => admin_envrionment_resources.py} | 44 +- .../models/admin_flavor_detail_fields.py | 132 ++ .../models/admin_flavor_detail_node_fields.py | 100 + hyperstack/models/admin_flavor_resource.py | 130 ++ .../models/admin_flavor_resources_list.py | 99 + .../admin_get_contract_detail_fields.py | 100 + .../models/admin_get_version_response.py | 91 + ...n_hibernation_restoration_payload_model.py | 93 + hyperstack/models/admin_image_admin_fields.py | 118 ++ .../models/admin_image_admin_response.py | 95 + .../admin_image_admin_response_image.py | 120 ++ ....py => admin_image_list_admin_response.py} | 36 +- ...sources.py => admin_instance_resources.py} | 32 +- hyperstack/models/admin_node_resource.py | 100 + ...py => admin_organization_resource_list.py} | 26 +- ...> admin_organization_resource_response.py} | 26 +- ...ces.py => admin_organization_resources.py} | 26 +- ...y => admin_organization_response_model.py} | 26 +- .../admin_organization_summary_fields.py | 92 + .../admin_organizations_response_model.py | 101 + ...n_organizations_summary_response_model.py} | 26 +- hyperstack/models/admin_user_fields.py | 100 + ...sponse.py => admin_user_response_model.py} | 26 +- .../models/admin_users_response_model.py | 99 + .../models/admin_version_response_model.py | 91 + ...e_resource.py => admin_volume_resource.py} | 24 +- .../models/adminaddorganizationpayload.py | 12 +- hyperstack/models/admincreditpostpayload.py | 12 +- .../models/adminpaymenthistoryfields.py | 98 + .../models/adminpaymenthistoryresponse.py | 99 + .../models/adminrechargehistoryfields.py | 12 +- .../models/adminrechargehistoryresponse.py | 12 +- .../models/adminthresholdpostpayload.py | 12 +- hyperstack/models/api_key_fields.py | 20 +- hyperstack/models/api_key_verify_fields.py | 12 +- hyperstack/models/assign_rbac_role_payload.py | 20 +- hyperstack/models/attach_callback_payload.py | 12 +- hyperstack/models/attach_callback_response.py | 12 +- hyperstack/models/attach_firewall_with_vm.py | 87 + .../models/attach_firewalls_to_vm_payload.py | 87 + hyperstack/models/attach_volume_fields.py | 12 +- hyperstack/models/attach_volumes.py | 12 +- hyperstack/models/attach_volumes_payload.py | 12 +- ...se.py => auth_get_token_response_model.py} | 26 +- ...sponse.py => auth_request_login_fields.py} | 20 +- .../auth_request_login_response_model.py | 95 + .../{user_fields.py => auth_user_fields.py} | 20 +- .../models/auth_user_info_response_model.py | 95 + hyperstack/models/billing_response.py | 12 +- hyperstack/models/billingimmuneresources.py | 91 + .../models/billingimmuneresourcesresponse.py | 99 + hyperstack/models/billingmetricesfields.py | 18 +- hyperstack/models/billingmetricesresponse.py | 12 +- ...r_response.py => common_response_model.py} | 20 +- hyperstack/models/compliance_fields.py | 12 +- hyperstack/models/compliance_model_fields.py | 12 +- hyperstack/models/compliance_payload.py | 12 +- hyperstack/models/compliance_response.py | 12 +- .../models/container_overview_fields.py | 12 +- ...esource.py => contract_instance_fields.py} | 39 +- .../models/contract_instances_response.py | 99 + hyperstack/models/create_contarct_fields.py | 110 ++ hyperstack/models/create_contract_payload.py | 106 + hyperstack/models/create_discount_response.py | 12 +- hyperstack/models/create_discounts_payload.py | 26 +- hyperstack/models/create_environment.py | 17 +- hyperstack/models/create_firewall_payload.py | 91 + .../models/create_firewall_rule_payload.py | 97 + hyperstack/models/create_gpu.py | 14 +- hyperstack/models/create_instances_payload.py | 51 +- hyperstack/models/create_profile_payload.py | 19 +- hyperstack/models/create_profile_response.py | 12 +- .../models/create_security_rule_payload.py | 27 +- .../create_update_compliance_response.py | 12 +- ...py => create_update_permission_payload.py} | 20 +- ...reate_update_permission_response_model.py} | 20 +- ...oad.py => create_update_policy_payload.py} | 20 +- ...=> create_update_policy_response_model.py} | 20 +- ....py => create_update_rbac_role_payload.py} | 20 +- hyperstack/models/create_volume_payload.py | 27 +- ...customer_contract_detail_response_model.py | 95 + hyperstack/models/customer_contract_fields.py | 112 ++ hyperstack/models/customer_fields.py | 89 + hyperstack/models/customer_payload.py | 89 + hyperstack/models/dashboard_info_response.py | 12 +- hyperstack/models/deployment_fields.py | 12 +- .../deployment_fieldsforstartdeployments.py | 12 +- hyperstack/models/deployments.py | 12 +- hyperstack/models/detach_volumes.py | 12 +- hyperstack/models/detach_volumes_payload.py | 12 +- hyperstack/models/discount_entity_model.py | 97 + hyperstack/models/discount_fields.py | 100 + hyperstack/models/discount_plan_fields.py | 103 + hyperstack/models/discount_resource_fields.py | 12 +- .../editlabelofanexisting_vm_payload.py | 87 + hyperstack/models/environment.py | 12 +- hyperstack/models/environment_fields.py | 12 +- .../models/environment_fieldsfor_volume.py | 12 +- hyperstack/models/environments.py | 12 +- hyperstack/models/error_response_model.py | 12 +- .../models/excludebillingpostpayload.py | 89 + .../models/excludebillingpostresponse.py | 95 + ..._model.py => firewall_attachment_model.py} | 44 +- .../models/firewall_attachment_vm_model.py | 98 + hyperstack/models/firewall_detail_fields.py | 122 ++ hyperstack/models/firewall_detail_response.py | 95 + .../models/firewall_environment_fields.py | 91 + hyperstack/models/firewall_fields.py | 102 + hyperstack/models/firewall_response.py | 95 + hyperstack/models/firewall_rule.py | 95 + hyperstack/models/firewalls_list_response.py | 99 + hyperstack/models/flavor_admin_response.py | 95 + .../models/flavor_admin_response_flavors.py | 126 ++ hyperstack/models/flavor_detail_response.py | 95 + hyperstack/models/flavor_fields.py | 16 +- hyperstack/models/flavor_item_get_response.py | 12 +- hyperstack/models/flavor_list_response.py | 12 +- hyperstack/models/flavor_object_fields.py | 12 +- hyperstack/models/flavor_payload.py | 12 +- hyperstack/models/flavor_response.py | 12 +- hyperstack/models/flavor_vm_fields.py | 100 + hyperstack/models/flavor_vms_response.py | 99 + hyperstack/models/future_node_model.py | 14 +- .../models/future_node_response_model.py | 12 +- hyperstack/models/future_node_stock_model.py | 12 +- hyperstack/models/future_node_update_model.py | 12 +- hyperstack/models/future_nodes_stock_model.py | 12 +- ....py => generate_api_key_response_model.py} | 20 +- ..._discount_for_all_organization_response.py | 18 +- hyperstack/models/get_all_discounts_fields.py | 106 + ...i_key.py => get_api_key_response_model.py} | 26 +- .../get_contract_detail_response_model.py | 105 + .../get_contract_events_response_model.py | 101 + .../get_contracts_list_response_model.py | 101 + ..._customer_contracts_list_response_model.py | 101 + .../models/get_discount_detail_response.py | 95 + hyperstack/models/get_discount_response.py | 99 + .../get_entity_discount_detail_response.py | 108 ++ ...vites.py => get_invites_response_model.py} | 20 +- ....py => get_organization_response_model.py} | 26 +- ...s.py => get_permissions_response_model.py} | 20 +- ...cies.py => get_policies_response_model.py} | 20 +- ...es.py => get_rbac_roles_response_model.py} | 26 +- .../{get_token.py => get_token_payload.py} | 20 +- ...=> get_user_permissions_response_model.py} | 26 +- hyperstack/models/get_version_response.py | 91 + .../models/getcreditandthresholdinfo.py | 12 +- .../getcreditandthresholdinfoinresponse.py | 12 +- hyperstack/models/gpu.py | 12 +- hyperstack/models/gpu_fields.py | 12 +- hyperstack/models/gpu_list.py | 12 +- hyperstack/models/gpu_region_fields.py | 12 +- hyperstack/models/image_fields.py | 30 +- hyperstack/models/image_get_response.py | 12 +- hyperstack/models/image_logos.py | 12 +- hyperstack/models/images.py | 12 +- hyperstack/models/import_keypair_payload.py | 19 +- hyperstack/models/import_keypair_response.py | 12 +- .../infrahub_resource_object_response.py | 12 +- .../models/insert_discount_plan_fields.py | 28 +- hyperstack/models/instance.py | 18 +- hyperstack/models/instance_admin.py | 95 + hyperstack/models/instance_admin_fields.py | 26 +- .../models/instance_environment_fields.py | 16 +- hyperstack/models/instance_events.py | 12 +- hyperstack/models/instance_events_fields.py | 12 +- hyperstack/models/instance_fields.py | 156 ++ hyperstack/models/instance_flavor_fields.py | 16 +- hyperstack/models/instance_image_fields.py | 12 +- hyperstack/models/instance_keypair_fields.py | 12 +- hyperstack/models/instance_overview_fields.py | 12 +- hyperstack/models/instance_resize_payload.py | 12 +- hyperstack/models/instances.py | 22 +- hyperstack/models/instances_admin.py | 101 + hyperstack/models/instances_summary_admin.py | 99 + hyperstack/models/instances_summary_fields.py | 120 ++ .../models/internal_environment_fields.py | 12 +- hyperstack/models/internal_instance_fields.py | 12 +- .../models/internal_instance_flavor_fields.py | 12 +- .../models/internal_instance_image_fields.py | 12 +- .../internal_instance_keypair_fields.py | 12 +- .../models/internal_instances_response.py | 12 +- ...rnal_security_rules_fields_for_instance.py | 12 +- .../internal_volume_attachment_fields.py | 12 +- hyperstack/models/internal_volume_fields.py | 12 +- .../models/internal_volumes_response.py | 12 +- hyperstack/models/invite_fields.py | 12 +- ...{invite_user.py => invite_user_payload.py} | 20 +- ...nvite.py => invite_user_response_model.py} | 20 +- hyperstack/models/keypair_fields.py | 12 +- hyperstack/models/keypairs.py | 12 +- hyperstack/models/lable_resonse.py | 89 + hyperstack/models/lastdaycostfields.py | 12 +- hyperstack/models/lastdaycostresponse.py | 12 +- hyperstack/models/logo_get_response.py | 12 +- .../models/{logout.py => logout_payload.py} | 20 +- hyperstack/models/metric_item_fields.py | 91 + hyperstack/models/metrics_fields.py | 116 ++ .../models/new_configurations_response.py | 12 +- hyperstack/models/new_model_response.py | 12 +- hyperstack/models/new_stock_response.py | 12 +- .../models/new_stock_retrive_response.py | 12 +- .../models/new_stock_update_response_model.py | 12 +- hyperstack/models/node_model.py | 22 +- hyperstack/models/node_payload_model.py | 12 +- hyperstack/models/node_power_usage_model.py | 20 +- hyperstack/models/node_response_model.py | 12 +- hyperstack/models/node_stock_payload_model.py | 12 +- .../models/node_stock_response_model.py | 12 +- hyperstack/models/node_stocks_payload.py | 12 +- hyperstack/models/organization_fields.py | 114 ++ .../models/organization_object_response.py | 12 +- ...py => organization_user_response_model.py} | 32 +- hyperstack/models/overview_info.py | 12 +- hyperstack/models/payment_details_fields.py | 12 +- hyperstack/models/payment_details_response.py | 12 +- hyperstack/models/payment_initiate_fields.py | 12 +- hyperstack/models/payment_initiate_payload.py | 12 +- .../models/payment_initiate_response.py | 12 +- hyperstack/models/permission_fields.py | 12 +- hyperstack/models/policy_fields.py | 12 +- hyperstack/models/policy_permission_fields.py | 12 +- hyperstack/models/power_usage_model.py | 12 +- hyperstack/models/pricebook_model.py | 12 +- .../pricebook_resource_object_response.py | 12 +- hyperstack/models/profile_fields.py | 12 +- hyperstack/models/profile_list_response.py | 12 +- hyperstack/models/profile_object_fields.py | 12 +- ....py => rbac_role_detail_response_model.py} | 26 +- ...for_organization.py => rbac_role_field.py} | 20 +- hyperstack/models/rbac_role_fields.py | 20 +- ...resh_token.py => refresh_token_payload.py} | 20 +- hyperstack/models/region_fields.py | 12 +- hyperstack/models/region_payload.py | 12 +- hyperstack/models/region_response.py | 12 +- hyperstack/models/regions.py | 12 +- ...member_from_organization_response_model.py | 89 + ...movemember.py => remove_member_payload.py} | 20 +- hyperstack/models/request_console.py | 12 +- hyperstack/models/resource_payload.py | 26 +- hyperstack/models/response_model.py | 12 +- hyperstack/models/role_permission_fields.py | 12 +- hyperstack/models/role_policy_fields.py | 12 +- hyperstack/models/security_group_rule.py | 12 +- .../models/security_group_rule_fields.py | 12 +- .../security_rules_fieldsfor_instance.py | 12 +- .../models/security_rules_protocol_fields.py | 12 +- hyperstack/models/set_defaults_payload.py | 89 + .../models/single_visibility_user_response.py | 12 +- hyperstack/models/start_deployment.py | 12 +- hyperstack/models/start_deployment_payload.py | 12 +- .../stock_visibility_user_list_response.py | 12 +- .../models/stock_visibility_user_payload.py | 16 +- hyperstack/models/success_response_model.py | 12 +- hyperstack/models/template.py | 12 +- hyperstack/models/template_fields.py | 12 +- hyperstack/models/templates.py | 12 +- hyperstack/models/token_fields.py | 12 +- hyperstack/models/update_contract_payload.py | 104 + hyperstack/models/update_discounts_payload.py | 12 +- .../models/update_discounts_status_payload.py | 12 +- hyperstack/models/update_environment.py | 15 +- hyperstack/models/update_gpu.py | 14 +- hyperstack/models/update_keypair_name.py | 15 +- .../models/update_keypairnameresponse.py | 12 +- .../models/update_organization_payload.py | 87 + .../update_organization_response_model.py | 89 + hyperstack/models/update_template.py | 12 +- .../user_default_choice_for_admin_fields.py | 93 + .../user_default_choice_for_user_fields.py | 95 + ...user_default_choices_for_admin_response.py | 99 + .../user_default_choices_for_user_response.py | 99 + ...ermission.py => user_permission_fields.py} | 20 +- hyperstack/models/user_transfer_payload.py | 89 + hyperstack/models/userinfopostpayload.py | 107 + hyperstack/models/users_info_fields.py | 114 ++ hyperstack/models/users_info_list_response.py | 95 + ...y_payload.py => verify_api_key_payload.py} | 20 +- ...se.py => verify_api_key_response_model.py} | 20 +- hyperstack/models/vncurl.py | 12 +- hyperstack/models/vncurl_fields.py | 12 +- hyperstack/models/volume.py | 12 +- hyperstack/models/volume_attachment_fields.py | 12 +- hyperstack/models/volume_fields.py | 12 +- .../models/volume_fieldsfor_instance.py | 12 +- hyperstack/models/volume_overview_fields.py | 12 +- hyperstack/models/volume_types.py | 12 +- hyperstack/models/volumes.py | 12 +- hyperstack_README.md | 406 ---- openapi/config.yaml | 2 +- pyproject.toml | 2 +- setup.py | 2 +- ..._add_update_flavor_organization_payload.py | 76 + ...st_add_user_info_success_response_model.py | 67 + ...n_add_update_image_organization_payload.py | 74 + ...est_admin_bootstrap_environment_payload.py | 52 + test/test_admin_cluster_resource.py | 90 + test/test_admin_container_resource.py | 89 + test/test_admin_contract_event_fields.py | 58 + test/test_admin_contract_fields.py | 63 + ...test_admin_count_resources_organization.py | 55 + ...est_admin_count_resources_organizations.py | 58 + ...st_admin_create_contract_response_model.py | 72 + test/test_admin_envrionment_resources.py | 198 ++ test/test_admin_flavor_detail_fields.py | 84 + test/test_admin_flavor_detail_node_fields.py | 59 + test/test_admin_flavor_resource.py | 81 + test/test_admin_flavor_resources_list.py | 86 + test/test_admin_get_contract_detail_fields.py | 57 + test/test_admin_get_version_response.py | 53 + ...n_hibernation_restoration_payload_model.py | 58 + test/test_admin_image_admin_fields.py | 66 + test/test_admin_image_admin_response.py | 72 + test/test_admin_image_admin_response_image.py | 72 + test/test_admin_image_list_admin_response.py | 71 + test/test_admin_instance_resources.py | 95 + test/test_admin_node_resource.py | 59 + ... test_admin_organization_resource_list.py} | 78 +- ...t_admin_organization_resource_response.py} | 78 +- ...y => test_admin_organization_resources.py} | 76 +- ...test_admin_organization_response_model.py} | 37 +- .../test_admin_organization_summary_fields.py | 55 + ...est_admin_organizations_response_model.py} | 40 +- ...in_organizations_summary_response_model.py | 58 + test/test_admin_user_fields.py | 62 + test/test_admin_user_response_model.py | 60 + test/test_admin_users_response_model.py | 62 + test/test_admin_version_response_model.py | 53 + ...ource.py => test_admin_volume_resource.py} | 23 +- test/test_adminpaymenthistoryfields.py | 56 + test/test_adminpaymenthistoryresponse.py | 61 + test/test_api_key_fields.py | 22 +- test/test_assign_rbac_role_payload.py | 22 +- test/test_attach_firewall_with_vm.py | 56 + test/test_attach_firewalls_to_vm_payload.py | 56 + ... => test_auth_get_token_response_model.py} | 25 +- ...e.py => test_auth_request_login_fields.py} | 22 +- ...test_auth_request_login_response_model.py} | 24 +- ...ser_fields.py => test_auth_user_fields.py} | 22 +- ... => test_auth_user_info_response_model.py} | 24 +- test/test_billingimmuneresources.py | 53 + test/test_billingimmuneresourcesresponse.py | 58 + test/test_billingmetricesfields.py | 3 +- test/test_billingmetricesresponse.py | 3 +- test/test_callbacks_api.py | 36 +- ...i_key.py => test_common_response_model.py} | 26 +- test/test_compliance_api.py | 8 +- test/test_contract_instance_fields.py | 56 + test/test_contract_instances_response.py | 61 + test/test_create_contarct_fields.py | 69 + test/test_create_contract_payload.py | 73 + test/test_create_discount_response.py | 7 +- test/test_create_discounts_payload.py | 22 +- test/test_create_firewall_payload.py | 55 + test/test_create_firewall_rule_payload.py | 60 + test/test_create_gpu.py | 2 +- test/test_create_instances_payload.py | 13 +- test/test_create_security_rule_payload.py | 4 +- ... test_create_update_permission_payload.py} | 22 +- ...reate_update_permission_response_model.py} | 22 +- ...y => test_create_update_policy_payload.py} | 22 +- ...st_create_update_policy_response_model.py} | 22 +- ...> test_create_update_rbac_role_payload.py} | 22 +- test/test_create_volume_payload.py | 5 + test/test_customer_contract_api.py | 45 + ...customer_contract_detail_response_model.py | 73 + test/test_customer_contract_fields.py | 70 + test/test_customer_fields.py | 52 + test/test_customer_payload.py | 54 + test/test_dashboard_api.py | 6 +- test/test_discount_entity_model.py | 63 + test/test_discount_fields.py | 57 + test/test_discount_plan_fields.py | 59 + test/test_editlabelofanexisting_vm_payload.py | 53 + test/test_environment_api.py | 26 +- test/test_envrionment_resources.py | 123 -- test/test_excludebillingpostpayload.py | 54 + test/test_excludebillingpostresponse.py | 55 + test/test_firewall_attachment_api.py | 38 + ...e.py => test_firewall_attachment_model.py} | 38 +- test/test_firewall_attachment_vm_model.py | 56 + test/test_firewall_detail_fields.py | 84 + test/test_firewall_detail_response.py | 86 + ...py => test_firewall_environment_fields.py} | 28 +- ...er_resource.py => test_firewall_fields.py} | 34 +- test/test_firewall_response.py | 62 + test/test_firewall_rule.py | 62 + test/test_firewalls_api.py | 73 + test/test_firewalls_list_response.py | 88 + test/test_flavor_admin_response.py | 79 + test/test_flavor_admin_response_flavors.py | 79 + test/test_flavor_api.py | 6 +- test/test_flavor_detail_response.py | 87 + test/test_flavor_fields.py | 1 + test/test_flavor_item_get_response.py | 1 + test/test_flavor_list_response.py | 1 + test/test_flavor_response.py | 1 + test/test_flavor_vm_fields.py | 57 + test/test_flavor_vms_response.py | 62 + test/test_floating_ip_api.py | 12 +- test/test_generate_api_key_response_model.py | 53 + ..._discount_for_all_organization_response.py | 10 +- test/test_get_all_discounts_fields.py | 60 + test/test_get_api_key_response_model.py | 54 + ...test_get_contract_detail_response_model.py | 72 + ...test_get_contract_events_response_model.py | 64 + .../test_get_contracts_list_response_model.py | 69 + ..._customer_contracts_list_response_model.py | 76 + test/test_get_discount_detail_response.py | 66 + ...ponse.py => test_get_discount_response.py} | 35 +- ...est_get_entity_discount_detail_response.py | 76 + ....py => test_get_invites_response_model.py} | 22 +- ...> test_get_organization_response_model.py} | 37 +- ...=> test_get_permissions_response_model.py} | 22 +- ...py => test_get_policies_response_model.py} | 22 +- ... => test_get_rbac_roles_response_model.py} | 24 +- ...get_token.py => test_get_token_payload.py} | 22 +- ...st_get_user_permissions_response_model.py} | 24 +- ...ration.py => test_get_version_response.py} | 24 +- test/test_gpu_api.py | 6 +- test/test_image_api.py | 6 +- test/test_image_fields.py | 9 +- test/test_image_get_response.py | 9 +- test/test_images.py | 11 +- test/test_insert_discount_plan_fields.py | 7 +- test/test_instance.py | 11 +- test/test_instance_admin.py | 112 ++ test/test_instance_admin_fields.py | 11 +- test/test_instance_environment_fields.py | 1 + test/test_instance_fields.py | 107 + test/test_instance_flavor_fields.py | 1 + test/test_instances.py | 14 +- test/test_instances_admin.py | 115 ++ test/test_instances_summary_admin.py | 72 + ...es.py => test_instances_summary_fields.py} | 46 +- ...emember.py => test_invite_user_payload.py} | 22 +- ....py => test_invite_user_response_model.py} | 22 +- test/test_keypair_api.py | 24 +- ...t_invite_user.py => test_lable_resonse.py} | 26 +- ...{test_logout.py => test_logout_payload.py} | 22 +- test/test_metric_item_fields.py | 53 + test/test_metrics_fields.py | 74 + test/test_node_model.py | 9 + test/test_node_payload_model.py | 9 + test/test_node_power_usage_model.py | 9 + test/test_node_response_model.py | 9 + test/test_node_stock_payload_model.py | 9 + test/test_node_stock_response_model.py | 9 + test/test_organization_api.py | 7 + ...o_model.py => test_organization_fields.py} | 35 +- ... test_organization_user_response_model.py} | 27 +- test/test_profile_api.py | 16 +- ...> test_rbac_role_detail_response_model.py} | 24 +- ...key_payload.py => test_rbac_role_field.py} | 24 +- test/test_rbac_role_fields.py | 22 +- ...token.py => test_refresh_token_payload.py} | 22 +- test/test_region_api.py | 6 +- ...member_from_organization_response_model.py | 52 + ...ponse.py => test_remove_member_payload.py} | 26 +- test/test_resource_payload.py | 7 +- test/test_security_rules_api.py | 6 +- test/test_set_defaults_payload.py | 62 + test/test_stock_api.py | 4 +- test/test_stock_visibility_user_payload.py | 3 + test/test_template_api.py | 22 +- test/test_update_contract_payload.py | 71 + test/test_update_discounts_payload.py | 10 +- test/test_update_gpu.py | 2 +- ...py => test_update_organization_payload.py} | 23 +- ...test_update_organization_response_model.py | 52 + test/test_user_api.py | 52 + ...t_user_default_choice_for_admin_fields.py} | 27 +- ...est_user_default_choice_for_user_fields.py | 55 + ...user_default_choices_for_admin_response.py | 59 + ..._user_default_choices_for_user_response.py | 60 + test/test_user_detail_choice_api.py | 38 + test/test_user_permission_fields.py | 53 + test/test_user_transfer_payload.py | 54 + test/test_userinfopostpayload.py | 64 + test/test_users_info_fields.py | 64 + test/test_users_info_list_response.py | 67 + test/test_verify_api_key_payload.py | 51 + ... => test_verify_api_key_response_model.py} | 22 +- test/test_virtual_machine_api.py | 95 +- test/test_virtual_machine_events_api.py | 6 +- test/test_volume_api.py | 12 +- test/test_volume_attachment_api.py | 12 +- 897 files changed, 32105 insertions(+), 5952 deletions(-) delete mode 100644 docs/APIKeyPayload.md create mode 100644 docs/AddUpdateFlavorOrganizationPayload.md create mode 100644 docs/AddUserInfoSuccessResponseModel.md create mode 100644 docs/AdminAddUpdateImageOrganizationPayload.md create mode 100644 docs/AdminBootstrapEnvironmentPayload.md rename docs/{ClusterResource.md => AdminClusterResource.md} (57%) rename docs/{ContainerResource.md => AdminContainerResource.md} (54%) create mode 100644 docs/AdminContractEventFields.md create mode 100644 docs/AdminContractFields.md create mode 100644 docs/AdminCountResourcesOrganization.md create mode 100644 docs/AdminCountResourcesOrganizations.md create mode 100644 docs/AdminCreateContractResponseModel.md create mode 100644 docs/AdminEnvrionmentResources.md create mode 100644 docs/AdminFlavorDetailFields.md create mode 100644 docs/AdminFlavorDetailNodeFields.md create mode 100644 docs/AdminFlavorResource.md create mode 100644 docs/AdminFlavorResourcesList.md create mode 100644 docs/AdminGetContractDetailFields.md create mode 100644 docs/AdminGetVersionResponse.md create mode 100644 docs/AdminHibernationRestorationPayloadModel.md create mode 100644 docs/AdminImageAdminFields.md create mode 100644 docs/AdminImageAdminResponse.md create mode 100644 docs/AdminImageAdminResponseImage.md create mode 100644 docs/AdminImageListAdminResponse.md rename docs/{InstanceResources.md => AdminInstanceResources.md} (56%) create mode 100644 docs/AdminNodeResource.md create mode 100644 docs/AdminOrganizationResourceList.md create mode 100644 docs/AdminOrganizationResourceResponse.md create mode 100644 docs/AdminOrganizationResources.md create mode 100644 docs/AdminOrganizationResponseModel.md create mode 100644 docs/AdminOrganizationSummaryFields.md create mode 100644 docs/AdminOrganizationsResponseModel.md create mode 100644 docs/AdminOrganizationsSummaryResponseModel.md create mode 100644 docs/AdminUserFields.md create mode 100644 docs/AdminUserResponseModel.md create mode 100644 docs/AdminUsersResponseModel.md create mode 100644 docs/AdminVersionResponseModel.md rename docs/{VolumeResource.md => AdminVolumeResource.md} (57%) create mode 100644 docs/Adminpaymenthistoryfields.md create mode 100644 docs/Adminpaymenthistoryresponse.md create mode 100644 docs/AttachFirewallWithVM.md create mode 100644 docs/AttachFirewallsToVMPayload.md create mode 100644 docs/AuthGetTokenResponseModel.md create mode 100644 docs/AuthRequestLoginFields.md create mode 100644 docs/AuthRequestLoginResponseModel.md rename docs/{UserFields.md => AuthUserFields.md} (58%) create mode 100644 docs/AuthUserInfoResponseModel.md create mode 100644 docs/Billingimmuneresources.md create mode 100644 docs/Billingimmuneresourcesresponse.md create mode 100644 docs/CommonResponseModel.md create mode 100644 docs/ContractInstanceFields.md create mode 100644 docs/ContractInstancesResponse.md create mode 100644 docs/CreateContarctFields.md create mode 100644 docs/CreateContractPayload.md create mode 100644 docs/CreateFirewallPayload.md create mode 100644 docs/CreateFirewallRulePayload.md create mode 100644 docs/CreateUpdatePermissionPayload.md create mode 100644 docs/CreateUpdatePermissionResponseModel.md create mode 100644 docs/CreateUpdatePolicyPayload.md create mode 100644 docs/CreateUpdatePolicyResponseModel.md create mode 100644 docs/CreateUpdateRbacRolePayload.md create mode 100644 docs/CustomerContractApi.md create mode 100644 docs/CustomerContractDetailResponseModel.md create mode 100644 docs/CustomerContractFields.md create mode 100644 docs/CustomerFields.md create mode 100644 docs/CustomerPayload.md delete mode 100644 docs/DiscountDetailResponse.md create mode 100644 docs/DiscountEntityModel.md create mode 100644 docs/DiscountFields.md create mode 100644 docs/DiscountPlanFields.md create mode 100644 docs/EditlabelofanexistingVMPayload.md delete mode 100644 docs/EnvrionmentResources.md create mode 100644 docs/Excludebillingpostpayload.md create mode 100644 docs/Excludebillingpostresponse.md create mode 100644 docs/FirewallAttachmentApi.md create mode 100644 docs/FirewallAttachmentModel.md create mode 100644 docs/FirewallAttachmentVMModel.md create mode 100644 docs/FirewallDetailFields.md create mode 100644 docs/FirewallDetailResponse.md create mode 100644 docs/FirewallEnvironmentFields.md create mode 100644 docs/FirewallFields.md rename docs/{GetTokenResponse.md => FirewallResponse.md} (50%) rename docs/{APIKeygeneration.md => FirewallRule.md} (51%) create mode 100644 docs/FirewallsApi.md create mode 100644 docs/FirewallsListResponse.md create mode 100644 docs/FlavorAdminResponse.md create mode 100644 docs/FlavorAdminResponseFlavors.md create mode 100644 docs/FlavorDetailResponse.md delete mode 100644 docs/FlavorResource.md create mode 100644 docs/FlavorVMFields.md create mode 100644 docs/FlavorVMsResponse.md create mode 100644 docs/GenerateApiKeyResponseModel.md create mode 100644 docs/GetAllDiscountsFields.md create mode 100644 docs/GetApiKeyResponseModel.md create mode 100644 docs/GetContractDetailResponseModel.md create mode 100644 docs/GetContractEventsResponseModel.md create mode 100644 docs/GetContractsListResponseModel.md create mode 100644 docs/GetCustomerContractsListResponseModel.md create mode 100644 docs/GetDiscountDetailResponse.md create mode 100644 docs/GetDiscountResponse.md create mode 100644 docs/GetEntityDiscountDetailResponse.md rename docs/{Invites.md => GetInvitesResponseModel.md} (52%) create mode 100644 docs/GetOrganizationResponseModel.md rename docs/{Permissions.md => GetPermissionsResponseModel.md} (50%) rename docs/{Policies.md => GetPoliciesResponseModel.md} (51%) create mode 100644 docs/GetRbacRolesResponseModel.md rename docs/{GetToken.md => GetTokenPayload.md} (53%) create mode 100644 docs/GetUserPermissionsResponseModel.md create mode 100644 docs/GetVersionResponse.md rename docs/{Invite.md => InstanceAdmin.md} (51%) create mode 100644 docs/InstanceFields.md rename docs/{APIKey.md => InstancesAdmin.md} (52%) create mode 100644 docs/InstancesSummaryAdmin.md create mode 100644 docs/InstancesSummaryFields.md rename docs/{InviteUser.md => InviteUserPayload.md} (50%) create mode 100644 docs/InviteUserResponseModel.md create mode 100644 docs/LableResonse.md rename docs/{Logout.md => LogoutPayload.md} (54%) create mode 100644 docs/MetricItemFields.md create mode 100644 docs/MetricsFields.md create mode 100644 docs/OrganizationFields.md delete mode 100644 docs/OrganizationInfoModel.md delete mode 100644 docs/OrganizationModel.md delete mode 100644 docs/OrganizationResourceList.md delete mode 100644 docs/OrganizationResourceResponse.md delete mode 100644 docs/OrganizationResources.md delete mode 100644 docs/OrganizationResponseModel.md delete mode 100644 docs/OrganizationUserModel.md create mode 100644 docs/OrganizationUserResponseModel.md delete mode 100644 docs/OrganizationsResponseModel.md delete mode 100644 docs/PermissionFieldsforUserPermission.md delete mode 100644 docs/PermissionPayload.md delete mode 100644 docs/PermissionResponse.md delete mode 100644 docs/PermissionsforUserPermission.md delete mode 100644 docs/PolicyPayload.md delete mode 100644 docs/PolicyResponse.md delete mode 100644 docs/RBACRole.md delete mode 100644 docs/RBACRoleFieldforOrganization.md delete mode 100644 docs/RBACRolePayload.md delete mode 100644 docs/RBACRoles.md create mode 100644 docs/RbacRoleDetailResponseModel.md create mode 100644 docs/RbacRoleField.md rename docs/{RefreshToken.md => RefreshTokenPayload.md} (50%) create mode 100644 docs/RemoveMemberFromOrganizationResponseModel.md create mode 100644 docs/RemoveMemberPayload.md delete mode 100644 docs/RemoveMemberResponse.md delete mode 100644 docs/Removemember.md delete mode 100644 docs/RequestLoginDataResponse.md delete mode 100644 docs/RequestLoginResponse.md create mode 100644 docs/SetDefaultsPayload.md create mode 100644 docs/UpdateContractPayload.md create mode 100644 docs/UpdateOrganizationPayload.md create mode 100644 docs/UpdateOrganizationResponseModel.md create mode 100644 docs/UserApi.md create mode 100644 docs/UserDefaultChoiceForAdminFields.md create mode 100644 docs/UserDefaultChoiceForUserFields.md create mode 100644 docs/UserDefaultChoicesForAdminResponse.md create mode 100644 docs/UserDefaultChoicesForUserResponse.md create mode 100644 docs/UserDetailChoiceApi.md delete mode 100644 docs/UserInfoResponse.md create mode 100644 docs/UserPermissionFields.md create mode 100644 docs/UserTransferPayload.md create mode 100644 docs/Userinfopostpayload.md create mode 100644 docs/UsersInfoFields.md create mode 100644 docs/UsersInfoListResponse.md create mode 100644 docs/VerifyApiKeyPayload.md rename docs/{ApiKeyVerifyResponse.md => VerifyApiKeyResponseModel.md} (50%) create mode 100644 hyperstack/api/customer_contract_api.py create mode 100644 hyperstack/api/firewall_attachment_api.py create mode 100644 hyperstack/api/firewalls_api.py create mode 100644 hyperstack/api/user_api.py create mode 100644 hyperstack/api/user_detail_choice_api.py create mode 100644 hyperstack/models/add_update_flavor_organization_payload.py rename hyperstack/models/{request_login_response.py => add_user_info_success_response_model.py} (78%) create mode 100644 hyperstack/models/admin_add_update_image_organization_payload.py create mode 100644 hyperstack/models/admin_bootstrap_environment_payload.py rename hyperstack/models/{cluster_resource.py => admin_cluster_resource.py} (82%) rename hyperstack/models/{container_resource.py => admin_container_resource.py} (81%) create mode 100644 hyperstack/models/admin_contract_event_fields.py create mode 100644 hyperstack/models/admin_contract_fields.py create mode 100644 hyperstack/models/admin_count_resources_organization.py create mode 100644 hyperstack/models/admin_count_resources_organizations.py create mode 100644 hyperstack/models/admin_create_contract_response_model.py rename hyperstack/models/{envrionment_resources.py => admin_envrionment_resources.py} (71%) create mode 100644 hyperstack/models/admin_flavor_detail_fields.py create mode 100644 hyperstack/models/admin_flavor_detail_node_fields.py create mode 100644 hyperstack/models/admin_flavor_resource.py create mode 100644 hyperstack/models/admin_flavor_resources_list.py create mode 100644 hyperstack/models/admin_get_contract_detail_fields.py create mode 100644 hyperstack/models/admin_get_version_response.py create mode 100644 hyperstack/models/admin_hibernation_restoration_payload_model.py create mode 100644 hyperstack/models/admin_image_admin_fields.py create mode 100644 hyperstack/models/admin_image_admin_response.py create mode 100644 hyperstack/models/admin_image_admin_response_image.py rename hyperstack/models/{discount_detail_response.py => admin_image_list_admin_response.py} (72%) rename hyperstack/models/{instance_resources.py => admin_instance_resources.py} (74%) create mode 100644 hyperstack/models/admin_node_resource.py rename hyperstack/models/{organizations_response_model.py => admin_organization_resource_list.py} (77%) rename hyperstack/models/{organization_model.py => admin_organization_resource_response.py} (76%) rename hyperstack/models/{organization_resources.py => admin_organization_resources.py} (77%) rename hyperstack/models/{organization_response_model.py => admin_organization_response_model.py} (77%) create mode 100644 hyperstack/models/admin_organization_summary_fields.py create mode 100644 hyperstack/models/admin_organizations_response_model.py rename hyperstack/models/{organization_resource_list.py => admin_organizations_summary_response_model.py} (76%) create mode 100644 hyperstack/models/admin_user_fields.py rename hyperstack/models/{user_info_response.py => admin_user_response_model.py} (79%) create mode 100644 hyperstack/models/admin_users_response_model.py create mode 100644 hyperstack/models/admin_version_response_model.py rename hyperstack/models/{volume_resource.py => admin_volume_resource.py} (80%) create mode 100644 hyperstack/models/adminpaymenthistoryfields.py create mode 100644 hyperstack/models/adminpaymenthistoryresponse.py create mode 100644 hyperstack/models/attach_firewall_with_vm.py create mode 100644 hyperstack/models/attach_firewalls_to_vm_payload.py rename hyperstack/models/{get_token_response.py => auth_get_token_response_model.py} (81%) rename hyperstack/models/{request_login_data_response.py => auth_request_login_fields.py} (84%) create mode 100644 hyperstack/models/auth_request_login_response_model.py rename hyperstack/models/{user_fields.py => auth_user_fields.py} (86%) create mode 100644 hyperstack/models/auth_user_info_response_model.py create mode 100644 hyperstack/models/billingimmuneresources.py create mode 100644 hyperstack/models/billingimmuneresourcesresponse.py rename hyperstack/models/{remove_member_response.py => common_response_model.py} (84%) rename hyperstack/models/{flavor_resource.py => contract_instance_fields.py} (71%) create mode 100644 hyperstack/models/contract_instances_response.py create mode 100644 hyperstack/models/create_contarct_fields.py create mode 100644 hyperstack/models/create_contract_payload.py create mode 100644 hyperstack/models/create_firewall_payload.py create mode 100644 hyperstack/models/create_firewall_rule_payload.py rename hyperstack/models/{permission_payload.py => create_update_permission_payload.py} (84%) rename hyperstack/models/{permission_response.py => create_update_permission_response_model.py} (84%) rename hyperstack/models/{policy_payload.py => create_update_policy_payload.py} (84%) rename hyperstack/models/{policy_response.py => create_update_policy_response_model.py} (85%) rename hyperstack/models/{rbac_role_payload.py => create_update_rbac_role_payload.py} (84%) create mode 100644 hyperstack/models/customer_contract_detail_response_model.py create mode 100644 hyperstack/models/customer_contract_fields.py create mode 100644 hyperstack/models/customer_fields.py create mode 100644 hyperstack/models/customer_payload.py create mode 100644 hyperstack/models/discount_entity_model.py create mode 100644 hyperstack/models/discount_fields.py create mode 100644 hyperstack/models/discount_plan_fields.py create mode 100644 hyperstack/models/editlabelofanexisting_vm_payload.py create mode 100644 hyperstack/models/excludebillingpostpayload.py create mode 100644 hyperstack/models/excludebillingpostresponse.py rename hyperstack/models/{organization_info_model.py => firewall_attachment_model.py} (67%) create mode 100644 hyperstack/models/firewall_attachment_vm_model.py create mode 100644 hyperstack/models/firewall_detail_fields.py create mode 100644 hyperstack/models/firewall_detail_response.py create mode 100644 hyperstack/models/firewall_environment_fields.py create mode 100644 hyperstack/models/firewall_fields.py create mode 100644 hyperstack/models/firewall_response.py create mode 100644 hyperstack/models/firewall_rule.py create mode 100644 hyperstack/models/firewalls_list_response.py create mode 100644 hyperstack/models/flavor_admin_response.py create mode 100644 hyperstack/models/flavor_admin_response_flavors.py create mode 100644 hyperstack/models/flavor_detail_response.py create mode 100644 hyperstack/models/flavor_vm_fields.py create mode 100644 hyperstack/models/flavor_vms_response.py rename hyperstack/models/{api_keygeneration.py => generate_api_key_response_model.py} (84%) create mode 100644 hyperstack/models/get_all_discounts_fields.py rename hyperstack/models/{api_key.py => get_api_key_response_model.py} (80%) create mode 100644 hyperstack/models/get_contract_detail_response_model.py create mode 100644 hyperstack/models/get_contract_events_response_model.py create mode 100644 hyperstack/models/get_contracts_list_response_model.py create mode 100644 hyperstack/models/get_customer_contracts_list_response_model.py create mode 100644 hyperstack/models/get_discount_detail_response.py create mode 100644 hyperstack/models/get_discount_response.py create mode 100644 hyperstack/models/get_entity_discount_detail_response.py rename hyperstack/models/{invites.py => get_invites_response_model.py} (86%) rename hyperstack/models/{organization_resource_response.py => get_organization_response_model.py} (78%) rename hyperstack/models/{permissions.py => get_permissions_response_model.py} (86%) rename hyperstack/models/{policies.py => get_policies_response_model.py} (86%) rename hyperstack/models/{rbac_roles.py => get_rbac_roles_response_model.py} (81%) rename hyperstack/models/{get_token.py => get_token_payload.py} (85%) rename hyperstack/models/{permissionsfor_user_permission.py => get_user_permissions_response_model.py} (77%) create mode 100644 hyperstack/models/get_version_response.py create mode 100644 hyperstack/models/instance_admin.py create mode 100644 hyperstack/models/instance_fields.py create mode 100644 hyperstack/models/instances_admin.py create mode 100644 hyperstack/models/instances_summary_admin.py create mode 100644 hyperstack/models/instances_summary_fields.py rename hyperstack/models/{invite_user.py => invite_user_payload.py} (84%) rename hyperstack/models/{invite.py => invite_user_response_model.py} (86%) create mode 100644 hyperstack/models/lable_resonse.py rename hyperstack/models/{logout.py => logout_payload.py} (85%) create mode 100644 hyperstack/models/metric_item_fields.py create mode 100644 hyperstack/models/metrics_fields.py create mode 100644 hyperstack/models/organization_fields.py rename hyperstack/models/{organization_user_model.py => organization_user_response_model.py} (76%) rename hyperstack/models/{rbac_role.py => rbac_role_detail_response_model.py} (80%) rename hyperstack/models/{rbac_role_fieldfor_organization.py => rbac_role_field.py} (83%) rename hyperstack/models/{refresh_token.py => refresh_token_payload.py} (85%) create mode 100644 hyperstack/models/remove_member_from_organization_response_model.py rename hyperstack/models/{removemember.py => remove_member_payload.py} (84%) create mode 100644 hyperstack/models/set_defaults_payload.py create mode 100644 hyperstack/models/update_contract_payload.py create mode 100644 hyperstack/models/update_organization_payload.py create mode 100644 hyperstack/models/update_organization_response_model.py create mode 100644 hyperstack/models/user_default_choice_for_admin_fields.py create mode 100644 hyperstack/models/user_default_choice_for_user_fields.py create mode 100644 hyperstack/models/user_default_choices_for_admin_response.py create mode 100644 hyperstack/models/user_default_choices_for_user_response.py rename hyperstack/models/{permission_fieldsfor_user_permission.py => user_permission_fields.py} (83%) create mode 100644 hyperstack/models/user_transfer_payload.py create mode 100644 hyperstack/models/userinfopostpayload.py create mode 100644 hyperstack/models/users_info_fields.py create mode 100644 hyperstack/models/users_info_list_response.py rename hyperstack/models/{api_key_payload.py => verify_api_key_payload.py} (84%) rename hyperstack/models/{api_key_verify_response.py => verify_api_key_response_model.py} (85%) delete mode 100644 hyperstack_README.md create mode 100644 test/test_add_update_flavor_organization_payload.py create mode 100644 test/test_add_user_info_success_response_model.py create mode 100644 test/test_admin_add_update_image_organization_payload.py create mode 100644 test/test_admin_bootstrap_environment_payload.py create mode 100644 test/test_admin_cluster_resource.py create mode 100644 test/test_admin_container_resource.py create mode 100644 test/test_admin_contract_event_fields.py create mode 100644 test/test_admin_contract_fields.py create mode 100644 test/test_admin_count_resources_organization.py create mode 100644 test/test_admin_count_resources_organizations.py create mode 100644 test/test_admin_create_contract_response_model.py create mode 100644 test/test_admin_envrionment_resources.py create mode 100644 test/test_admin_flavor_detail_fields.py create mode 100644 test/test_admin_flavor_detail_node_fields.py create mode 100644 test/test_admin_flavor_resource.py create mode 100644 test/test_admin_flavor_resources_list.py create mode 100644 test/test_admin_get_contract_detail_fields.py create mode 100644 test/test_admin_get_version_response.py create mode 100644 test/test_admin_hibernation_restoration_payload_model.py create mode 100644 test/test_admin_image_admin_fields.py create mode 100644 test/test_admin_image_admin_response.py create mode 100644 test/test_admin_image_admin_response_image.py create mode 100644 test/test_admin_image_list_admin_response.py create mode 100644 test/test_admin_instance_resources.py create mode 100644 test/test_admin_node_resource.py rename test/{test_organization_resource_list.py => test_admin_organization_resource_list.py} (53%) rename test/{test_organization_resource_response.py => test_admin_organization_resource_response.py} (52%) rename test/{test_organization_resources.py => test_admin_organization_resources.py} (52%) rename test/{test_organization_response_model.py => test_admin_organization_response_model.py} (55%) create mode 100644 test/test_admin_organization_summary_fields.py rename test/{test_organizations_response_model.py => test_admin_organizations_response_model.py} (57%) create mode 100644 test/test_admin_organizations_summary_response_model.py create mode 100644 test/test_admin_user_fields.py create mode 100644 test/test_admin_user_response_model.py create mode 100644 test/test_admin_users_response_model.py create mode 100644 test/test_admin_version_response_model.py rename test/{test_volume_resource.py => test_admin_volume_resource.py} (66%) create mode 100644 test/test_adminpaymenthistoryfields.py create mode 100644 test/test_adminpaymenthistoryresponse.py create mode 100644 test/test_attach_firewall_with_vm.py create mode 100644 test/test_attach_firewalls_to_vm_payload.py rename test/{test_get_token_response.py => test_auth_get_token_response_model.py} (60%) rename test/{test_request_login_data_response.py => test_auth_request_login_fields.py} (60%) rename test/{test_request_login_response.py => test_auth_request_login_response_model.py} (57%) rename test/{test_user_fields.py => test_auth_user_fields.py} (68%) rename test/{test_user_info_response.py => test_auth_user_info_response_model.py} (62%) create mode 100644 test/test_billingimmuneresources.py create mode 100644 test/test_billingimmuneresourcesresponse.py rename test/{test_api_key.py => test_common_response_model.py} (61%) create mode 100644 test/test_contract_instance_fields.py create mode 100644 test/test_contract_instances_response.py create mode 100644 test/test_create_contarct_fields.py create mode 100644 test/test_create_contract_payload.py create mode 100644 test/test_create_firewall_payload.py create mode 100644 test/test_create_firewall_rule_payload.py rename test/{test_permission_payload.py => test_create_update_permission_payload.py} (62%) rename test/{test_permission_response.py => test_create_update_permission_response_model.py} (63%) rename test/{test_policy_payload.py => test_create_update_policy_payload.py} (66%) rename test/{test_policy_response.py => test_create_update_policy_response_model.py} (68%) rename test/{test_rbac_role_payload.py => test_create_update_rbac_role_payload.py} (64%) create mode 100644 test/test_customer_contract_api.py create mode 100644 test/test_customer_contract_detail_response_model.py create mode 100644 test/test_customer_contract_fields.py create mode 100644 test/test_customer_fields.py create mode 100644 test/test_customer_payload.py create mode 100644 test/test_discount_entity_model.py create mode 100644 test/test_discount_fields.py create mode 100644 test/test_discount_plan_fields.py create mode 100644 test/test_editlabelofanexisting_vm_payload.py delete mode 100644 test/test_envrionment_resources.py create mode 100644 test/test_excludebillingpostpayload.py create mode 100644 test/test_excludebillingpostresponse.py create mode 100644 test/test_firewall_attachment_api.py rename test/{test_cluster_resource.py => test_firewall_attachment_model.py} (54%) create mode 100644 test/test_firewall_attachment_vm_model.py create mode 100644 test/test_firewall_detail_fields.py create mode 100644 test/test_firewall_detail_response.py rename test/{test_flavor_resource.py => test_firewall_environment_fields.py} (58%) rename test/{test_container_resource.py => test_firewall_fields.py} (56%) create mode 100644 test/test_firewall_response.py create mode 100644 test/test_firewall_rule.py create mode 100644 test/test_firewalls_api.py create mode 100644 test/test_firewalls_list_response.py create mode 100644 test/test_flavor_admin_response.py create mode 100644 test/test_flavor_admin_response_flavors.py create mode 100644 test/test_flavor_detail_response.py create mode 100644 test/test_flavor_vm_fields.py create mode 100644 test/test_flavor_vms_response.py create mode 100644 test/test_generate_api_key_response_model.py create mode 100644 test/test_get_all_discounts_fields.py create mode 100644 test/test_get_api_key_response_model.py create mode 100644 test/test_get_contract_detail_response_model.py create mode 100644 test/test_get_contract_events_response_model.py create mode 100644 test/test_get_contracts_list_response_model.py create mode 100644 test/test_get_customer_contracts_list_response_model.py create mode 100644 test/test_get_discount_detail_response.py rename test/{test_discount_detail_response.py => test_get_discount_response.py} (51%) create mode 100644 test/test_get_entity_discount_detail_response.py rename test/{test_invites.py => test_get_invites_response_model.py} (68%) rename test/{test_organization_model.py => test_get_organization_response_model.py} (56%) rename test/{test_permissions.py => test_get_permissions_response_model.py} (68%) rename test/{test_policies.py => test_get_policies_response_model.py} (72%) rename test/{test_rbac_roles.py => test_get_rbac_roles_response_model.py} (72%) rename test/{test_get_token.py => test_get_token_payload.py} (67%) rename test/{test_permissionsfor_user_permission.py => test_get_user_permissions_response_model.py} (58%) rename test/{test_api_keygeneration.py => test_get_version_response.py} (62%) create mode 100644 test/test_instance_admin.py create mode 100644 test/test_instance_fields.py create mode 100644 test/test_instances_admin.py create mode 100644 test/test_instances_summary_admin.py rename test/{test_instance_resources.py => test_instances_summary_fields.py} (56%) rename test/{test_removemember.py => test_invite_user_payload.py} (64%) rename test/{test_invite.py => test_invite_user_response_model.py} (67%) rename test/{test_invite_user.py => test_lable_resonse.py} (63%) rename test/{test_logout.py => test_logout_payload.py} (66%) create mode 100644 test/test_metric_item_fields.py create mode 100644 test/test_metrics_fields.py rename test/{test_organization_info_model.py => test_organization_fields.py} (60%) rename test/{test_organization_user_model.py => test_organization_user_response_model.py} (63%) rename test/{test_rbac_role.py => test_rbac_role_detail_response_model.py} (70%) rename test/{test_api_key_payload.py => test_rbac_role_field.py} (63%) rename test/{test_refresh_token.py => test_refresh_token_payload.py} (69%) create mode 100644 test/test_remove_member_from_organization_response_model.py rename test/{test_remove_member_response.py => test_remove_member_payload.py} (62%) create mode 100644 test/test_set_defaults_payload.py create mode 100644 test/test_update_contract_payload.py rename test/{test_rbac_role_fieldfor_organization.py => test_update_organization_payload.py} (57%) create mode 100644 test/test_update_organization_response_model.py create mode 100644 test/test_user_api.py rename test/{test_permission_fieldsfor_user_permission.py => test_user_default_choice_for_admin_fields.py} (53%) create mode 100644 test/test_user_default_choice_for_user_fields.py create mode 100644 test/test_user_default_choices_for_admin_response.py create mode 100644 test/test_user_default_choices_for_user_response.py create mode 100644 test/test_user_detail_choice_api.py create mode 100644 test/test_user_permission_fields.py create mode 100644 test/test_user_transfer_payload.py create mode 100644 test/test_userinfopostpayload.py create mode 100644 test/test_users_info_fields.py create mode 100644 test/test_users_info_list_response.py create mode 100644 test/test_verify_api_key_payload.py rename test/{test_api_key_verify_response.py => test_verify_api_key_response_model.py} (65%) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0eb155f..eb32bb2 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,53 +1,113 @@ .github/workflows/python.yml .gitignore .gitlab-ci.yml +.openapi-generator-ignore .travis.yml README.md -docs/APIKey.md -docs/APIKeyFields.md -docs/APIKeyPayload.md -docs/APIKeygeneration.md +docs/AddUpdateFlavorOrganizationPayload.md +docs/AddUserInfoSuccessResponseModel.md +docs/AdminAddUpdateImageOrganizationPayload.md +docs/AdminBootstrapEnvironmentPayload.md +docs/AdminClusterResource.md +docs/AdminContainerResource.md +docs/AdminContractEventFields.md +docs/AdminContractFields.md +docs/AdminCountResourcesOrganization.md +docs/AdminCountResourcesOrganizations.md +docs/AdminCreateContractResponseModel.md +docs/AdminEnvrionmentResources.md +docs/AdminFlavorDetailFields.md +docs/AdminFlavorDetailNodeFields.md +docs/AdminFlavorResource.md +docs/AdminFlavorResourcesList.md +docs/AdminGetContractDetailFields.md +docs/AdminGetVersionResponse.md +docs/AdminHibernationRestorationPayloadModel.md +docs/AdminImageAdminFields.md +docs/AdminImageAdminResponse.md +docs/AdminImageAdminResponseImage.md +docs/AdminImageListAdminResponse.md +docs/AdminInstanceResources.md +docs/AdminNodeResource.md +docs/AdminOrganizationResourceList.md +docs/AdminOrganizationResourceResponse.md +docs/AdminOrganizationResources.md +docs/AdminOrganizationResponseModel.md +docs/AdminOrganizationSummaryFields.md +docs/AdminOrganizationsResponseModel.md +docs/AdminOrganizationsSummaryResponseModel.md +docs/AdminUserFields.md +docs/AdminUserResponseModel.md +docs/AdminUsersResponseModel.md +docs/AdminVersionResponseModel.md +docs/AdminVolumeResource.md docs/Adminaddorganizationpayload.md docs/Admincreditpostpayload.md +docs/Adminpaymenthistoryfields.md +docs/Adminpaymenthistoryresponse.md docs/Adminrechargehistoryfields.md docs/Adminrechargehistoryresponse.md docs/Adminthresholdpostpayload.md docs/AliveApi.md docs/ApiKeyApi.md +docs/ApiKeyFields.md docs/ApiKeyVerifyFields.md -docs/ApiKeyVerifyResponse.md -docs/AssignRBACRolePayload.md +docs/AssignRbacRolePayload.md docs/AssigningMemberRoleApi.md docs/AttachCallbackPayload.md docs/AttachCallbackResponse.md +docs/AttachFirewallWithVM.md +docs/AttachFirewallsToVMPayload.md docs/AttachVolumeFields.md docs/AttachVolumes.md docs/AttachVolumesPayload.md docs/AuthApi.md +docs/AuthGetTokenResponseModel.md +docs/AuthRequestLoginFields.md +docs/AuthRequestLoginResponseModel.md +docs/AuthUserFields.md +docs/AuthUserInfoResponseModel.md docs/BillingApi.md docs/BillingResponse.md +docs/Billingimmuneresources.md +docs/Billingimmuneresourcesresponse.md docs/Billingmetricesfields.md docs/Billingmetricesresponse.md docs/CallbacksApi.md -docs/ClusterResource.md +docs/CommonResponseModel.md docs/ComplianceApi.md docs/ComplianceFields.md docs/ComplianceModelFields.md docs/CompliancePayload.md docs/ComplianceResponse.md docs/ContainerOverviewFields.md -docs/ContainerResource.md +docs/ContractInstanceFields.md +docs/ContractInstancesResponse.md +docs/CreateContarctFields.md +docs/CreateContractPayload.md docs/CreateDiscountResponse.md docs/CreateDiscountsPayload.md docs/CreateEnvironment.md +docs/CreateFirewallPayload.md +docs/CreateFirewallRulePayload.md docs/CreateGPU.md docs/CreateInstancesPayload.md docs/CreateProfilePayload.md docs/CreateProfileResponse.md docs/CreateSecurityRulePayload.md docs/CreateUpdateComplianceResponse.md +docs/CreateUpdatePermissionPayload.md +docs/CreateUpdatePermissionResponseModel.md +docs/CreateUpdatePolicyPayload.md +docs/CreateUpdatePolicyResponseModel.md +docs/CreateUpdateRbacRolePayload.md docs/CreateVolumePayload.md docs/CreditApi.md +docs/CustomerContractApi.md +docs/CustomerContractDetailResponseModel.md +docs/CustomerContractFields.md +docs/CustomerFields.md +docs/CustomerPayload.md docs/DashboardApi.md docs/DashboardInfoResponse.md docs/DeploymentApi.md @@ -56,23 +116,42 @@ docs/DeploymentFieldsforstartdeployments.md docs/Deployments.md docs/DetachVolumes.md docs/DetachVolumesPayload.md -docs/DiscountDetailResponse.md +docs/DiscountEntityModel.md +docs/DiscountFields.md +docs/DiscountPlanFields.md docs/DiscountResourceFields.md +docs/EditlabelofanexistingVMPayload.md docs/Environment.md docs/EnvironmentApi.md docs/EnvironmentFields.md docs/EnvironmentFieldsforVolume.md docs/Environments.md -docs/EnvrionmentResources.md docs/ErrorResponseModel.md +docs/Excludebillingpostpayload.md +docs/Excludebillingpostresponse.md +docs/FirewallAttachmentApi.md +docs/FirewallAttachmentModel.md +docs/FirewallAttachmentVMModel.md +docs/FirewallDetailFields.md +docs/FirewallDetailResponse.md +docs/FirewallEnvironmentFields.md +docs/FirewallFields.md +docs/FirewallResponse.md +docs/FirewallRule.md +docs/FirewallsApi.md +docs/FirewallsListResponse.md +docs/FlavorAdminResponse.md +docs/FlavorAdminResponseFlavors.md docs/FlavorApi.md +docs/FlavorDetailResponse.md docs/FlavorFields.md docs/FlavorItemGetResponse.md docs/FlavorListResponse.md docs/FlavorObjectFields.md docs/FlavorPayload.md -docs/FlavorResource.md docs/FlavorResponse.md +docs/FlavorVMFields.md +docs/FlavorVMsResponse.md docs/FloatingIpApi.md docs/FutureNodeModel.md docs/FutureNodeResponseModel.md @@ -83,9 +162,25 @@ docs/GPU.md docs/GPUFields.md docs/GPUList.md docs/GPURegionFields.md +docs/GenerateApiKeyResponseModel.md docs/GetAllDiscountForAllOrganizationResponse.md -docs/GetToken.md -docs/GetTokenResponse.md +docs/GetAllDiscountsFields.md +docs/GetApiKeyResponseModel.md +docs/GetContractDetailResponseModel.md +docs/GetContractEventsResponseModel.md +docs/GetContractsListResponseModel.md +docs/GetCustomerContractsListResponseModel.md +docs/GetDiscountDetailResponse.md +docs/GetDiscountResponse.md +docs/GetEntityDiscountDetailResponse.md +docs/GetInvitesResponseModel.md +docs/GetOrganizationResponseModel.md +docs/GetPermissionsResponseModel.md +docs/GetPoliciesResponseModel.md +docs/GetRbacRolesResponseModel.md +docs/GetTokenPayload.md +docs/GetUserPermissionsResponseModel.md +docs/GetVersionResponse.md docs/Getcreditandthresholdinfo.md docs/Getcreditandthresholdinfoinresponse.md docs/GpuApi.md @@ -99,17 +194,21 @@ docs/ImportKeypairResponse.md docs/InfrahubResourceObjectResponse.md docs/InsertDiscountPlanFields.md docs/Instance.md +docs/InstanceAdmin.md docs/InstanceAdminFields.md docs/InstanceEnvironmentFields.md docs/InstanceEvents.md docs/InstanceEventsFields.md +docs/InstanceFields.md docs/InstanceFlavorFields.md docs/InstanceImageFields.md docs/InstanceKeypairFields.md docs/InstanceOverviewFields.md docs/InstanceResizePayload.md -docs/InstanceResources.md docs/Instances.md +docs/InstancesAdmin.md +docs/InstancesSummaryAdmin.md +docs/InstancesSummaryFields.md docs/InternalEnvironmentFields.md docs/InternalInstanceFields.md docs/InternalInstanceFlavorFields.md @@ -120,18 +219,20 @@ docs/InternalSecurityRulesFieldsForInstance.md docs/InternalVolumeAttachmentFields.md docs/InternalVolumeFields.md docs/InternalVolumesResponse.md -docs/Invite.md docs/InviteApi.md docs/InviteFields.md -docs/InviteUser.md -docs/Invites.md +docs/InviteUserPayload.md +docs/InviteUserResponseModel.md docs/KeypairApi.md docs/KeypairFields.md docs/Keypairs.md +docs/LableResonse.md docs/Lastdaycostfields.md docs/Lastdaycostresponse.md docs/LogoGetResponse.md -docs/Logout.md +docs/LogoutPayload.md +docs/MetricItemFields.md +docs/MetricsFields.md docs/NewConfigurationsResponse.md docs/NewModelResponse.md docs/NewStockResponse.md @@ -145,15 +246,9 @@ docs/NodeStockPayloadModel.md docs/NodeStockResponseModel.md docs/NodeStocksPayload.md docs/OrganizationApi.md -docs/OrganizationInfoModel.md -docs/OrganizationModel.md +docs/OrganizationFields.md docs/OrganizationObjectResponse.md -docs/OrganizationResourceList.md -docs/OrganizationResourceResponse.md -docs/OrganizationResources.md -docs/OrganizationResponseModel.md -docs/OrganizationUserModel.md -docs/OrganizationsResponseModel.md +docs/OrganizationUserResponseModel.md docs/OverviewInfo.md docs/PaymentApi.md docs/PaymentDetailsFields.md @@ -163,17 +258,9 @@ docs/PaymentInitiatePayload.md docs/PaymentInitiateResponse.md docs/PermissionApi.md docs/PermissionFields.md -docs/PermissionFieldsforUserPermission.md -docs/PermissionPayload.md -docs/PermissionResponse.md -docs/Permissions.md -docs/PermissionsforUserPermission.md -docs/Policies.md docs/PolicyApi.md docs/PolicyFields.md -docs/PolicyPayload.md docs/PolicyPermissionFields.md -docs/PolicyResponse.md docs/PowerUsageModel.md docs/PricebookApi.md docs/PricebookModel.md @@ -182,23 +269,19 @@ docs/ProfileApi.md docs/ProfileFields.md docs/ProfileListResponse.md docs/ProfileObjectFields.md -docs/RBACRole.md -docs/RBACRoleFieldforOrganization.md -docs/RBACRoleFields.md -docs/RBACRolePayload.md -docs/RBACRoles.md docs/RbacRoleApi.md -docs/RefreshToken.md +docs/RbacRoleDetailResponseModel.md +docs/RbacRoleField.md +docs/RbacRoleFields.md +docs/RefreshTokenPayload.md docs/RegionApi.md docs/RegionFields.md docs/RegionPayload.md docs/RegionResponse.md docs/Regions.md -docs/RemoveMemberResponse.md -docs/Removemember.md +docs/RemoveMemberFromOrganizationResponseModel.md +docs/RemoveMemberPayload.md docs/RequestConsole.md -docs/RequestLoginDataResponse.md -docs/RequestLoginResponse.md docs/ResourcePayload.md docs/ResponseModel.md docs/RolePermissionFields.md @@ -208,6 +291,7 @@ docs/SecurityGroupRuleFields.md docs/SecurityRulesApi.md docs/SecurityRulesFieldsforInstance.md docs/SecurityRulesProtocolFields.md +docs/SetDefaultsPayload.md docs/SingleVisibilityUserResponse.md docs/StartDeployment.md docs/StartDeploymentPayload.md @@ -220,18 +304,32 @@ docs/TemplateApi.md docs/TemplateFields.md docs/Templates.md docs/TokenFields.md +docs/UpdateContractPayload.md docs/UpdateDiscountsPayload.md docs/UpdateDiscountsStatusPayload.md docs/UpdateEnvironment.md docs/UpdateGPU.md docs/UpdateKeypairName.md docs/UpdateKeypairnameresponse.md +docs/UpdateOrganizationPayload.md +docs/UpdateOrganizationResponseModel.md docs/UpdateTemplate.md -docs/UserFields.md -docs/UserInfoResponse.md +docs/UserApi.md +docs/UserDefaultChoiceForAdminFields.md +docs/UserDefaultChoiceForUserFields.md +docs/UserDefaultChoicesForAdminResponse.md +docs/UserDefaultChoicesForUserResponse.md +docs/UserDetailChoiceApi.md docs/UserPermissionApi.md +docs/UserPermissionFields.md +docs/UserTransferPayload.md +docs/Userinfopostpayload.md +docs/UsersInfoFields.md +docs/UsersInfoListResponse.md docs/VNCURL.md docs/VNCURLFields.md +docs/VerifyApiKeyPayload.md +docs/VerifyApiKeyResponseModel.md docs/VirtualMachineApi.md docs/VirtualMachineEventsApi.md docs/VncUrlApi.md @@ -242,7 +340,6 @@ docs/VolumeAttachmentFields.md docs/VolumeFields.md docs/VolumeFieldsforInstance.md docs/VolumeOverviewFields.md -docs/VolumeResource.md docs/VolumeTypes.md docs/Volumes.md git_push.sh @@ -256,9 +353,12 @@ hyperstack/api/billing_api.py hyperstack/api/callbacks_api.py hyperstack/api/compliance_api.py hyperstack/api/credit_api.py +hyperstack/api/customer_contract_api.py hyperstack/api/dashboard_api.py hyperstack/api/deployment_api.py hyperstack/api/environment_api.py +hyperstack/api/firewall_attachment_api.py +hyperstack/api/firewalls_api.py hyperstack/api/flavor_api.py hyperstack/api/floating_ip_api.py hyperstack/api/gpu_api.py @@ -276,6 +376,8 @@ hyperstack/api/region_api.py hyperstack/api/security_rules_api.py hyperstack/api/stock_api.py hyperstack/api/template_api.py +hyperstack/api/user_api.py +hyperstack/api/user_detail_choice_api.py hyperstack/api/user_permission_api.py hyperstack/api/virtual_machine_api.py hyperstack/api/virtual_machine_events_api.py @@ -287,72 +389,163 @@ hyperstack/api_response.py hyperstack/configuration.py hyperstack/exceptions.py hyperstack/models/__init__.py +hyperstack/models/add_update_flavor_organization_payload.py +hyperstack/models/add_user_info_success_response_model.py +hyperstack/models/admin_add_update_image_organization_payload.py +hyperstack/models/admin_bootstrap_environment_payload.py +hyperstack/models/admin_cluster_resource.py +hyperstack/models/admin_container_resource.py +hyperstack/models/admin_contract_event_fields.py +hyperstack/models/admin_contract_fields.py +hyperstack/models/admin_count_resources_organization.py +hyperstack/models/admin_count_resources_organizations.py +hyperstack/models/admin_create_contract_response_model.py +hyperstack/models/admin_envrionment_resources.py +hyperstack/models/admin_flavor_detail_fields.py +hyperstack/models/admin_flavor_detail_node_fields.py +hyperstack/models/admin_flavor_resource.py +hyperstack/models/admin_flavor_resources_list.py +hyperstack/models/admin_get_contract_detail_fields.py +hyperstack/models/admin_get_version_response.py +hyperstack/models/admin_hibernation_restoration_payload_model.py +hyperstack/models/admin_image_admin_fields.py +hyperstack/models/admin_image_admin_response.py +hyperstack/models/admin_image_admin_response_image.py +hyperstack/models/admin_image_list_admin_response.py +hyperstack/models/admin_instance_resources.py +hyperstack/models/admin_node_resource.py +hyperstack/models/admin_organization_resource_list.py +hyperstack/models/admin_organization_resource_response.py +hyperstack/models/admin_organization_resources.py +hyperstack/models/admin_organization_response_model.py +hyperstack/models/admin_organization_summary_fields.py +hyperstack/models/admin_organizations_response_model.py +hyperstack/models/admin_organizations_summary_response_model.py +hyperstack/models/admin_user_fields.py +hyperstack/models/admin_user_response_model.py +hyperstack/models/admin_users_response_model.py +hyperstack/models/admin_version_response_model.py +hyperstack/models/admin_volume_resource.py hyperstack/models/adminaddorganizationpayload.py hyperstack/models/admincreditpostpayload.py +hyperstack/models/adminpaymenthistoryfields.py +hyperstack/models/adminpaymenthistoryresponse.py hyperstack/models/adminrechargehistoryfields.py hyperstack/models/adminrechargehistoryresponse.py hyperstack/models/adminthresholdpostpayload.py -hyperstack/models/api_key.py hyperstack/models/api_key_fields.py -hyperstack/models/api_key_payload.py hyperstack/models/api_key_verify_fields.py -hyperstack/models/api_key_verify_response.py -hyperstack/models/api_keygeneration.py hyperstack/models/assign_rbac_role_payload.py hyperstack/models/attach_callback_payload.py hyperstack/models/attach_callback_response.py +hyperstack/models/attach_firewall_with_vm.py +hyperstack/models/attach_firewalls_to_vm_payload.py hyperstack/models/attach_volume_fields.py hyperstack/models/attach_volumes.py hyperstack/models/attach_volumes_payload.py +hyperstack/models/auth_get_token_response_model.py +hyperstack/models/auth_request_login_fields.py +hyperstack/models/auth_request_login_response_model.py +hyperstack/models/auth_user_fields.py +hyperstack/models/auth_user_info_response_model.py hyperstack/models/billing_response.py +hyperstack/models/billingimmuneresources.py +hyperstack/models/billingimmuneresourcesresponse.py hyperstack/models/billingmetricesfields.py hyperstack/models/billingmetricesresponse.py -hyperstack/models/cluster_resource.py +hyperstack/models/common_response_model.py hyperstack/models/compliance_fields.py hyperstack/models/compliance_model_fields.py hyperstack/models/compliance_payload.py hyperstack/models/compliance_response.py hyperstack/models/container_overview_fields.py -hyperstack/models/container_resource.py +hyperstack/models/contract_instance_fields.py +hyperstack/models/contract_instances_response.py +hyperstack/models/create_contarct_fields.py +hyperstack/models/create_contract_payload.py hyperstack/models/create_discount_response.py hyperstack/models/create_discounts_payload.py hyperstack/models/create_environment.py +hyperstack/models/create_firewall_payload.py +hyperstack/models/create_firewall_rule_payload.py hyperstack/models/create_gpu.py hyperstack/models/create_instances_payload.py hyperstack/models/create_profile_payload.py hyperstack/models/create_profile_response.py hyperstack/models/create_security_rule_payload.py hyperstack/models/create_update_compliance_response.py +hyperstack/models/create_update_permission_payload.py +hyperstack/models/create_update_permission_response_model.py +hyperstack/models/create_update_policy_payload.py +hyperstack/models/create_update_policy_response_model.py +hyperstack/models/create_update_rbac_role_payload.py hyperstack/models/create_volume_payload.py +hyperstack/models/customer_contract_detail_response_model.py +hyperstack/models/customer_contract_fields.py +hyperstack/models/customer_fields.py +hyperstack/models/customer_payload.py hyperstack/models/dashboard_info_response.py hyperstack/models/deployment_fields.py hyperstack/models/deployment_fieldsforstartdeployments.py hyperstack/models/deployments.py hyperstack/models/detach_volumes.py hyperstack/models/detach_volumes_payload.py -hyperstack/models/discount_detail_response.py +hyperstack/models/discount_entity_model.py +hyperstack/models/discount_fields.py +hyperstack/models/discount_plan_fields.py hyperstack/models/discount_resource_fields.py +hyperstack/models/editlabelofanexisting_vm_payload.py hyperstack/models/environment.py hyperstack/models/environment_fields.py hyperstack/models/environment_fieldsfor_volume.py hyperstack/models/environments.py -hyperstack/models/envrionment_resources.py hyperstack/models/error_response_model.py +hyperstack/models/excludebillingpostpayload.py +hyperstack/models/excludebillingpostresponse.py +hyperstack/models/firewall_attachment_model.py +hyperstack/models/firewall_attachment_vm_model.py +hyperstack/models/firewall_detail_fields.py +hyperstack/models/firewall_detail_response.py +hyperstack/models/firewall_environment_fields.py +hyperstack/models/firewall_fields.py +hyperstack/models/firewall_response.py +hyperstack/models/firewall_rule.py +hyperstack/models/firewalls_list_response.py +hyperstack/models/flavor_admin_response.py +hyperstack/models/flavor_admin_response_flavors.py +hyperstack/models/flavor_detail_response.py hyperstack/models/flavor_fields.py hyperstack/models/flavor_item_get_response.py hyperstack/models/flavor_list_response.py hyperstack/models/flavor_object_fields.py hyperstack/models/flavor_payload.py -hyperstack/models/flavor_resource.py hyperstack/models/flavor_response.py +hyperstack/models/flavor_vm_fields.py +hyperstack/models/flavor_vms_response.py hyperstack/models/future_node_model.py hyperstack/models/future_node_response_model.py hyperstack/models/future_node_stock_model.py hyperstack/models/future_node_update_model.py hyperstack/models/future_nodes_stock_model.py +hyperstack/models/generate_api_key_response_model.py hyperstack/models/get_all_discount_for_all_organization_response.py -hyperstack/models/get_token.py -hyperstack/models/get_token_response.py +hyperstack/models/get_all_discounts_fields.py +hyperstack/models/get_api_key_response_model.py +hyperstack/models/get_contract_detail_response_model.py +hyperstack/models/get_contract_events_response_model.py +hyperstack/models/get_contracts_list_response_model.py +hyperstack/models/get_customer_contracts_list_response_model.py +hyperstack/models/get_discount_detail_response.py +hyperstack/models/get_discount_response.py +hyperstack/models/get_entity_discount_detail_response.py +hyperstack/models/get_invites_response_model.py +hyperstack/models/get_organization_response_model.py +hyperstack/models/get_permissions_response_model.py +hyperstack/models/get_policies_response_model.py +hyperstack/models/get_rbac_roles_response_model.py +hyperstack/models/get_token_payload.py +hyperstack/models/get_user_permissions_response_model.py +hyperstack/models/get_version_response.py hyperstack/models/getcreditandthresholdinfo.py hyperstack/models/getcreditandthresholdinfoinresponse.py hyperstack/models/gpu.py @@ -368,17 +561,21 @@ hyperstack/models/import_keypair_response.py hyperstack/models/infrahub_resource_object_response.py hyperstack/models/insert_discount_plan_fields.py hyperstack/models/instance.py +hyperstack/models/instance_admin.py hyperstack/models/instance_admin_fields.py hyperstack/models/instance_environment_fields.py hyperstack/models/instance_events.py hyperstack/models/instance_events_fields.py +hyperstack/models/instance_fields.py hyperstack/models/instance_flavor_fields.py hyperstack/models/instance_image_fields.py hyperstack/models/instance_keypair_fields.py hyperstack/models/instance_overview_fields.py hyperstack/models/instance_resize_payload.py -hyperstack/models/instance_resources.py hyperstack/models/instances.py +hyperstack/models/instances_admin.py +hyperstack/models/instances_summary_admin.py +hyperstack/models/instances_summary_fields.py hyperstack/models/internal_environment_fields.py hyperstack/models/internal_instance_fields.py hyperstack/models/internal_instance_flavor_fields.py @@ -389,16 +586,18 @@ hyperstack/models/internal_security_rules_fields_for_instance.py hyperstack/models/internal_volume_attachment_fields.py hyperstack/models/internal_volume_fields.py hyperstack/models/internal_volumes_response.py -hyperstack/models/invite.py hyperstack/models/invite_fields.py -hyperstack/models/invite_user.py -hyperstack/models/invites.py +hyperstack/models/invite_user_payload.py +hyperstack/models/invite_user_response_model.py hyperstack/models/keypair_fields.py hyperstack/models/keypairs.py +hyperstack/models/lable_resonse.py hyperstack/models/lastdaycostfields.py hyperstack/models/lastdaycostresponse.py hyperstack/models/logo_get_response.py -hyperstack/models/logout.py +hyperstack/models/logout_payload.py +hyperstack/models/metric_item_fields.py +hyperstack/models/metrics_fields.py hyperstack/models/new_configurations_response.py hyperstack/models/new_model_response.py hyperstack/models/new_stock_response.py @@ -411,15 +610,9 @@ hyperstack/models/node_response_model.py hyperstack/models/node_stock_payload_model.py hyperstack/models/node_stock_response_model.py hyperstack/models/node_stocks_payload.py -hyperstack/models/organization_info_model.py -hyperstack/models/organization_model.py +hyperstack/models/organization_fields.py hyperstack/models/organization_object_response.py -hyperstack/models/organization_resource_list.py -hyperstack/models/organization_resource_response.py -hyperstack/models/organization_resources.py -hyperstack/models/organization_response_model.py -hyperstack/models/organization_user_model.py -hyperstack/models/organizations_response_model.py +hyperstack/models/organization_user_response_model.py hyperstack/models/overview_info.py hyperstack/models/payment_details_fields.py hyperstack/models/payment_details_response.py @@ -427,37 +620,25 @@ hyperstack/models/payment_initiate_fields.py hyperstack/models/payment_initiate_payload.py hyperstack/models/payment_initiate_response.py hyperstack/models/permission_fields.py -hyperstack/models/permission_fieldsfor_user_permission.py -hyperstack/models/permission_payload.py -hyperstack/models/permission_response.py -hyperstack/models/permissions.py -hyperstack/models/permissionsfor_user_permission.py -hyperstack/models/policies.py hyperstack/models/policy_fields.py -hyperstack/models/policy_payload.py hyperstack/models/policy_permission_fields.py -hyperstack/models/policy_response.py hyperstack/models/power_usage_model.py hyperstack/models/pricebook_model.py hyperstack/models/pricebook_resource_object_response.py hyperstack/models/profile_fields.py hyperstack/models/profile_list_response.py hyperstack/models/profile_object_fields.py -hyperstack/models/rbac_role.py -hyperstack/models/rbac_role_fieldfor_organization.py +hyperstack/models/rbac_role_detail_response_model.py +hyperstack/models/rbac_role_field.py hyperstack/models/rbac_role_fields.py -hyperstack/models/rbac_role_payload.py -hyperstack/models/rbac_roles.py -hyperstack/models/refresh_token.py +hyperstack/models/refresh_token_payload.py hyperstack/models/region_fields.py hyperstack/models/region_payload.py hyperstack/models/region_response.py hyperstack/models/regions.py -hyperstack/models/remove_member_response.py -hyperstack/models/removemember.py +hyperstack/models/remove_member_from_organization_response_model.py +hyperstack/models/remove_member_payload.py hyperstack/models/request_console.py -hyperstack/models/request_login_data_response.py -hyperstack/models/request_login_response.py hyperstack/models/resource_payload.py hyperstack/models/response_model.py hyperstack/models/role_permission_fields.py @@ -466,6 +647,7 @@ hyperstack/models/security_group_rule.py hyperstack/models/security_group_rule_fields.py hyperstack/models/security_rules_fieldsfor_instance.py hyperstack/models/security_rules_protocol_fields.py +hyperstack/models/set_defaults_payload.py hyperstack/models/single_visibility_user_response.py hyperstack/models/start_deployment.py hyperstack/models/start_deployment_payload.py @@ -476,15 +658,27 @@ hyperstack/models/template.py hyperstack/models/template_fields.py hyperstack/models/templates.py hyperstack/models/token_fields.py +hyperstack/models/update_contract_payload.py hyperstack/models/update_discounts_payload.py hyperstack/models/update_discounts_status_payload.py hyperstack/models/update_environment.py hyperstack/models/update_gpu.py hyperstack/models/update_keypair_name.py hyperstack/models/update_keypairnameresponse.py +hyperstack/models/update_organization_payload.py +hyperstack/models/update_organization_response_model.py hyperstack/models/update_template.py -hyperstack/models/user_fields.py -hyperstack/models/user_info_response.py +hyperstack/models/user_default_choice_for_admin_fields.py +hyperstack/models/user_default_choice_for_user_fields.py +hyperstack/models/user_default_choices_for_admin_response.py +hyperstack/models/user_default_choices_for_user_response.py +hyperstack/models/user_permission_fields.py +hyperstack/models/user_transfer_payload.py +hyperstack/models/userinfopostpayload.py +hyperstack/models/users_info_fields.py +hyperstack/models/users_info_list_response.py +hyperstack/models/verify_api_key_payload.py +hyperstack/models/verify_api_key_response_model.py hyperstack/models/vncurl.py hyperstack/models/vncurl_fields.py hyperstack/models/volume.py @@ -492,7 +686,6 @@ hyperstack/models/volume_attachment_fields.py hyperstack/models/volume_fields.py hyperstack/models/volume_fieldsfor_instance.py hyperstack/models/volume_overview_fields.py -hyperstack/models/volume_resource.py hyperstack/models/volume_types.py hyperstack/models/volumes.py hyperstack/py.typed @@ -503,4 +696,342 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_add_update_flavor_organization_payload.py +test/test_add_user_info_success_response_model.py +test/test_admin_add_update_image_organization_payload.py +test/test_admin_bootstrap_environment_payload.py +test/test_admin_cluster_resource.py +test/test_admin_container_resource.py +test/test_admin_contract_event_fields.py +test/test_admin_contract_fields.py +test/test_admin_count_resources_organization.py +test/test_admin_count_resources_organizations.py +test/test_admin_create_contract_response_model.py +test/test_admin_envrionment_resources.py +test/test_admin_flavor_detail_fields.py +test/test_admin_flavor_detail_node_fields.py +test/test_admin_flavor_resource.py +test/test_admin_flavor_resources_list.py +test/test_admin_get_contract_detail_fields.py +test/test_admin_get_version_response.py +test/test_admin_hibernation_restoration_payload_model.py +test/test_admin_image_admin_fields.py +test/test_admin_image_admin_response.py +test/test_admin_image_admin_response_image.py +test/test_admin_image_list_admin_response.py +test/test_admin_instance_resources.py +test/test_admin_node_resource.py +test/test_admin_organization_resource_list.py +test/test_admin_organization_resource_response.py +test/test_admin_organization_resources.py +test/test_admin_organization_response_model.py +test/test_admin_organization_summary_fields.py +test/test_admin_organizations_response_model.py +test/test_admin_organizations_summary_response_model.py +test/test_admin_user_fields.py +test/test_admin_user_response_model.py +test/test_admin_users_response_model.py +test/test_admin_version_response_model.py +test/test_admin_volume_resource.py +test/test_adminaddorganizationpayload.py +test/test_admincreditpostpayload.py +test/test_adminpaymenthistoryfields.py +test/test_adminpaymenthistoryresponse.py +test/test_adminrechargehistoryfields.py +test/test_adminrechargehistoryresponse.py +test/test_adminthresholdpostpayload.py +test/test_alive_api.py +test/test_api_key_api.py +test/test_api_key_fields.py +test/test_api_key_verify_fields.py +test/test_assign_rbac_role_payload.py +test/test_assigning_member_role_api.py +test/test_attach_callback_payload.py +test/test_attach_callback_response.py +test/test_attach_firewall_with_vm.py +test/test_attach_firewalls_to_vm_payload.py +test/test_attach_volume_fields.py +test/test_attach_volumes.py +test/test_attach_volumes_payload.py +test/test_auth_api.py +test/test_auth_get_token_response_model.py +test/test_auth_request_login_fields.py +test/test_auth_request_login_response_model.py +test/test_auth_user_fields.py +test/test_auth_user_info_response_model.py +test/test_billing_api.py +test/test_billing_response.py +test/test_billingimmuneresources.py +test/test_billingimmuneresourcesresponse.py +test/test_billingmetricesfields.py +test/test_billingmetricesresponse.py +test/test_callbacks_api.py +test/test_common_response_model.py +test/test_compliance_api.py +test/test_compliance_fields.py +test/test_compliance_model_fields.py +test/test_compliance_payload.py +test/test_compliance_response.py +test/test_container_overview_fields.py +test/test_contract_instance_fields.py +test/test_contract_instances_response.py +test/test_create_contarct_fields.py +test/test_create_contract_payload.py +test/test_create_discount_response.py +test/test_create_discounts_payload.py +test/test_create_environment.py +test/test_create_firewall_payload.py +test/test_create_firewall_rule_payload.py +test/test_create_gpu.py +test/test_create_instances_payload.py +test/test_create_profile_payload.py +test/test_create_profile_response.py +test/test_create_security_rule_payload.py +test/test_create_update_compliance_response.py +test/test_create_update_permission_payload.py +test/test_create_update_permission_response_model.py +test/test_create_update_policy_payload.py +test/test_create_update_policy_response_model.py +test/test_create_update_rbac_role_payload.py +test/test_create_volume_payload.py +test/test_credit_api.py +test/test_customer_contract_api.py +test/test_customer_contract_detail_response_model.py +test/test_customer_contract_fields.py +test/test_customer_fields.py +test/test_customer_payload.py +test/test_dashboard_api.py +test/test_dashboard_info_response.py +test/test_deployment_api.py +test/test_deployment_fields.py +test/test_deployment_fieldsforstartdeployments.py +test/test_deployments.py +test/test_detach_volumes.py +test/test_detach_volumes_payload.py +test/test_discount_entity_model.py +test/test_discount_fields.py +test/test_discount_plan_fields.py +test/test_discount_resource_fields.py +test/test_editlabelofanexisting_vm_payload.py +test/test_environment.py +test/test_environment_api.py +test/test_environment_fields.py +test/test_environment_fieldsfor_volume.py +test/test_environments.py +test/test_error_response_model.py +test/test_excludebillingpostpayload.py +test/test_excludebillingpostresponse.py +test/test_firewall_attachment_api.py +test/test_firewall_attachment_model.py +test/test_firewall_attachment_vm_model.py +test/test_firewall_detail_fields.py +test/test_firewall_detail_response.py +test/test_firewall_environment_fields.py +test/test_firewall_fields.py +test/test_firewall_response.py +test/test_firewall_rule.py +test/test_firewalls_api.py +test/test_firewalls_list_response.py +test/test_flavor_admin_response.py +test/test_flavor_admin_response_flavors.py +test/test_flavor_api.py +test/test_flavor_detail_response.py +test/test_flavor_fields.py +test/test_flavor_item_get_response.py +test/test_flavor_list_response.py +test/test_flavor_object_fields.py +test/test_flavor_payload.py +test/test_flavor_response.py +test/test_flavor_vm_fields.py +test/test_flavor_vms_response.py +test/test_floating_ip_api.py +test/test_future_node_model.py +test/test_future_node_response_model.py +test/test_future_node_stock_model.py +test/test_future_node_update_model.py +test/test_future_nodes_stock_model.py +test/test_generate_api_key_response_model.py +test/test_get_all_discount_for_all_organization_response.py +test/test_get_all_discounts_fields.py +test/test_get_api_key_response_model.py +test/test_get_contract_detail_response_model.py +test/test_get_contract_events_response_model.py +test/test_get_contracts_list_response_model.py +test/test_get_customer_contracts_list_response_model.py +test/test_get_discount_detail_response.py +test/test_get_discount_response.py +test/test_get_entity_discount_detail_response.py +test/test_get_invites_response_model.py +test/test_get_organization_response_model.py +test/test_get_permissions_response_model.py +test/test_get_policies_response_model.py +test/test_get_rbac_roles_response_model.py +test/test_get_token_payload.py +test/test_get_user_permissions_response_model.py +test/test_get_version_response.py +test/test_getcreditandthresholdinfo.py +test/test_getcreditandthresholdinfoinresponse.py +test/test_gpu.py +test/test_gpu_api.py +test/test_gpu_fields.py +test/test_gpu_list.py +test/test_gpu_region_fields.py +test/test_image_api.py +test/test_image_fields.py +test/test_image_get_response.py +test/test_image_logos.py +test/test_images.py +test/test_import_keypair_payload.py +test/test_import_keypair_response.py +test/test_infrahub_resource_object_response.py +test/test_insert_discount_plan_fields.py +test/test_instance.py +test/test_instance_admin.py +test/test_instance_admin_fields.py +test/test_instance_environment_fields.py +test/test_instance_events.py +test/test_instance_events_fields.py +test/test_instance_fields.py +test/test_instance_flavor_fields.py +test/test_instance_image_fields.py +test/test_instance_keypair_fields.py +test/test_instance_overview_fields.py +test/test_instance_resize_payload.py +test/test_instances.py +test/test_instances_admin.py +test/test_instances_summary_admin.py +test/test_instances_summary_fields.py +test/test_internal_environment_fields.py +test/test_internal_instance_fields.py +test/test_internal_instance_flavor_fields.py +test/test_internal_instance_image_fields.py +test/test_internal_instance_keypair_fields.py +test/test_internal_instances_response.py +test/test_internal_security_rules_fields_for_instance.py +test/test_internal_volume_attachment_fields.py +test/test_internal_volume_fields.py +test/test_internal_volumes_response.py +test/test_invite_api.py +test/test_invite_fields.py +test/test_invite_user_payload.py +test/test_invite_user_response_model.py +test/test_keypair_api.py +test/test_keypair_fields.py +test/test_keypairs.py +test/test_lable_resonse.py +test/test_lastdaycostfields.py +test/test_lastdaycostresponse.py +test/test_logo_get_response.py +test/test_logout_payload.py +test/test_metric_item_fields.py +test/test_metrics_fields.py +test/test_new_configurations_response.py +test/test_new_model_response.py +test/test_new_stock_response.py +test/test_new_stock_retrive_response.py +test/test_new_stock_update_response_model.py +test/test_node_model.py +test/test_node_payload_model.py +test/test_node_power_usage_model.py +test/test_node_response_model.py +test/test_node_stock_payload_model.py +test/test_node_stock_response_model.py +test/test_node_stocks_payload.py +test/test_organization_api.py +test/test_organization_fields.py +test/test_organization_object_response.py +test/test_organization_user_response_model.py +test/test_overview_info.py +test/test_payment_api.py +test/test_payment_details_fields.py +test/test_payment_details_response.py +test/test_payment_initiate_fields.py +test/test_payment_initiate_payload.py +test/test_payment_initiate_response.py +test/test_permission_api.py +test/test_permission_fields.py +test/test_policy_api.py +test/test_policy_fields.py +test/test_policy_permission_fields.py +test/test_power_usage_model.py +test/test_pricebook_api.py +test/test_pricebook_model.py +test/test_pricebook_resource_object_response.py +test/test_profile_api.py +test/test_profile_fields.py +test/test_profile_list_response.py +test/test_profile_object_fields.py +test/test_rbac_role_api.py +test/test_rbac_role_detail_response_model.py +test/test_rbac_role_field.py +test/test_rbac_role_fields.py +test/test_refresh_token_payload.py +test/test_region_api.py +test/test_region_fields.py +test/test_region_payload.py +test/test_region_response.py +test/test_regions.py +test/test_remove_member_from_organization_response_model.py +test/test_remove_member_payload.py +test/test_request_console.py +test/test_resource_payload.py +test/test_response_model.py +test/test_role_permission_fields.py +test/test_role_policy_fields.py +test/test_security_group_rule.py +test/test_security_group_rule_fields.py +test/test_security_rules_api.py +test/test_security_rules_fieldsfor_instance.py +test/test_security_rules_protocol_fields.py +test/test_set_defaults_payload.py +test/test_single_visibility_user_response.py +test/test_start_deployment.py +test/test_start_deployment_payload.py +test/test_stock_api.py +test/test_stock_visibility_user_list_response.py +test/test_stock_visibility_user_payload.py +test/test_success_response_model.py +test/test_template.py +test/test_template_api.py +test/test_template_fields.py +test/test_templates.py +test/test_token_fields.py +test/test_update_contract_payload.py +test/test_update_discounts_payload.py +test/test_update_discounts_status_payload.py +test/test_update_environment.py +test/test_update_gpu.py +test/test_update_keypair_name.py +test/test_update_keypairnameresponse.py +test/test_update_organization_payload.py +test/test_update_organization_response_model.py +test/test_update_template.py +test/test_user_api.py +test/test_user_default_choice_for_admin_fields.py +test/test_user_default_choice_for_user_fields.py +test/test_user_default_choices_for_admin_response.py +test/test_user_default_choices_for_user_response.py +test/test_user_detail_choice_api.py +test/test_user_permission_api.py +test/test_user_permission_fields.py +test/test_user_transfer_payload.py +test/test_userinfopostpayload.py +test/test_users_info_fields.py +test/test_users_info_list_response.py +test/test_verify_api_key_payload.py +test/test_verify_api_key_response_model.py +test/test_virtual_machine_api.py +test/test_virtual_machine_events_api.py +test/test_vnc_url_api.py +test/test_vncurl.py +test/test_vncurl_fields.py +test/test_volume.py +test/test_volume_api.py +test/test_volume_attachment_api.py +test/test_volume_attachment_fields.py +test/test_volume_fields.py +test/test_volume_fieldsfor_instance.py +test/test_volume_overview_fields.py +test/test_volume_types.py +test/test_volumes.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index fff4bdd..c9e125b 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.3.0-SNAPSHOT \ No newline at end of file +7.4.0-SNAPSHOT diff --git a/Makefile b/Makefile index 7e38c39..e14f1b6 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all generate clean +.PHONY: all generate clean remove UID := $(shell id -u) API_URL := https://infrahub-api-doc.nexgencloud.com/api.json @@ -27,3 +27,6 @@ openapi/api.patch: openapi/api.orig.json openapi/api.json clean: rm -f openapi/api.orig.json openapi/api.json openapi/api.patch + +remove: + rm -rf hyperstack docs test .github .openapi-generator .openapi-generator-ignore .gitlab-ci.yml .travis.yml README.md git_push.sh pyproject.toml requirements.txt setup.py setup.cfg test-requirements.txt tox.ini diff --git a/README.md b/README.md index 0787ce8..b657ec4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0 -- Package version: 3.0.1 +- Package version: 1.1.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -81,14 +81,16 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] # Enter a context with an instance of the API client with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class - api_instance = hyperstack.PricebookApi(api_client) + api_instance = hyperstack.CustomerContractApi(api_client) + contract_id = 56 # int | try: - api_response = api_instance.retrive_pricebook() - print("The response of PricebookApi->retrive_pricebook:\n") + # Details of Contract by ID for Customer + api_response = api_instance.details_of_contract_by_id_for_customer(contract_id) + print("The response of CustomerContractApi->details_of_contract_by_id_for_customer:\n") pprint(api_response) except ApiException as e: - print("Exception when calling PricebookApi->retrive_pricebook: %s\n" % e) + print("Exception when calling CustomerContractApi->details_of_contract_by_id_for_customer: %s\n" % e) ``` @@ -98,6 +100,8 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*CustomerContractApi* | [**details_of_contract_by_id_for_customer**](docs/CustomerContractApi.md#details_of_contract_by_id_for_customer) | **GET** /pricebook/contracts/{contract_id} | Details of Contract by ID for Customer +*CustomerContractApi* | [**list_contracts_for_customer**](docs/CustomerContractApi.md#list_contracts_for_customer) | **GET** /pricebook/contracts | List Contracts for Customer *PricebookApi* | [**retrive_pricebook**](docs/PricebookApi.md#retrive_pricebook) | **GET** /pricebook | *AliveApi* | [**get_alive**](docs/AliveApi.md#get_alive) | **GET** /billing/alive | GET: Alive *ApiKeyApi* | [**generate_api_key**](docs/ApiKeyApi.md#generate_api_key) | **POST** /api-key/generate | Generate API Key @@ -107,148 +111,238 @@ Class | Method | HTTP request | Description *AuthApi* | [**auth_user_information**](docs/AuthApi.md#auth_user_information) | **GET** /auth/me | Get me information *BillingApi* | [**get_last_day_cost**](docs/BillingApi.md#get_last_day_cost) | **GET** /billing/billing/last-day-cost | GET: Last Day Cost *BillingApi* | [**get_usage**](docs/BillingApi.md#get_usage) | **GET** /billing/billing/usage | GET: Billing usage -*CallbacksApi* | [**attach_a_callback_to_a_volume**](docs/CallbacksApi.md#attach_a_callback_to_a_volume) | **POST** /core/volumes/{id}/attach-callback | Attach a callback to a volume -*CallbacksApi* | [**attach_a_callback_to_an_instance**](docs/CallbacksApi.md#attach_a_callback_to_an_instance) | **POST** /core/virtual-machines/{id}/attach-callback | Attach a callback to an instance -*CallbacksApi* | [**delete_a_callback_url_for_an_instance**](docs/CallbacksApi.md#delete_a_callback_url_for_an_instance) | **DELETE** /core/virtual-machines/{id}/delete-callback | Delete a callback URL for an instance -*CallbacksApi* | [**delete_callback_url_for_a_volume**](docs/CallbacksApi.md#delete_callback_url_for_a_volume) | **DELETE** /core/volumes/{id}/delete-callback | Delete callback URL for a volume -*CallbacksApi* | [**update_a_callback_url**](docs/CallbacksApi.md#update_a_callback_url) | **PUT** /core/virtual-machines/{id}/update-callback | Update a callback URL -*CallbacksApi* | [**update_callback_url_for_volume**](docs/CallbacksApi.md#update_callback_url_for_volume) | **PUT** /core/volumes/{id}/update-callback | Update callback URL for volume -*ComplianceApi* | [**create_compliance**](docs/ComplianceApi.md#create_compliance) | **POST** /core/compliance | Create Compliance +*CallbacksApi* | [**attach_callback_to_virtual_machine**](docs/CallbacksApi.md#attach_callback_to_virtual_machine) | **POST** /core/virtual-machines/{id}/attach-callback | Attach callback to virtual machine +*CallbacksApi* | [**attach_callback_to_volume**](docs/CallbacksApi.md#attach_callback_to_volume) | **POST** /core/volumes/{id}/attach-callback | Attach callback to volume +*CallbacksApi* | [**delete_virtual_machine_callback**](docs/CallbacksApi.md#delete_virtual_machine_callback) | **DELETE** /core/virtual-machines/{id}/delete-callback | Delete virtual machine callback +*CallbacksApi* | [**delete_volume_callback**](docs/CallbacksApi.md#delete_volume_callback) | **DELETE** /core/volumes/{id}/delete-callback | Delete volume callback +*CallbacksApi* | [**update_virtual_machine_callback**](docs/CallbacksApi.md#update_virtual_machine_callback) | **PUT** /core/virtual-machines/{id}/update-callback | Update virtual machine callback +*CallbacksApi* | [**update_volume_callback**](docs/CallbacksApi.md#update_volume_callback) | **PUT** /core/volumes/{id}/update-callback | Update volume callback +*ComplianceApi* | [**create_compliance**](docs/ComplianceApi.md#create_compliance) | **POST** /core/compliance | Create compliance *ComplianceApi* | [**delete_a_compliance**](docs/ComplianceApi.md#delete_a_compliance) | **DELETE** /core/compliance/{gpu_model} | Delete a compliance -*ComplianceApi* | [**get_compliance_list**](docs/ComplianceApi.md#get_compliance_list) | **GET** /core/compliance | Get Compliance List +*ComplianceApi* | [**retrieve_compliance**](docs/ComplianceApi.md#retrieve_compliance) | **GET** /core/compliance | Retrieve GPU compliance *ComplianceApi* | [**update_a_compliance**](docs/ComplianceApi.md#update_a_compliance) | **PUT** /core/compliance | Update a compliance *CreditApi* | [**check_balance_as_an_organization**](docs/CreditApi.md#check_balance_as_an_organization) | **GET** /billing/user-credit/credit | GET: View credit and threshold -*DashboardApi* | [**get_instances_containers_and_volumes_overview**](docs/DashboardApi.md#get_instances_containers_and_volumes_overview) | **GET** /core/dashboard | Get Instances, Containers and Volumes Overview +*DashboardApi* | [**retrieve_dashboard**](docs/DashboardApi.md#retrieve_dashboard) | **GET** /core/dashboard | Retrieve Dashboard *DeploymentApi* | [**delete_deployment**](docs/DeploymentApi.md#delete_deployment) | **DELETE** /core/marketplace/deployments/{id} | Delete Deployment *DeploymentApi* | [**details_of_deployment_by_id**](docs/DeploymentApi.md#details_of_deployment_by_id) | **GET** /core/marketplace/deployments/{id} | Details of Deployment by ID *DeploymentApi* | [**list_deployments**](docs/DeploymentApi.md#list_deployments) | **GET** /core/marketplace/deployments | List Deployments *DeploymentApi* | [**start_deployment**](docs/DeploymentApi.md#start_deployment) | **POST** /core/marketplace/deployments | Start Deployment -*EnvironmentApi* | [**create_environment**](docs/EnvironmentApi.md#create_environment) | **POST** /core/environments | Create Environment -*EnvironmentApi* | [**delete_an_environment**](docs/EnvironmentApi.md#delete_an_environment) | **DELETE** /core/environments/{id} | Delete an environment -*EnvironmentApi* | [**get_an_environment_details**](docs/EnvironmentApi.md#get_an_environment_details) | **GET** /core/environments/{id} | Get an environment detail -*EnvironmentApi* | [**list_environments**](docs/EnvironmentApi.md#list_environments) | **GET** /core/environments | List Environments -*EnvironmentApi* | [**update_an_environment**](docs/EnvironmentApi.md#update_an_environment) | **PUT** /core/environments/{id} | Update Environment -*FlavorApi* | [**retrieve_flavors**](docs/FlavorApi.md#retrieve_flavors) | **GET** /core/flavors | Retrieve Flavors -*FloatingIpApi* | [**attach_floating_ip_to_instance**](docs/FloatingIpApi.md#attach_floating_ip_to_instance) | **POST** /core/virtual-machines/{id}/attach-floatingip | Attach Floating IP to Instance -*FloatingIpApi* | [**detach_floating_ip_to_instance**](docs/FloatingIpApi.md#detach_floating_ip_to_instance) | **POST** /core/virtual-machines/{id}/detach-floatingip | Detach Floating IP to Instance -*GpuApi* | [**get_gpu_list**](docs/GpuApi.md#get_gpu_list) | **GET** /core/gpus | Get GPU List -*ImageApi* | [**retrieve_images**](docs/ImageApi.md#retrieve_images) | **GET** /core/images | Retrieve Images +*EnvironmentApi* | [**create_environment**](docs/EnvironmentApi.md#create_environment) | **POST** /core/environments | Create environment +*EnvironmentApi* | [**delete_environment**](docs/EnvironmentApi.md#delete_environment) | **DELETE** /core/environments/{id} | Delete environment +*EnvironmentApi* | [**list_environments**](docs/EnvironmentApi.md#list_environments) | **GET** /core/environments | List environments +*EnvironmentApi* | [**retrieve_environment**](docs/EnvironmentApi.md#retrieve_environment) | **GET** /core/environments/{id} | Retrieve environment +*EnvironmentApi* | [**update_environment**](docs/EnvironmentApi.md#update_environment) | **PUT** /core/environments/{id} | Update environment +*FirewallAttachmentApi* | [**attach_firewall_to_vms**](docs/FirewallAttachmentApi.md#attach_firewall_to_vms) | **POST** /core/firewalls/{firewall_id}/update-attachments | Attach Firewalls to VMs +*FirewallsApi* | [**add_rules_to_firewall**](docs/FirewallsApi.md#add_rules_to_firewall) | **POST** /core/firewalls/{firewall_id}/firewall-rules | Add Rules to Firewall +*FirewallsApi* | [**create_firewall**](docs/FirewallsApi.md#create_firewall) | **POST** /core/firewalls | Create Firewall +*FirewallsApi* | [**delete_firewall**](docs/FirewallsApi.md#delete_firewall) | **DELETE** /core/firewalls/{id} | Delete Firewall +*FirewallsApi* | [**delete_firewall_rules_from_firewall**](docs/FirewallsApi.md#delete_firewall_rules_from_firewall) | **DELETE** /core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id} | Delete Firewall Rules from Firewall +*FirewallsApi* | [**details_of_firewall_by_id**](docs/FirewallsApi.md#details_of_firewall_by_id) | **GET** /core/firewalls/{id} | Details of Firewall by ID +*FirewallsApi* | [**retrieve_firewalls**](docs/FirewallsApi.md#retrieve_firewalls) | **GET** /core/firewalls | Retrieve Firewalls +*FlavorApi* | [**list_flavors**](docs/FlavorApi.md#list_flavors) | **GET** /core/flavors | List flavors +*FloatingIpApi* | [**attach_public_ip_to_virtual_machine**](docs/FloatingIpApi.md#attach_public_ip_to_virtual_machine) | **POST** /core/virtual-machines/{id}/attach-floatingip | Attach public IP to virtual machine +*FloatingIpApi* | [**detach_public_ip_from_virtual_machine**](docs/FloatingIpApi.md#detach_public_ip_from_virtual_machine) | **POST** /core/virtual-machines/{id}/detach-floatingip | Detach public IP from virtual machine +*GpuApi* | [**list_gpus**](docs/GpuApi.md#list_gpus) | **GET** /core/gpus | List GPUs +*ImageApi* | [**list_images**](docs/ImageApi.md#list_images) | **GET** /core/images | List images *InviteApi* | [**delete_invite**](docs/InviteApi.md#delete_invite) | **DELETE** /auth/invites/{id} | Delete Invite *InviteApi* | [**invite_an_user_to_organization**](docs/InviteApi.md#invite_an_user_to_organization) | **POST** /auth/invites | Invite an user to organization *InviteApi* | [**list_invites**](docs/InviteApi.md#list_invites) | **GET** /auth/invites | List Invites -*KeypairApi* | [**delete_keypair**](docs/KeypairApi.md#delete_keypair) | **DELETE** /core/keypair/{id} | Delete Keypair -*KeypairApi* | [**import_keypair**](docs/KeypairApi.md#import_keypair) | **POST** /core/keypairs | Import Keypair -*KeypairApi* | [**retrieve_user_keypairs**](docs/KeypairApi.md#retrieve_user_keypairs) | **GET** /core/keypairs | Retrieve Keypairs -*KeypairApi* | [**update_keypair_name**](docs/KeypairApi.md#update_keypair_name) | **PUT** /core/keypair/{id} | Update Keypair name +*KeypairApi* | [**delete_key_pair**](docs/KeypairApi.md#delete_key_pair) | **DELETE** /core/keypair/{id} | Delete key pair +*KeypairApi* | [**import_key_pair**](docs/KeypairApi.md#import_key_pair) | **POST** /core/keypairs | Import key pair +*KeypairApi* | [**list_key_pairs**](docs/KeypairApi.md#list_key_pairs) | **GET** /core/keypairs | List key pairs +*KeypairApi* | [**update_key_pair_name**](docs/KeypairApi.md#update_key_pair_name) | **PUT** /core/keypair/{id} | Update key pair name *OrganizationApi* | [**get_organization_info**](docs/OrganizationApi.md#get_organization_info) | **GET** /auth/organizations | Organization Info *OrganizationApi* | [**remove_a_member_from_organization**](docs/OrganizationApi.md#remove_a_member_from_organization) | **POST** /auth/organizations/remove-member | Remove a member from organization +*OrganizationApi* | [**update_organization_info**](docs/OrganizationApi.md#update_organization_info) | **PUT** /auth/organizations/update | Update organization info *PaymentApi* | [**get_details**](docs/PaymentApi.md#get_details) | **GET** /billing/payment/payment-details | GET: View payment details *PaymentApi* | [**post_payment**](docs/PaymentApi.md#post_payment) | **POST** /billing/payment/payment-initiate | POST: Initiate payment *PermissionApi* | [**list_permissions**](docs/PermissionApi.md#list_permissions) | **GET** /auth/permissions | List Permissions *PolicyApi* | [**list_policies**](docs/PolicyApi.md#list_policies) | **GET** /auth/policies | List Policies -*ProfileApi* | [**create_profile**](docs/ProfileApi.md#create_profile) | **POST** /core/profiles | Create a profile -*ProfileApi* | [**delete_profile**](docs/ProfileApi.md#delete_profile) | **DELETE** /core/profiles/{id} | Delete Profile -*ProfileApi* | [**get_a_profile_detail**](docs/ProfileApi.md#get_a_profile_detail) | **GET** /core/profiles/{id} | Get a Profile Detail -*ProfileApi* | [**get_profile_list**](docs/ProfileApi.md#get_profile_list) | **GET** /core/profiles | Get Profile List +*ProfileApi* | [**create_profile**](docs/ProfileApi.md#create_profile) | **POST** /core/profiles | Create profile +*ProfileApi* | [**delete_profile**](docs/ProfileApi.md#delete_profile) | **DELETE** /core/profiles/{id} | Delete profile +*ProfileApi* | [**list_profiles**](docs/ProfileApi.md#list_profiles) | **GET** /core/profiles | List profiles +*ProfileApi* | [**retrieve_profile_details**](docs/ProfileApi.md#retrieve_profile_details) | **GET** /core/profiles/{id} | Retrieve profile details *RbacRoleApi* | [**create_rbac_role**](docs/RbacRoleApi.md#create_rbac_role) | **POST** /auth/roles | Create RBAC Role *RbacRoleApi* | [**delete_a_rbac_role**](docs/RbacRoleApi.md#delete_a_rbac_role) | **DELETE** /auth/roles/{id} | Delete a RBAC Role *RbacRoleApi* | [**get_a_rbac_role_detail**](docs/RbacRoleApi.md#get_a_rbac_role_detail) | **GET** /auth/roles/{id} | Get a RBAC Role Detail *RbacRoleApi* | [**list_rbac_roles**](docs/RbacRoleApi.md#list_rbac_roles) | **GET** /auth/roles | List RBAC Roles *RbacRoleApi* | [**update_a_rbac_role**](docs/RbacRoleApi.md#update_a_rbac_role) | **PUT** /auth/roles/{id} | Update a RBAC Role -*RegionApi* | [**getting_regions**](docs/RegionApi.md#getting_regions) | **GET** /core/regions | Getting regions -*SecurityRulesApi* | [**retrieve_security_rule_protocols**](docs/SecurityRulesApi.md#retrieve_security_rule_protocols) | **GET** /core/sg-rules-protocols | Retrieve Security Rule Protocols -*StockApi* | [**retrieve_stocks**](docs/StockApi.md#retrieve_stocks) | **GET** /core/stocks | -*TemplateApi* | [**create_template**](docs/TemplateApi.md#create_template) | **POST** /core/marketplace/templates | Create Template -*TemplateApi* | [**delete_a_template**](docs/TemplateApi.md#delete_a_template) | **DELETE** /core/marketplace/templates/{id} | Delete a Template -*TemplateApi* | [**details_of_a_template_by_id**](docs/TemplateApi.md#details_of_a_template_by_id) | **GET** /core/marketplace/templates/{id} | Details of a Template by ID -*TemplateApi* | [**list_templates**](docs/TemplateApi.md#list_templates) | **GET** /core/marketplace/templates | List Templates -*TemplateApi* | [**update_template**](docs/TemplateApi.md#update_template) | **PUT** /core/marketplace/templates/{id} | Update Template +*RegionApi* | [**list_regions**](docs/RegionApi.md#list_regions) | **GET** /core/regions | List regions +*SecurityRulesApi* | [**list_firewall_rule_protocols**](docs/SecurityRulesApi.md#list_firewall_rule_protocols) | **GET** /core/sg-rules-protocols | List firewall rule protocols +*StockApi* | [**retrieve_gpu_stocks**](docs/StockApi.md#retrieve_gpu_stocks) | **GET** /core/stocks | +*TemplateApi* | [**create_template**](docs/TemplateApi.md#create_template) | **POST** /core/marketplace/templates | Create template +*TemplateApi* | [**delete_template**](docs/TemplateApi.md#delete_template) | **DELETE** /core/marketplace/templates/{id} | Delete template +*TemplateApi* | [**list_templates**](docs/TemplateApi.md#list_templates) | **GET** /core/marketplace/templates | List templates +*TemplateApi* | [**retrieve_template_details**](docs/TemplateApi.md#retrieve_template_details) | **GET** /core/marketplace/templates/{id} | Retrieve template details +*TemplateApi* | [**update_template**](docs/TemplateApi.md#update_template) | **PUT** /core/marketplace/templates/{id} | Update template +*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **GET** /billing/user/info | GET: Fetch User Info +*UserApi* | [**post_user**](docs/UserApi.md#post_user) | **POST** /billing/user/info | POST: Insert user info +*UserApi* | [**update_user_info**](docs/UserApi.md#update_user_info) | **PUT** /billing/user/info | PUT: Update user info +*UserDetailChoiceApi* | [**retrieve_default_flavors_and_images_for_user**](docs/UserDetailChoiceApi.md#retrieve_default_flavors_and_images_for_user) | **GET** /core/user/resources/defaults | Retrieve default flavors and images for user *UserPermissionApi* | [**list_current_user_permissions**](docs/UserPermissionApi.md#list_current_user_permissions) | **GET** /auth/users/me/permissions | List Current User Permissions *UserPermissionApi* | [**list_user_permissions**](docs/UserPermissionApi.md#list_user_permissions) | **GET** /auth/users/{id}/permissions | List User Permissions -*VirtualMachineApi* | [**add_security_rule**](docs/VirtualMachineApi.md#add_security_rule) | **POST** /core/virtual-machines/{id}/sg-rules | Add Security Rule -*VirtualMachineApi* | [**create_instances**](docs/VirtualMachineApi.md#create_instances) | **POST** /core/virtual-machines | Create Instances -*VirtualMachineApi* | [**delete_a_security_rule**](docs/VirtualMachineApi.md#delete_a_security_rule) | **DELETE** /core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id} | Delete a security group rule -*VirtualMachineApi* | [**delete_an_instance**](docs/VirtualMachineApi.md#delete_an_instance) | **DELETE** /core/virtual-machines/{id} | Delete an instance -*VirtualMachineApi* | [**get_an_instance_details**](docs/VirtualMachineApi.md#get_an_instance_details) | **GET** /core/virtual-machines/{id} | Get an instance details -*VirtualMachineApi* | [**hard_reboot_instance**](docs/VirtualMachineApi.md#hard_reboot_instance) | **GET** /core/virtual-machines/{id}/hard-reboot | Hard Reboot Instance -*VirtualMachineApi* | [**hibernate_instance**](docs/VirtualMachineApi.md#hibernate_instance) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate | Hibernate Instance -*VirtualMachineApi* | [**list_instances**](docs/VirtualMachineApi.md#list_instances) | **GET** /core/virtual-machines | List Instances -*VirtualMachineApi* | [**resize_virtual_machine**](docs/VirtualMachineApi.md#resize_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/resize | Resize Virtual Machine -*VirtualMachineApi* | [**restore_instance_from_hibernation**](docs/VirtualMachineApi.md#restore_instance_from_hibernation) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate-restore | Restore Instance from Hibernation -*VirtualMachineApi* | [**retrieved_metrics_successfully**](docs/VirtualMachineApi.md#retrieved_metrics_successfully) | **GET** /core/virtual-machines/{virtual_machine_id}/metrics | Get instance metrics -*VirtualMachineApi* | [**start_instance**](docs/VirtualMachineApi.md#start_instance) | **GET** /core/virtual-machines/{id}/start | Start Instance -*VirtualMachineApi* | [**stop_instance**](docs/VirtualMachineApi.md#stop_instance) | **GET** /core/virtual-machines/{id}/stop | Stop Instance -*VirtualMachineEventsApi* | [**fetch_all_of_the_instance_events**](docs/VirtualMachineEventsApi.md#fetch_all_of_the_instance_events) | **GET** /core/virtual-machines/{virtual_machine_id}/events | Fetch all of the instance events +*VirtualMachineApi* | [**add_firewall_rule_to_virtual_machine**](docs/VirtualMachineApi.md#add_firewall_rule_to_virtual_machine) | **POST** /core/virtual-machines/{id}/sg-rules | Add firewall rule to virtual machine +*VirtualMachineApi* | [**attach_firewalls_to_a_vm**](docs/VirtualMachineApi.md#attach_firewalls_to_a_vm) | **POST** /core/virtual-machines/{vm_id}/attach-firewalls | Attach Firewalls to a VM +*VirtualMachineApi* | [**create_virtual_machine**](docs/VirtualMachineApi.md#create_virtual_machine) | **POST** /core/virtual-machines | Create virtual machine +*VirtualMachineApi* | [**delete_firewall_rule_from_virtual_machine**](docs/VirtualMachineApi.md#delete_firewall_rule_from_virtual_machine) | **DELETE** /core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id} | Delete firewall rule from virtual machine +*VirtualMachineApi* | [**delete_virtual_machine**](docs/VirtualMachineApi.md#delete_virtual_machine) | **DELETE** /core/virtual-machines/{id} | Delete virtual machine +*VirtualMachineApi* | [**edit_labels_of_an_existing_vm**](docs/VirtualMachineApi.md#edit_labels_of_an_existing_vm) | **PUT** /core/virtual-machines/{virtual_machine_id}/label | Edit labels of an existing VM +*VirtualMachineApi* | [**hard_reboot_virtual_machine**](docs/VirtualMachineApi.md#hard_reboot_virtual_machine) | **GET** /core/virtual-machines/{id}/hard-reboot | Hard reboot virtual machine +*VirtualMachineApi* | [**hibernate_virtual_machine**](docs/VirtualMachineApi.md#hibernate_virtual_machine) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate | Hibernate virtual machine +*VirtualMachineApi* | [**list_virtual_machines**](docs/VirtualMachineApi.md#list_virtual_machines) | **GET** /core/virtual-machines | List all virtual machines +*VirtualMachineApi* | [**resize_virtual_machine**](docs/VirtualMachineApi.md#resize_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/resize | Resize virtual machine +*VirtualMachineApi* | [**restore_virtual_machine_from_hibernation**](docs/VirtualMachineApi.md#restore_virtual_machine_from_hibernation) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate-restore | Restore virtual machine from hibernation +*VirtualMachineApi* | [**retrieve_virtual_machine_details**](docs/VirtualMachineApi.md#retrieve_virtual_machine_details) | **GET** /core/virtual-machines/{id} | Retrieve virtual machine details +*VirtualMachineApi* | [**retrieve_virtual_machine_performance_metrics**](docs/VirtualMachineApi.md#retrieve_virtual_machine_performance_metrics) | **GET** /core/virtual-machines/{virtual_machine_id}/metrics | Retrieve virtual machine performance metrics +*VirtualMachineApi* | [**retrieve_virtual_machines_associated_with_a_contract**](docs/VirtualMachineApi.md#retrieve_virtual_machines_associated_with_a_contract) | **GET** /core/virtual-machines/contract/{contract_id}/virtual-machines | Retrieve virtual machines associated with a contract +*VirtualMachineApi* | [**start_virtual_machine**](docs/VirtualMachineApi.md#start_virtual_machine) | **GET** /core/virtual-machines/{id}/start | Start virtual machine +*VirtualMachineApi* | [**stop_virtual_machine**](docs/VirtualMachineApi.md#stop_virtual_machine) | **GET** /core/virtual-machines/{id}/stop | Stop virtual machine +*VirtualMachineEventsApi* | [**list_virtual_machine_events**](docs/VirtualMachineEventsApi.md#list_virtual_machine_events) | **GET** /core/virtual-machines/{virtual_machine_id}/events | List virtual machine events *VncUrlApi* | [**get_vnc_console_link**](docs/VncUrlApi.md#get_vnc_console_link) | **GET** /core/virtual-machines/{virtual_machine_id}/console/{job_id} | Get VNC Console Link *VncUrlApi* | [**request_console**](docs/VncUrlApi.md#request_console) | **GET** /core/virtual-machines/{id}/request-console | Request Instance Console -*VolumeApi* | [**create_volume**](docs/VolumeApi.md#create_volume) | **POST** /core/volumes | Create Volume -*VolumeApi* | [**delete_volume**](docs/VolumeApi.md#delete_volume) | **DELETE** /core/volumes/{id} | Delete Volume -*VolumeApi* | [**get_volume_types**](docs/VolumeApi.md#get_volume_types) | **GET** /core/volume-types | GET Volume Types -*VolumeApi* | [**list_volumes**](docs/VolumeApi.md#list_volumes) | **GET** /core/volumes | List Volumes -*VolumeAttachmentApi* | [**attach_volumes**](docs/VolumeAttachmentApi.md#attach_volumes) | **POST** /core/virtual-machines/{virtual_machine_id}/attach-volumes | Attach Volumes -*VolumeAttachmentApi* | [**detach_volumes**](docs/VolumeAttachmentApi.md#detach_volumes) | **POST** /core/virtual-machines/{virtual_machine_id}/detach-volumes | Detach Volumes +*VolumeApi* | [**create_volume**](docs/VolumeApi.md#create_volume) | **POST** /core/volumes | Create volume +*VolumeApi* | [**delete_volume**](docs/VolumeApi.md#delete_volume) | **DELETE** /core/volumes/{id} | Delete volume +*VolumeApi* | [**list_volume_types**](docs/VolumeApi.md#list_volume_types) | **GET** /core/volume-types | List volume types +*VolumeApi* | [**list_volumes**](docs/VolumeApi.md#list_volumes) | **GET** /core/volumes | List volumes +*VolumeAttachmentApi* | [**attach_volumes_to_virtual_machine**](docs/VolumeAttachmentApi.md#attach_volumes_to_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/attach-volumes | Attach volumes to virtual machine +*VolumeAttachmentApi* | [**detach_volumes_from_virtual_machine**](docs/VolumeAttachmentApi.md#detach_volumes_from_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/detach-volumes | Detach volumes from virtual machine ## Documentation For Models - - [APIKey](docs/APIKey.md) - - [APIKeyFields](docs/APIKeyFields.md) - - [APIKeyPayload](docs/APIKeyPayload.md) - - [APIKeygeneration](docs/APIKeygeneration.md) + - [AddUpdateFlavorOrganizationPayload](docs/AddUpdateFlavorOrganizationPayload.md) + - [AddUserInfoSuccessResponseModel](docs/AddUserInfoSuccessResponseModel.md) + - [AdminAddUpdateImageOrganizationPayload](docs/AdminAddUpdateImageOrganizationPayload.md) + - [AdminBootstrapEnvironmentPayload](docs/AdminBootstrapEnvironmentPayload.md) + - [AdminClusterResource](docs/AdminClusterResource.md) + - [AdminContainerResource](docs/AdminContainerResource.md) + - [AdminContractEventFields](docs/AdminContractEventFields.md) + - [AdminContractFields](docs/AdminContractFields.md) + - [AdminCountResourcesOrganization](docs/AdminCountResourcesOrganization.md) + - [AdminCountResourcesOrganizations](docs/AdminCountResourcesOrganizations.md) + - [AdminCreateContractResponseModel](docs/AdminCreateContractResponseModel.md) + - [AdminEnvrionmentResources](docs/AdminEnvrionmentResources.md) + - [AdminFlavorDetailFields](docs/AdminFlavorDetailFields.md) + - [AdminFlavorDetailNodeFields](docs/AdminFlavorDetailNodeFields.md) + - [AdminFlavorResource](docs/AdminFlavorResource.md) + - [AdminFlavorResourcesList](docs/AdminFlavorResourcesList.md) + - [AdminGetContractDetailFields](docs/AdminGetContractDetailFields.md) + - [AdminGetVersionResponse](docs/AdminGetVersionResponse.md) + - [AdminHibernationRestorationPayloadModel](docs/AdminHibernationRestorationPayloadModel.md) + - [AdminImageAdminFields](docs/AdminImageAdminFields.md) + - [AdminImageAdminResponse](docs/AdminImageAdminResponse.md) + - [AdminImageAdminResponseImage](docs/AdminImageAdminResponseImage.md) + - [AdminImageListAdminResponse](docs/AdminImageListAdminResponse.md) + - [AdminInstanceResources](docs/AdminInstanceResources.md) + - [AdminNodeResource](docs/AdminNodeResource.md) + - [AdminOrganizationResourceList](docs/AdminOrganizationResourceList.md) + - [AdminOrganizationResourceResponse](docs/AdminOrganizationResourceResponse.md) + - [AdminOrganizationResources](docs/AdminOrganizationResources.md) + - [AdminOrganizationResponseModel](docs/AdminOrganizationResponseModel.md) + - [AdminOrganizationSummaryFields](docs/AdminOrganizationSummaryFields.md) + - [AdminOrganizationsResponseModel](docs/AdminOrganizationsResponseModel.md) + - [AdminOrganizationsSummaryResponseModel](docs/AdminOrganizationsSummaryResponseModel.md) + - [AdminUserFields](docs/AdminUserFields.md) + - [AdminUserResponseModel](docs/AdminUserResponseModel.md) + - [AdminUsersResponseModel](docs/AdminUsersResponseModel.md) + - [AdminVersionResponseModel](docs/AdminVersionResponseModel.md) + - [AdminVolumeResource](docs/AdminVolumeResource.md) - [Adminaddorganizationpayload](docs/Adminaddorganizationpayload.md) - [Admincreditpostpayload](docs/Admincreditpostpayload.md) + - [Adminpaymenthistoryfields](docs/Adminpaymenthistoryfields.md) + - [Adminpaymenthistoryresponse](docs/Adminpaymenthistoryresponse.md) - [Adminrechargehistoryfields](docs/Adminrechargehistoryfields.md) - [Adminrechargehistoryresponse](docs/Adminrechargehistoryresponse.md) - [Adminthresholdpostpayload](docs/Adminthresholdpostpayload.md) + - [ApiKeyFields](docs/ApiKeyFields.md) - [ApiKeyVerifyFields](docs/ApiKeyVerifyFields.md) - - [ApiKeyVerifyResponse](docs/ApiKeyVerifyResponse.md) - - [AssignRBACRolePayload](docs/AssignRBACRolePayload.md) + - [AssignRbacRolePayload](docs/AssignRbacRolePayload.md) - [AttachCallbackPayload](docs/AttachCallbackPayload.md) - [AttachCallbackResponse](docs/AttachCallbackResponse.md) + - [AttachFirewallWithVM](docs/AttachFirewallWithVM.md) + - [AttachFirewallsToVMPayload](docs/AttachFirewallsToVMPayload.md) - [AttachVolumeFields](docs/AttachVolumeFields.md) - [AttachVolumes](docs/AttachVolumes.md) - [AttachVolumesPayload](docs/AttachVolumesPayload.md) + - [AuthGetTokenResponseModel](docs/AuthGetTokenResponseModel.md) + - [AuthRequestLoginFields](docs/AuthRequestLoginFields.md) + - [AuthRequestLoginResponseModel](docs/AuthRequestLoginResponseModel.md) + - [AuthUserFields](docs/AuthUserFields.md) + - [AuthUserInfoResponseModel](docs/AuthUserInfoResponseModel.md) - [BillingResponse](docs/BillingResponse.md) + - [Billingimmuneresources](docs/Billingimmuneresources.md) + - [Billingimmuneresourcesresponse](docs/Billingimmuneresourcesresponse.md) - [Billingmetricesfields](docs/Billingmetricesfields.md) - [Billingmetricesresponse](docs/Billingmetricesresponse.md) - - [ClusterResource](docs/ClusterResource.md) + - [CommonResponseModel](docs/CommonResponseModel.md) - [ComplianceFields](docs/ComplianceFields.md) - [ComplianceModelFields](docs/ComplianceModelFields.md) - [CompliancePayload](docs/CompliancePayload.md) - [ComplianceResponse](docs/ComplianceResponse.md) - [ContainerOverviewFields](docs/ContainerOverviewFields.md) - - [ContainerResource](docs/ContainerResource.md) + - [ContractInstanceFields](docs/ContractInstanceFields.md) + - [ContractInstancesResponse](docs/ContractInstancesResponse.md) + - [CreateContarctFields](docs/CreateContarctFields.md) + - [CreateContractPayload](docs/CreateContractPayload.md) - [CreateDiscountResponse](docs/CreateDiscountResponse.md) - [CreateDiscountsPayload](docs/CreateDiscountsPayload.md) - [CreateEnvironment](docs/CreateEnvironment.md) + - [CreateFirewallPayload](docs/CreateFirewallPayload.md) + - [CreateFirewallRulePayload](docs/CreateFirewallRulePayload.md) - [CreateGPU](docs/CreateGPU.md) - [CreateInstancesPayload](docs/CreateInstancesPayload.md) - [CreateProfilePayload](docs/CreateProfilePayload.md) - [CreateProfileResponse](docs/CreateProfileResponse.md) - [CreateSecurityRulePayload](docs/CreateSecurityRulePayload.md) - [CreateUpdateComplianceResponse](docs/CreateUpdateComplianceResponse.md) + - [CreateUpdatePermissionPayload](docs/CreateUpdatePermissionPayload.md) + - [CreateUpdatePermissionResponseModel](docs/CreateUpdatePermissionResponseModel.md) + - [CreateUpdatePolicyPayload](docs/CreateUpdatePolicyPayload.md) + - [CreateUpdatePolicyResponseModel](docs/CreateUpdatePolicyResponseModel.md) + - [CreateUpdateRbacRolePayload](docs/CreateUpdateRbacRolePayload.md) - [CreateVolumePayload](docs/CreateVolumePayload.md) + - [CustomerContractDetailResponseModel](docs/CustomerContractDetailResponseModel.md) + - [CustomerContractFields](docs/CustomerContractFields.md) + - [CustomerFields](docs/CustomerFields.md) + - [CustomerPayload](docs/CustomerPayload.md) - [DashboardInfoResponse](docs/DashboardInfoResponse.md) - [DeploymentFields](docs/DeploymentFields.md) - [DeploymentFieldsforstartdeployments](docs/DeploymentFieldsforstartdeployments.md) - [Deployments](docs/Deployments.md) - [DetachVolumes](docs/DetachVolumes.md) - [DetachVolumesPayload](docs/DetachVolumesPayload.md) - - [DiscountDetailResponse](docs/DiscountDetailResponse.md) + - [DiscountEntityModel](docs/DiscountEntityModel.md) + - [DiscountFields](docs/DiscountFields.md) + - [DiscountPlanFields](docs/DiscountPlanFields.md) - [DiscountResourceFields](docs/DiscountResourceFields.md) + - [EditlabelofanexistingVMPayload](docs/EditlabelofanexistingVMPayload.md) - [Environment](docs/Environment.md) - [EnvironmentFields](docs/EnvironmentFields.md) - [EnvironmentFieldsforVolume](docs/EnvironmentFieldsforVolume.md) - [Environments](docs/Environments.md) - - [EnvrionmentResources](docs/EnvrionmentResources.md) - [ErrorResponseModel](docs/ErrorResponseModel.md) + - [Excludebillingpostpayload](docs/Excludebillingpostpayload.md) + - [Excludebillingpostresponse](docs/Excludebillingpostresponse.md) + - [FirewallAttachmentModel](docs/FirewallAttachmentModel.md) + - [FirewallAttachmentVMModel](docs/FirewallAttachmentVMModel.md) + - [FirewallDetailFields](docs/FirewallDetailFields.md) + - [FirewallDetailResponse](docs/FirewallDetailResponse.md) + - [FirewallEnvironmentFields](docs/FirewallEnvironmentFields.md) + - [FirewallFields](docs/FirewallFields.md) + - [FirewallResponse](docs/FirewallResponse.md) + - [FirewallRule](docs/FirewallRule.md) + - [FirewallsListResponse](docs/FirewallsListResponse.md) + - [FlavorAdminResponse](docs/FlavorAdminResponse.md) + - [FlavorAdminResponseFlavors](docs/FlavorAdminResponseFlavors.md) + - [FlavorDetailResponse](docs/FlavorDetailResponse.md) - [FlavorFields](docs/FlavorFields.md) - [FlavorItemGetResponse](docs/FlavorItemGetResponse.md) - [FlavorListResponse](docs/FlavorListResponse.md) - [FlavorObjectFields](docs/FlavorObjectFields.md) - [FlavorPayload](docs/FlavorPayload.md) - - [FlavorResource](docs/FlavorResource.md) - [FlavorResponse](docs/FlavorResponse.md) + - [FlavorVMFields](docs/FlavorVMFields.md) + - [FlavorVMsResponse](docs/FlavorVMsResponse.md) - [FutureNodeModel](docs/FutureNodeModel.md) - [FutureNodeResponseModel](docs/FutureNodeResponseModel.md) - [FutureNodeStockModel](docs/FutureNodeStockModel.md) @@ -258,9 +352,25 @@ Class | Method | HTTP request | Description - [GPUFields](docs/GPUFields.md) - [GPUList](docs/GPUList.md) - [GPURegionFields](docs/GPURegionFields.md) + - [GenerateApiKeyResponseModel](docs/GenerateApiKeyResponseModel.md) - [GetAllDiscountForAllOrganizationResponse](docs/GetAllDiscountForAllOrganizationResponse.md) - - [GetToken](docs/GetToken.md) - - [GetTokenResponse](docs/GetTokenResponse.md) + - [GetAllDiscountsFields](docs/GetAllDiscountsFields.md) + - [GetApiKeyResponseModel](docs/GetApiKeyResponseModel.md) + - [GetContractDetailResponseModel](docs/GetContractDetailResponseModel.md) + - [GetContractEventsResponseModel](docs/GetContractEventsResponseModel.md) + - [GetContractsListResponseModel](docs/GetContractsListResponseModel.md) + - [GetCustomerContractsListResponseModel](docs/GetCustomerContractsListResponseModel.md) + - [GetDiscountDetailResponse](docs/GetDiscountDetailResponse.md) + - [GetDiscountResponse](docs/GetDiscountResponse.md) + - [GetEntityDiscountDetailResponse](docs/GetEntityDiscountDetailResponse.md) + - [GetInvitesResponseModel](docs/GetInvitesResponseModel.md) + - [GetOrganizationResponseModel](docs/GetOrganizationResponseModel.md) + - [GetPermissionsResponseModel](docs/GetPermissionsResponseModel.md) + - [GetPoliciesResponseModel](docs/GetPoliciesResponseModel.md) + - [GetRbacRolesResponseModel](docs/GetRbacRolesResponseModel.md) + - [GetTokenPayload](docs/GetTokenPayload.md) + - [GetUserPermissionsResponseModel](docs/GetUserPermissionsResponseModel.md) + - [GetVersionResponse](docs/GetVersionResponse.md) - [Getcreditandthresholdinfo](docs/Getcreditandthresholdinfo.md) - [Getcreditandthresholdinfoinresponse](docs/Getcreditandthresholdinfoinresponse.md) - [ImageFields](docs/ImageFields.md) @@ -272,17 +382,21 @@ Class | Method | HTTP request | Description - [InfrahubResourceObjectResponse](docs/InfrahubResourceObjectResponse.md) - [InsertDiscountPlanFields](docs/InsertDiscountPlanFields.md) - [Instance](docs/Instance.md) + - [InstanceAdmin](docs/InstanceAdmin.md) - [InstanceAdminFields](docs/InstanceAdminFields.md) - [InstanceEnvironmentFields](docs/InstanceEnvironmentFields.md) - [InstanceEvents](docs/InstanceEvents.md) - [InstanceEventsFields](docs/InstanceEventsFields.md) + - [InstanceFields](docs/InstanceFields.md) - [InstanceFlavorFields](docs/InstanceFlavorFields.md) - [InstanceImageFields](docs/InstanceImageFields.md) - [InstanceKeypairFields](docs/InstanceKeypairFields.md) - [InstanceOverviewFields](docs/InstanceOverviewFields.md) - [InstanceResizePayload](docs/InstanceResizePayload.md) - - [InstanceResources](docs/InstanceResources.md) - [Instances](docs/Instances.md) + - [InstancesAdmin](docs/InstancesAdmin.md) + - [InstancesSummaryAdmin](docs/InstancesSummaryAdmin.md) + - [InstancesSummaryFields](docs/InstancesSummaryFields.md) - [InternalEnvironmentFields](docs/InternalEnvironmentFields.md) - [InternalInstanceFields](docs/InternalInstanceFields.md) - [InternalInstanceFlavorFields](docs/InternalInstanceFlavorFields.md) @@ -293,16 +407,18 @@ Class | Method | HTTP request | Description - [InternalVolumeAttachmentFields](docs/InternalVolumeAttachmentFields.md) - [InternalVolumeFields](docs/InternalVolumeFields.md) - [InternalVolumesResponse](docs/InternalVolumesResponse.md) - - [Invite](docs/Invite.md) - [InviteFields](docs/InviteFields.md) - - [InviteUser](docs/InviteUser.md) - - [Invites](docs/Invites.md) + - [InviteUserPayload](docs/InviteUserPayload.md) + - [InviteUserResponseModel](docs/InviteUserResponseModel.md) - [KeypairFields](docs/KeypairFields.md) - [Keypairs](docs/Keypairs.md) + - [LableResonse](docs/LableResonse.md) - [Lastdaycostfields](docs/Lastdaycostfields.md) - [Lastdaycostresponse](docs/Lastdaycostresponse.md) - [LogoGetResponse](docs/LogoGetResponse.md) - - [Logout](docs/Logout.md) + - [LogoutPayload](docs/LogoutPayload.md) + - [MetricItemFields](docs/MetricItemFields.md) + - [MetricsFields](docs/MetricsFields.md) - [NewConfigurationsResponse](docs/NewConfigurationsResponse.md) - [NewModelResponse](docs/NewModelResponse.md) - [NewStockResponse](docs/NewStockResponse.md) @@ -315,15 +431,9 @@ Class | Method | HTTP request | Description - [NodeStockPayloadModel](docs/NodeStockPayloadModel.md) - [NodeStockResponseModel](docs/NodeStockResponseModel.md) - [NodeStocksPayload](docs/NodeStocksPayload.md) - - [OrganizationInfoModel](docs/OrganizationInfoModel.md) - - [OrganizationModel](docs/OrganizationModel.md) + - [OrganizationFields](docs/OrganizationFields.md) - [OrganizationObjectResponse](docs/OrganizationObjectResponse.md) - - [OrganizationResourceList](docs/OrganizationResourceList.md) - - [OrganizationResourceResponse](docs/OrganizationResourceResponse.md) - - [OrganizationResources](docs/OrganizationResources.md) - - [OrganizationResponseModel](docs/OrganizationResponseModel.md) - - [OrganizationUserModel](docs/OrganizationUserModel.md) - - [OrganizationsResponseModel](docs/OrganizationsResponseModel.md) + - [OrganizationUserResponseModel](docs/OrganizationUserResponseModel.md) - [OverviewInfo](docs/OverviewInfo.md) - [PaymentDetailsFields](docs/PaymentDetailsFields.md) - [PaymentDetailsResponse](docs/PaymentDetailsResponse.md) @@ -331,37 +441,25 @@ Class | Method | HTTP request | Description - [PaymentInitiatePayload](docs/PaymentInitiatePayload.md) - [PaymentInitiateResponse](docs/PaymentInitiateResponse.md) - [PermissionFields](docs/PermissionFields.md) - - [PermissionFieldsforUserPermission](docs/PermissionFieldsforUserPermission.md) - - [PermissionPayload](docs/PermissionPayload.md) - - [PermissionResponse](docs/PermissionResponse.md) - - [Permissions](docs/Permissions.md) - - [PermissionsforUserPermission](docs/PermissionsforUserPermission.md) - - [Policies](docs/Policies.md) - [PolicyFields](docs/PolicyFields.md) - - [PolicyPayload](docs/PolicyPayload.md) - [PolicyPermissionFields](docs/PolicyPermissionFields.md) - - [PolicyResponse](docs/PolicyResponse.md) - [PowerUsageModel](docs/PowerUsageModel.md) - [PricebookModel](docs/PricebookModel.md) - [PricebookResourceObjectResponse](docs/PricebookResourceObjectResponse.md) - [ProfileFields](docs/ProfileFields.md) - [ProfileListResponse](docs/ProfileListResponse.md) - [ProfileObjectFields](docs/ProfileObjectFields.md) - - [RBACRole](docs/RBACRole.md) - - [RBACRoleFieldforOrganization](docs/RBACRoleFieldforOrganization.md) - - [RBACRoleFields](docs/RBACRoleFields.md) - - [RBACRolePayload](docs/RBACRolePayload.md) - - [RBACRoles](docs/RBACRoles.md) - - [RefreshToken](docs/RefreshToken.md) + - [RbacRoleDetailResponseModel](docs/RbacRoleDetailResponseModel.md) + - [RbacRoleField](docs/RbacRoleField.md) + - [RbacRoleFields](docs/RbacRoleFields.md) + - [RefreshTokenPayload](docs/RefreshTokenPayload.md) - [RegionFields](docs/RegionFields.md) - [RegionPayload](docs/RegionPayload.md) - [RegionResponse](docs/RegionResponse.md) - [Regions](docs/Regions.md) - - [RemoveMemberResponse](docs/RemoveMemberResponse.md) - - [Removemember](docs/Removemember.md) + - [RemoveMemberFromOrganizationResponseModel](docs/RemoveMemberFromOrganizationResponseModel.md) + - [RemoveMemberPayload](docs/RemoveMemberPayload.md) - [RequestConsole](docs/RequestConsole.md) - - [RequestLoginDataResponse](docs/RequestLoginDataResponse.md) - - [RequestLoginResponse](docs/RequestLoginResponse.md) - [ResourcePayload](docs/ResourcePayload.md) - [ResponseModel](docs/ResponseModel.md) - [RolePermissionFields](docs/RolePermissionFields.md) @@ -370,6 +468,7 @@ Class | Method | HTTP request | Description - [SecurityGroupRuleFields](docs/SecurityGroupRuleFields.md) - [SecurityRulesFieldsforInstance](docs/SecurityRulesFieldsforInstance.md) - [SecurityRulesProtocolFields](docs/SecurityRulesProtocolFields.md) + - [SetDefaultsPayload](docs/SetDefaultsPayload.md) - [SingleVisibilityUserResponse](docs/SingleVisibilityUserResponse.md) - [StartDeployment](docs/StartDeployment.md) - [StartDeploymentPayload](docs/StartDeploymentPayload.md) @@ -380,23 +479,34 @@ Class | Method | HTTP request | Description - [TemplateFields](docs/TemplateFields.md) - [Templates](docs/Templates.md) - [TokenFields](docs/TokenFields.md) + - [UpdateContractPayload](docs/UpdateContractPayload.md) - [UpdateDiscountsPayload](docs/UpdateDiscountsPayload.md) - [UpdateDiscountsStatusPayload](docs/UpdateDiscountsStatusPayload.md) - [UpdateEnvironment](docs/UpdateEnvironment.md) - [UpdateGPU](docs/UpdateGPU.md) - [UpdateKeypairName](docs/UpdateKeypairName.md) - [UpdateKeypairnameresponse](docs/UpdateKeypairnameresponse.md) + - [UpdateOrganizationPayload](docs/UpdateOrganizationPayload.md) + - [UpdateOrganizationResponseModel](docs/UpdateOrganizationResponseModel.md) - [UpdateTemplate](docs/UpdateTemplate.md) - - [UserFields](docs/UserFields.md) - - [UserInfoResponse](docs/UserInfoResponse.md) + - [UserDefaultChoiceForAdminFields](docs/UserDefaultChoiceForAdminFields.md) + - [UserDefaultChoiceForUserFields](docs/UserDefaultChoiceForUserFields.md) + - [UserDefaultChoicesForAdminResponse](docs/UserDefaultChoicesForAdminResponse.md) + - [UserDefaultChoicesForUserResponse](docs/UserDefaultChoicesForUserResponse.md) + - [UserPermissionFields](docs/UserPermissionFields.md) + - [UserTransferPayload](docs/UserTransferPayload.md) + - [Userinfopostpayload](docs/Userinfopostpayload.md) + - [UsersInfoFields](docs/UsersInfoFields.md) + - [UsersInfoListResponse](docs/UsersInfoListResponse.md) - [VNCURL](docs/VNCURL.md) - [VNCURLFields](docs/VNCURLFields.md) + - [VerifyApiKeyPayload](docs/VerifyApiKeyPayload.md) + - [VerifyApiKeyResponseModel](docs/VerifyApiKeyResponseModel.md) - [Volume](docs/Volume.md) - [VolumeAttachmentFields](docs/VolumeAttachmentFields.md) - [VolumeFields](docs/VolumeFields.md) - [VolumeFieldsforInstance](docs/VolumeFieldsforInstance.md) - [VolumeOverviewFields](docs/VolumeOverviewFields.md) - - [VolumeResource](docs/VolumeResource.md) - [VolumeTypes](docs/VolumeTypes.md) - [Volumes](docs/Volumes.md) diff --git a/docs/APIKeyFields.md b/docs/APIKeyFields.md index 34895aa..d4eea45 100644 --- a/docs/APIKeyFields.md +++ b/docs/APIKeyFields.md @@ -1,4 +1,4 @@ -# APIKeyFields +# ApiKeyFields ## Properties @@ -10,18 +10,18 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.api_key_fields import APIKeyFields +from hyperstack.models.api_key_fields import ApiKeyFields # TODO update the JSON string below json = "{}" -# create an instance of APIKeyFields from a JSON string -api_key_fields_instance = APIKeyFields.from_json(json) +# create an instance of ApiKeyFields from a JSON string +api_key_fields_instance = ApiKeyFields.from_json(json) # print the JSON string representation of the object -print APIKeyFields.to_json() +print(ApiKeyFields.to_json()) # convert the object into a dict api_key_fields_dict = api_key_fields_instance.to_dict() -# create an instance of APIKeyFields from a dict +# create an instance of ApiKeyFields from a dict api_key_fields_form_dict = api_key_fields.from_dict(api_key_fields_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/APIKeyPayload.md b/docs/APIKeyPayload.md deleted file mode 100644 index 3302027..0000000 --- a/docs/APIKeyPayload.md +++ /dev/null @@ -1,29 +0,0 @@ -# APIKeyPayload - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_key** | **str** | | [optional] - -## Example - -```python -from hyperstack.models.api_key_payload import APIKeyPayload - -# TODO update the JSON string below -json = "{}" -# create an instance of APIKeyPayload from a JSON string -api_key_payload_instance = APIKeyPayload.from_json(json) -# print the JSON string representation of the object -print APIKeyPayload.to_json() - -# convert the object into a dict -api_key_payload_dict = api_key_payload_instance.to_dict() -# create an instance of APIKeyPayload from a dict -api_key_payload_form_dict = api_key_payload.from_dict(api_key_payload_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AddUpdateFlavorOrganizationPayload.md b/docs/AddUpdateFlavorOrganizationPayload.md new file mode 100644 index 0000000..1454e44 --- /dev/null +++ b/docs/AddUpdateFlavorOrganizationPayload.md @@ -0,0 +1,40 @@ +# AddUpdateFlavorOrganizationPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**openstack_id** | **str** | | +**region_id** | **int** | | +**cpu** | **int** | | +**ram** | **float** | | +**disk** | **int** | | +**ephemeral** | **int** | | [optional] +**gpu_id** | **int** | | +**gpu_count** | **int** | | +**is_public** | **bool** | | +**organizations** | **List[int]** | | + +## Example + +```python +from hyperstack.models.add_update_flavor_organization_payload import AddUpdateFlavorOrganizationPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AddUpdateFlavorOrganizationPayload from a JSON string +add_update_flavor_organization_payload_instance = AddUpdateFlavorOrganizationPayload.from_json(json) +# print the JSON string representation of the object +print(AddUpdateFlavorOrganizationPayload.to_json()) + +# convert the object into a dict +add_update_flavor_organization_payload_dict = add_update_flavor_organization_payload_instance.to_dict() +# create an instance of AddUpdateFlavorOrganizationPayload from a dict +add_update_flavor_organization_payload_form_dict = add_update_flavor_organization_payload.from_dict(add_update_flavor_organization_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddUserInfoSuccessResponseModel.md b/docs/AddUserInfoSuccessResponseModel.md new file mode 100644 index 0000000..8117df8 --- /dev/null +++ b/docs/AddUserInfoSuccessResponseModel.md @@ -0,0 +1,31 @@ +# AddUserInfoSuccessResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**data** | [**UsersInfoFields**](UsersInfoFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.add_user_info_success_response_model import AddUserInfoSuccessResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AddUserInfoSuccessResponseModel from a JSON string +add_user_info_success_response_model_instance = AddUserInfoSuccessResponseModel.from_json(json) +# print the JSON string representation of the object +print(AddUserInfoSuccessResponseModel.to_json()) + +# convert the object into a dict +add_user_info_success_response_model_dict = add_user_info_success_response_model_instance.to_dict() +# create an instance of AddUserInfoSuccessResponseModel from a dict +add_user_info_success_response_model_form_dict = add_user_info_success_response_model.from_dict(add_user_info_success_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminAddUpdateImageOrganizationPayload.md b/docs/AdminAddUpdateImageOrganizationPayload.md new file mode 100644 index 0000000..ba28a30 --- /dev/null +++ b/docs/AdminAddUpdateImageOrganizationPayload.md @@ -0,0 +1,38 @@ +# AdminAddUpdateImageOrganizationPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**openstack_id** | **str** | | +**region_id** | **int** | | +**type** | **str** | | +**version** | **str** | | +**size** | **int** | | +**is_public** | **bool** | | +**description** | **str** | | [optional] +**labels** | **List[str]** | | [optional] +**organizations** | **List[int]** | | + +## Example + +```python +from hyperstack.models.admin_add_update_image_organization_payload import AdminAddUpdateImageOrganizationPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminAddUpdateImageOrganizationPayload from a JSON string +admin_add_update_image_organization_payload_instance = AdminAddUpdateImageOrganizationPayload.from_json(json) +# print the JSON string representation of the object +print(AdminAddUpdateImageOrganizationPayload.to_json()) + +# convert the object into a dict +admin_add_update_image_organization_payload_dict = admin_add_update_image_organization_payload_instance.to_dict() +# create an instance of AdminAddUpdateImageOrganizationPayload from a dict +admin_add_update_image_organization_payload_form_dict = admin_add_update_image_organization_payload.from_dict(admin_add_update_image_organization_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminBootstrapEnvironmentPayload.md b/docs/AdminBootstrapEnvironmentPayload.md new file mode 100644 index 0000000..d5763d0 --- /dev/null +++ b/docs/AdminBootstrapEnvironmentPayload.md @@ -0,0 +1,29 @@ +# AdminBootstrapEnvironmentPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | + +## Example + +```python +from hyperstack.models.admin_bootstrap_environment_payload import AdminBootstrapEnvironmentPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminBootstrapEnvironmentPayload from a JSON string +admin_bootstrap_environment_payload_instance = AdminBootstrapEnvironmentPayload.from_json(json) +# print the JSON string representation of the object +print(AdminBootstrapEnvironmentPayload.to_json()) + +# convert the object into a dict +admin_bootstrap_environment_payload_dict = admin_bootstrap_environment_payload_instance.to_dict() +# create an instance of AdminBootstrapEnvironmentPayload from a dict +admin_bootstrap_environment_payload_form_dict = admin_bootstrap_environment_payload.from_dict(admin_bootstrap_environment_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ClusterResource.md b/docs/AdminClusterResource.md similarity index 57% rename from docs/ClusterResource.md rename to docs/AdminClusterResource.md index 1a46bd6..68f5941 100644 --- a/docs/ClusterResource.md +++ b/docs/AdminClusterResource.md @@ -1,4 +1,4 @@ -# ClusterResource +# AdminClusterResource ## Properties @@ -11,26 +11,26 @@ Name | Type | Description | Notes **status** | **str** | | [optional] **master_count** | **int** | | [optional] **node_count** | **int** | | [optional] -**node_flavor** | [**FlavorResource**](FlavorResource.md) | | [optional] +**node_flavor** | [**AdminFlavorResource**](AdminFlavorResource.md) | | [optional] **enable_public_ip** | **bool** | | [optional] **created_at** | **datetime** | | [optional] ## Example ```python -from hyperstack.models.cluster_resource import ClusterResource +from hyperstack.models.admin_cluster_resource import AdminClusterResource # TODO update the JSON string below json = "{}" -# create an instance of ClusterResource from a JSON string -cluster_resource_instance = ClusterResource.from_json(json) +# create an instance of AdminClusterResource from a JSON string +admin_cluster_resource_instance = AdminClusterResource.from_json(json) # print the JSON string representation of the object -print ClusterResource.to_json() +print(AdminClusterResource.to_json()) # convert the object into a dict -cluster_resource_dict = cluster_resource_instance.to_dict() -# create an instance of ClusterResource from a dict -cluster_resource_form_dict = cluster_resource.from_dict(cluster_resource_dict) +admin_cluster_resource_dict = admin_cluster_resource_instance.to_dict() +# create an instance of AdminClusterResource from a dict +admin_cluster_resource_form_dict = admin_cluster_resource.from_dict(admin_cluster_resource_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContainerResource.md b/docs/AdminContainerResource.md similarity index 54% rename from docs/ContainerResource.md rename to docs/AdminContainerResource.md index 92a9ce2..cad932f 100644 --- a/docs/ContainerResource.md +++ b/docs/AdminContainerResource.md @@ -1,4 +1,4 @@ -# ContainerResource +# AdminContainerResource ## Properties @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **name** | **str** | | [optional] -**flavor** | [**FlavorResource**](FlavorResource.md) | | [optional] +**flavor** | [**AdminFlavorResource**](AdminFlavorResource.md) | | [optional] **status** | **str** | | [optional] **image** | **str** | | [optional] **fixed_ip** | **str** | | [optional] @@ -17,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.container_resource import ContainerResource +from hyperstack.models.admin_container_resource import AdminContainerResource # TODO update the JSON string below json = "{}" -# create an instance of ContainerResource from a JSON string -container_resource_instance = ContainerResource.from_json(json) +# create an instance of AdminContainerResource from a JSON string +admin_container_resource_instance = AdminContainerResource.from_json(json) # print the JSON string representation of the object -print ContainerResource.to_json() +print(AdminContainerResource.to_json()) # convert the object into a dict -container_resource_dict = container_resource_instance.to_dict() -# create an instance of ContainerResource from a dict -container_resource_form_dict = container_resource.from_dict(container_resource_dict) +admin_container_resource_dict = admin_container_resource_instance.to_dict() +# create an instance of AdminContainerResource from a dict +admin_container_resource_form_dict = admin_container_resource.from_dict(admin_container_resource_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdminContractEventFields.md b/docs/AdminContractEventFields.md new file mode 100644 index 0000000..78f5d69 --- /dev/null +++ b/docs/AdminContractEventFields.md @@ -0,0 +1,36 @@ +# AdminContractEventFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**user_id** | **int** | | [optional] +**org_id** | **int** | | [optional] +**time** | **datetime** | | [optional] +**type** | **str** | | [optional] +**reason** | **str** | | [optional] +**message** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_contract_event_fields import AdminContractEventFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminContractEventFields from a JSON string +admin_contract_event_fields_instance = AdminContractEventFields.from_json(json) +# print the JSON string representation of the object +print(AdminContractEventFields.to_json()) + +# convert the object into a dict +admin_contract_event_fields_dict = admin_contract_event_fields_instance.to_dict() +# create an instance of AdminContractEventFields from a dict +admin_contract_event_fields_form_dict = admin_contract_event_fields.from_dict(admin_contract_event_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminContractFields.md b/docs/AdminContractFields.md new file mode 100644 index 0000000..444a93e --- /dev/null +++ b/docs/AdminContractFields.md @@ -0,0 +1,41 @@ +# AdminContractFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**org_name** | **str** | | [optional] +**description** | **str** | | [optional] +**start_date** | **datetime** | | [optional] +**end_date** | **datetime** | | [optional] +**expiration_policy** | **int** | | [optional] +**status** | **str** | | [optional] +**gpu_name** | **str** | | [optional] +**percent** | **float** | | [optional] +**amount** | **float** | | [optional] +**discount_type** | **str** | | [optional] +**resource_count** | **int** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_contract_fields import AdminContractFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminContractFields from a JSON string +admin_contract_fields_instance = AdminContractFields.from_json(json) +# print the JSON string representation of the object +print(AdminContractFields.to_json()) + +# convert the object into a dict +admin_contract_fields_dict = admin_contract_fields_instance.to_dict() +# create an instance of AdminContractFields from a dict +admin_contract_fields_form_dict = admin_contract_fields.from_dict(admin_contract_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminCountResourcesOrganization.md b/docs/AdminCountResourcesOrganization.md new file mode 100644 index 0000000..045e4c7 --- /dev/null +++ b/docs/AdminCountResourcesOrganization.md @@ -0,0 +1,33 @@ +# AdminCountResourcesOrganization + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **int** | | [optional] +**total_instances** | **int** | | [optional] +**total_volumes** | **int** | | [optional] +**total_containers** | **int** | | [optional] +**total_clusters** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.admin_count_resources_organization import AdminCountResourcesOrganization + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminCountResourcesOrganization from a JSON string +admin_count_resources_organization_instance = AdminCountResourcesOrganization.from_json(json) +# print the JSON string representation of the object +print(AdminCountResourcesOrganization.to_json()) + +# convert the object into a dict +admin_count_resources_organization_dict = admin_count_resources_organization_instance.to_dict() +# create an instance of AdminCountResourcesOrganization from a dict +admin_count_resources_organization_form_dict = admin_count_resources_organization.from_dict(admin_count_resources_organization_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminCountResourcesOrganizations.md b/docs/AdminCountResourcesOrganizations.md new file mode 100644 index 0000000..74fd460 --- /dev/null +++ b/docs/AdminCountResourcesOrganizations.md @@ -0,0 +1,29 @@ +# AdminCountResourcesOrganizations + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**List[AdminCountResourcesOrganization]**](AdminCountResourcesOrganization.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_count_resources_organizations import AdminCountResourcesOrganizations + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminCountResourcesOrganizations from a JSON string +admin_count_resources_organizations_instance = AdminCountResourcesOrganizations.from_json(json) +# print the JSON string representation of the object +print(AdminCountResourcesOrganizations.to_json()) + +# convert the object into a dict +admin_count_resources_organizations_dict = admin_count_resources_organizations_instance.to_dict() +# create an instance of AdminCountResourcesOrganizations from a dict +admin_count_resources_organizations_form_dict = admin_count_resources_organizations.from_dict(admin_count_resources_organizations_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminCreateContractResponseModel.md b/docs/AdminCreateContractResponseModel.md new file mode 100644 index 0000000..85d6c72 --- /dev/null +++ b/docs/AdminCreateContractResponseModel.md @@ -0,0 +1,31 @@ +# AdminCreateContractResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**contract** | [**CreateContarctFields**](CreateContarctFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_create_contract_response_model import AdminCreateContractResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminCreateContractResponseModel from a JSON string +admin_create_contract_response_model_instance = AdminCreateContractResponseModel.from_json(json) +# print the JSON string representation of the object +print(AdminCreateContractResponseModel.to_json()) + +# convert the object into a dict +admin_create_contract_response_model_dict = admin_create_contract_response_model_instance.to_dict() +# create an instance of AdminCreateContractResponseModel from a dict +admin_create_contract_response_model_form_dict = admin_create_contract_response_model.from_dict(admin_create_contract_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminEnvrionmentResources.md b/docs/AdminEnvrionmentResources.md new file mode 100644 index 0000000..cbdbece --- /dev/null +++ b/docs/AdminEnvrionmentResources.md @@ -0,0 +1,36 @@ +# AdminEnvrionmentResources + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**region** | **str** | | [optional] +**instances** | [**List[AdminInstanceResources]**](AdminInstanceResources.md) | | [optional] +**volumes** | [**List[AdminVolumeResource]**](AdminVolumeResource.md) | | [optional] +**containers** | [**List[AdminContainerResource]**](AdminContainerResource.md) | | [optional] +**clusters** | [**List[AdminClusterResource]**](AdminClusterResource.md) | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_envrionment_resources import AdminEnvrionmentResources + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminEnvrionmentResources from a JSON string +admin_envrionment_resources_instance = AdminEnvrionmentResources.from_json(json) +# print the JSON string representation of the object +print(AdminEnvrionmentResources.to_json()) + +# convert the object into a dict +admin_envrionment_resources_dict = admin_envrionment_resources_instance.to_dict() +# create an instance of AdminEnvrionmentResources from a dict +admin_envrionment_resources_form_dict = admin_envrionment_resources.from_dict(admin_envrionment_resources_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminFlavorDetailFields.md b/docs/AdminFlavorDetailFields.md new file mode 100644 index 0000000..c335e81 --- /dev/null +++ b/docs/AdminFlavorDetailFields.md @@ -0,0 +1,47 @@ +# AdminFlavorDetailFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**openstack_id** | **str** | | [optional] +**name** | **str** | | [optional] +**region_name** | **str** | | [optional] +**cpu** | **int** | | [optional] +**ram** | **float** | | [optional] +**disk** | **int** | | [optional] +**gpu** | **str** | | [optional] +**status** | **str** | | [optional] +**gpu_count** | **int** | | [optional] +**stock_available** | **bool** | | [optional] +**nodes** | [**List[AdminFlavorDetailNodeFields]**](AdminFlavorDetailNodeFields.md) | | [optional] +**vms** | **List[int]** | | [optional] +**is_public** | **bool** | | [optional] +**is_custom** | **bool** | | [optional] +**org_ids** | **List[int]** | | [optional] +**ephemeral** | **int** | | [optional] +**description** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_flavor_detail_fields import AdminFlavorDetailFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminFlavorDetailFields from a JSON string +admin_flavor_detail_fields_instance = AdminFlavorDetailFields.from_json(json) +# print the JSON string representation of the object +print(AdminFlavorDetailFields.to_json()) + +# convert the object into a dict +admin_flavor_detail_fields_dict = admin_flavor_detail_fields_instance.to_dict() +# create an instance of AdminFlavorDetailFields from a dict +admin_flavor_detail_fields_form_dict = admin_flavor_detail_fields.from_dict(admin_flavor_detail_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminFlavorDetailNodeFields.md b/docs/AdminFlavorDetailNodeFields.md new file mode 100644 index 0000000..4bbd05e --- /dev/null +++ b/docs/AdminFlavorDetailNodeFields.md @@ -0,0 +1,35 @@ +# AdminFlavorDetailNodeFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**openstack_id** | **str** | | [optional] +**name** | **str** | | [optional] +**available** | **int** | | [optional] +**status** | **str** | | [optional] +**provision_date** | **datetime** | | [optional] +**projects** | **List[str]** | | [optional] + +## Example + +```python +from hyperstack.models.admin_flavor_detail_node_fields import AdminFlavorDetailNodeFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminFlavorDetailNodeFields from a JSON string +admin_flavor_detail_node_fields_instance = AdminFlavorDetailNodeFields.from_json(json) +# print the JSON string representation of the object +print(AdminFlavorDetailNodeFields.to_json()) + +# convert the object into a dict +admin_flavor_detail_node_fields_dict = admin_flavor_detail_node_fields_instance.to_dict() +# create an instance of AdminFlavorDetailNodeFields from a dict +admin_flavor_detail_node_fields_form_dict = admin_flavor_detail_node_fields.from_dict(admin_flavor_detail_node_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminFlavorResource.md b/docs/AdminFlavorResource.md new file mode 100644 index 0000000..f05e833 --- /dev/null +++ b/docs/AdminFlavorResource.md @@ -0,0 +1,46 @@ +# AdminFlavorResource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**openstack_id** | **str** | | [optional] +**name** | **str** | | [optional] +**region_name** | **str** | | [optional] +**cpu** | **int** | | [optional] +**ram** | **float** | | [optional] +**disk** | **int** | | [optional] +**gpu** | **str** | | [optional] +**status** | **str** | | [optional] +**gpu_count** | **int** | | [optional] +**stock_available** | **bool** | | [optional] +**nodes** | [**List[AdminNodeResource]**](AdminNodeResource.md) | | [optional] +**vms** | **List[int]** | | [optional] +**is_public** | **bool** | | [optional] +**is_custom** | **bool** | | [optional] +**ephemeral** | **int** | | [optional] +**description** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_flavor_resource import AdminFlavorResource + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminFlavorResource from a JSON string +admin_flavor_resource_instance = AdminFlavorResource.from_json(json) +# print the JSON string representation of the object +print(AdminFlavorResource.to_json()) + +# convert the object into a dict +admin_flavor_resource_dict = admin_flavor_resource_instance.to_dict() +# create an instance of AdminFlavorResource from a dict +admin_flavor_resource_form_dict = admin_flavor_resource.from_dict(admin_flavor_resource_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminFlavorResourcesList.md b/docs/AdminFlavorResourcesList.md new file mode 100644 index 0000000..91e242c --- /dev/null +++ b/docs/AdminFlavorResourcesList.md @@ -0,0 +1,31 @@ +# AdminFlavorResourcesList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**flavors** | [**List[AdminFlavorResource]**](AdminFlavorResource.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_flavor_resources_list import AdminFlavorResourcesList + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminFlavorResourcesList from a JSON string +admin_flavor_resources_list_instance = AdminFlavorResourcesList.from_json(json) +# print the JSON string representation of the object +print(AdminFlavorResourcesList.to_json()) + +# convert the object into a dict +admin_flavor_resources_list_dict = admin_flavor_resources_list_instance.to_dict() +# create an instance of AdminFlavorResourcesList from a dict +admin_flavor_resources_list_form_dict = admin_flavor_resources_list.from_dict(admin_flavor_resources_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminGetContractDetailFields.md b/docs/AdminGetContractDetailFields.md new file mode 100644 index 0000000..98a438f --- /dev/null +++ b/docs/AdminGetContractDetailFields.md @@ -0,0 +1,35 @@ +# AdminGetContractDetailFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**org_id** | **int** | | [optional] +**description** | **str** | | [optional] +**start_date** | **datetime** | | [optional] +**end_date** | **datetime** | | [optional] +**expiration_policy** | **int** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_get_contract_detail_fields import AdminGetContractDetailFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminGetContractDetailFields from a JSON string +admin_get_contract_detail_fields_instance = AdminGetContractDetailFields.from_json(json) +# print the JSON string representation of the object +print(AdminGetContractDetailFields.to_json()) + +# convert the object into a dict +admin_get_contract_detail_fields_dict = admin_get_contract_detail_fields_instance.to_dict() +# create an instance of AdminGetContractDetailFields from a dict +admin_get_contract_detail_fields_form_dict = admin_get_contract_detail_fields.from_dict(admin_get_contract_detail_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminGetVersionResponse.md b/docs/AdminGetVersionResponse.md new file mode 100644 index 0000000..13de4f1 --- /dev/null +++ b/docs/AdminGetVersionResponse.md @@ -0,0 +1,31 @@ +# AdminGetVersionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**version** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.admin_get_version_response import AdminGetVersionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminGetVersionResponse from a JSON string +admin_get_version_response_instance = AdminGetVersionResponse.from_json(json) +# print the JSON string representation of the object +print(AdminGetVersionResponse.to_json()) + +# convert the object into a dict +admin_get_version_response_dict = admin_get_version_response_instance.to_dict() +# create an instance of AdminGetVersionResponse from a dict +admin_get_version_response_form_dict = admin_get_version_response.from_dict(admin_get_version_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminHibernationRestorationPayloadModel.md b/docs/AdminHibernationRestorationPayloadModel.md new file mode 100644 index 0000000..5d3c8f4 --- /dev/null +++ b/docs/AdminHibernationRestorationPayloadModel.md @@ -0,0 +1,32 @@ +# AdminHibernationRestorationPayloadModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | +**vm_name** | **str** | | +**vm_id** | **int** | | +**status** | **str** | | + +## Example + +```python +from hyperstack.models.admin_hibernation_restoration_payload_model import AdminHibernationRestorationPayloadModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminHibernationRestorationPayloadModel from a JSON string +admin_hibernation_restoration_payload_model_instance = AdminHibernationRestorationPayloadModel.from_json(json) +# print the JSON string representation of the object +print(AdminHibernationRestorationPayloadModel.to_json()) + +# convert the object into a dict +admin_hibernation_restoration_payload_model_dict = admin_hibernation_restoration_payload_model_instance.to_dict() +# create an instance of AdminHibernationRestorationPayloadModel from a dict +admin_hibernation_restoration_payload_model_form_dict = admin_hibernation_restoration_payload_model.from_dict(admin_hibernation_restoration_payload_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminImageAdminFields.md b/docs/AdminImageAdminFields.md new file mode 100644 index 0000000..f942412 --- /dev/null +++ b/docs/AdminImageAdminFields.md @@ -0,0 +1,40 @@ +# AdminImageAdminFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**openstack_id** | **str** | | [optional] +**region_id** | **int** | | [optional] +**region_name** | **str** | | [optional] +**type** | **str** | | [optional] +**version** | **str** | | [optional] +**size** | **int** | | [optional] +**is_public** | **bool** | | [optional] +**description** | **str** | | [optional] +**labels** | [**List[LableResonse]**](LableResonse.md) | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_image_admin_fields import AdminImageAdminFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminImageAdminFields from a JSON string +admin_image_admin_fields_instance = AdminImageAdminFields.from_json(json) +# print the JSON string representation of the object +print(AdminImageAdminFields.to_json()) + +# convert the object into a dict +admin_image_admin_fields_dict = admin_image_admin_fields_instance.to_dict() +# create an instance of AdminImageAdminFields from a dict +admin_image_admin_fields_form_dict = admin_image_admin_fields.from_dict(admin_image_admin_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminImageAdminResponse.md b/docs/AdminImageAdminResponse.md new file mode 100644 index 0000000..2b5fa59 --- /dev/null +++ b/docs/AdminImageAdminResponse.md @@ -0,0 +1,31 @@ +# AdminImageAdminResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**image** | [**AdminImageAdminResponseImage**](AdminImageAdminResponseImage.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_image_admin_response import AdminImageAdminResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminImageAdminResponse from a JSON string +admin_image_admin_response_instance = AdminImageAdminResponse.from_json(json) +# print the JSON string representation of the object +print(AdminImageAdminResponse.to_json()) + +# convert the object into a dict +admin_image_admin_response_dict = admin_image_admin_response_instance.to_dict() +# create an instance of AdminImageAdminResponse from a dict +admin_image_admin_response_form_dict = admin_image_admin_response.from_dict(admin_image_admin_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminImageAdminResponseImage.md b/docs/AdminImageAdminResponseImage.md new file mode 100644 index 0000000..e0e099b --- /dev/null +++ b/docs/AdminImageAdminResponseImage.md @@ -0,0 +1,41 @@ +# AdminImageAdminResponseImage + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**openstack_id** | **str** | | [optional] +**region_id** | **int** | | [optional] +**region_name** | **str** | | [optional] +**type** | **str** | | [optional] +**version** | **str** | | [optional] +**size** | **int** | | [optional] +**is_public** | **bool** | | [optional] +**description** | **str** | | [optional] +**labels** | [**List[LableResonse]**](LableResonse.md) | | [optional] +**created_at** | **datetime** | | [optional] +**organizations** | **List[int]** | | + +## Example + +```python +from hyperstack.models.admin_image_admin_response_image import AdminImageAdminResponseImage + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminImageAdminResponseImage from a JSON string +admin_image_admin_response_image_instance = AdminImageAdminResponseImage.from_json(json) +# print the JSON string representation of the object +print(AdminImageAdminResponseImage.to_json()) + +# convert the object into a dict +admin_image_admin_response_image_dict = admin_image_admin_response_image_instance.to_dict() +# create an instance of AdminImageAdminResponseImage from a dict +admin_image_admin_response_image_form_dict = admin_image_admin_response_image.from_dict(admin_image_admin_response_image_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminImageListAdminResponse.md b/docs/AdminImageListAdminResponse.md new file mode 100644 index 0000000..b7b0794 --- /dev/null +++ b/docs/AdminImageListAdminResponse.md @@ -0,0 +1,31 @@ +# AdminImageListAdminResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**data** | [**List[AdminImageAdminFields]**](AdminImageAdminFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_image_list_admin_response import AdminImageListAdminResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminImageListAdminResponse from a JSON string +admin_image_list_admin_response_instance = AdminImageListAdminResponse.from_json(json) +# print the JSON string representation of the object +print(AdminImageListAdminResponse.to_json()) + +# convert the object into a dict +admin_image_list_admin_response_dict = admin_image_list_admin_response_instance.to_dict() +# create an instance of AdminImageListAdminResponse from a dict +admin_image_list_admin_response_form_dict = admin_image_list_admin_response.from_dict(admin_image_list_admin_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceResources.md b/docs/AdminInstanceResources.md similarity index 56% rename from docs/InstanceResources.md rename to docs/AdminInstanceResources.md index ce5e14f..e0f2858 100644 --- a/docs/InstanceResources.md +++ b/docs/AdminInstanceResources.md @@ -1,4 +1,4 @@ -# InstanceResources +# AdminInstanceResources ## Properties @@ -7,33 +7,35 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **name** | **str** | | [optional] +**openstack_id** | **str** | | [optional] **host** | **str** | | [optional] **status** | **str** | | [optional] -**flavor** | [**FlavorResource**](FlavorResource.md) | | [optional] +**flavor** | [**AdminFlavorResource**](AdminFlavorResource.md) | | [optional] **image_id** | **int** | | [optional] **volume_id** | **int** | | [optional] **keypair_name** | **str** | | [optional] **fixed_ip** | **str** | | [optional] **floating_ip** | **str** | | [optional] +**contract_id** | **int** | | [optional] **floating_ip_status** | **str** | | [optional] **created_at** | **datetime** | | [optional] ## Example ```python -from hyperstack.models.instance_resources import InstanceResources +from hyperstack.models.admin_instance_resources import AdminInstanceResources # TODO update the JSON string below json = "{}" -# create an instance of InstanceResources from a JSON string -instance_resources_instance = InstanceResources.from_json(json) +# create an instance of AdminInstanceResources from a JSON string +admin_instance_resources_instance = AdminInstanceResources.from_json(json) # print the JSON string representation of the object -print InstanceResources.to_json() +print(AdminInstanceResources.to_json()) # convert the object into a dict -instance_resources_dict = instance_resources_instance.to_dict() -# create an instance of InstanceResources from a dict -instance_resources_form_dict = instance_resources.from_dict(instance_resources_dict) +admin_instance_resources_dict = admin_instance_resources_instance.to_dict() +# create an instance of AdminInstanceResources from a dict +admin_instance_resources_form_dict = admin_instance_resources.from_dict(admin_instance_resources_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdminNodeResource.md b/docs/AdminNodeResource.md new file mode 100644 index 0000000..432e02e --- /dev/null +++ b/docs/AdminNodeResource.md @@ -0,0 +1,35 @@ +# AdminNodeResource + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**openstack_id** | **str** | | [optional] +**name** | **str** | | [optional] +**available** | **int** | | [optional] +**status** | **str** | | [optional] +**provision_date** | **datetime** | | [optional] +**organizations** | **List[int]** | | [optional] + +## Example + +```python +from hyperstack.models.admin_node_resource import AdminNodeResource + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminNodeResource from a JSON string +admin_node_resource_instance = AdminNodeResource.from_json(json) +# print the JSON string representation of the object +print(AdminNodeResource.to_json()) + +# convert the object into a dict +admin_node_resource_dict = admin_node_resource_instance.to_dict() +# create an instance of AdminNodeResource from a dict +admin_node_resource_form_dict = admin_node_resource.from_dict(admin_node_resource_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminOrganizationResourceList.md b/docs/AdminOrganizationResourceList.md new file mode 100644 index 0000000..73c6ca5 --- /dev/null +++ b/docs/AdminOrganizationResourceList.md @@ -0,0 +1,31 @@ +# AdminOrganizationResourceList + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**organizations** | [**List[AdminOrganizationResources]**](AdminOrganizationResources.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_organization_resource_list import AdminOrganizationResourceList + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminOrganizationResourceList from a JSON string +admin_organization_resource_list_instance = AdminOrganizationResourceList.from_json(json) +# print the JSON string representation of the object +print(AdminOrganizationResourceList.to_json()) + +# convert the object into a dict +admin_organization_resource_list_dict = admin_organization_resource_list_instance.to_dict() +# create an instance of AdminOrganizationResourceList from a dict +admin_organization_resource_list_form_dict = admin_organization_resource_list.from_dict(admin_organization_resource_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminOrganizationResourceResponse.md b/docs/AdminOrganizationResourceResponse.md new file mode 100644 index 0000000..dcaa407 --- /dev/null +++ b/docs/AdminOrganizationResourceResponse.md @@ -0,0 +1,31 @@ +# AdminOrganizationResourceResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**organization** | [**AdminOrganizationResources**](AdminOrganizationResources.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_organization_resource_response import AdminOrganizationResourceResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminOrganizationResourceResponse from a JSON string +admin_organization_resource_response_instance = AdminOrganizationResourceResponse.from_json(json) +# print the JSON string representation of the object +print(AdminOrganizationResourceResponse.to_json()) + +# convert the object into a dict +admin_organization_resource_response_dict = admin_organization_resource_response_instance.to_dict() +# create an instance of AdminOrganizationResourceResponse from a dict +admin_organization_resource_response_form_dict = admin_organization_resource_response.from_dict(admin_organization_resource_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminOrganizationResources.md b/docs/AdminOrganizationResources.md new file mode 100644 index 0000000..a381550 --- /dev/null +++ b/docs/AdminOrganizationResources.md @@ -0,0 +1,30 @@ +# AdminOrganizationResources + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**organization_id** | **int** | | [optional] +**environments** | [**List[AdminEnvrionmentResources]**](AdminEnvrionmentResources.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_organization_resources import AdminOrganizationResources + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminOrganizationResources from a JSON string +admin_organization_resources_instance = AdminOrganizationResources.from_json(json) +# print the JSON string representation of the object +print(AdminOrganizationResources.to_json()) + +# convert the object into a dict +admin_organization_resources_dict = admin_organization_resources_instance.to_dict() +# create an instance of AdminOrganizationResources from a dict +admin_organization_resources_form_dict = admin_organization_resources.from_dict(admin_organization_resources_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminOrganizationResponseModel.md b/docs/AdminOrganizationResponseModel.md new file mode 100644 index 0000000..2359e09 --- /dev/null +++ b/docs/AdminOrganizationResponseModel.md @@ -0,0 +1,31 @@ +# AdminOrganizationResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**organizations** | [**OrganizationFields**](OrganizationFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_organization_response_model import AdminOrganizationResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminOrganizationResponseModel from a JSON string +admin_organization_response_model_instance = AdminOrganizationResponseModel.from_json(json) +# print the JSON string representation of the object +print(AdminOrganizationResponseModel.to_json()) + +# convert the object into a dict +admin_organization_response_model_dict = admin_organization_response_model_instance.to_dict() +# create an instance of AdminOrganizationResponseModel from a dict +admin_organization_response_model_form_dict = admin_organization_response_model.from_dict(admin_organization_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminOrganizationSummaryFields.md b/docs/AdminOrganizationSummaryFields.md new file mode 100644 index 0000000..9f8bb75 --- /dev/null +++ b/docs/AdminOrganizationSummaryFields.md @@ -0,0 +1,31 @@ +# AdminOrganizationSummaryFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_organization_summary_fields import AdminOrganizationSummaryFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminOrganizationSummaryFields from a JSON string +admin_organization_summary_fields_instance = AdminOrganizationSummaryFields.from_json(json) +# print the JSON string representation of the object +print(AdminOrganizationSummaryFields.to_json()) + +# convert the object into a dict +admin_organization_summary_fields_dict = admin_organization_summary_fields_instance.to_dict() +# create an instance of AdminOrganizationSummaryFields from a dict +admin_organization_summary_fields_form_dict = admin_organization_summary_fields.from_dict(admin_organization_summary_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminOrganizationsResponseModel.md b/docs/AdminOrganizationsResponseModel.md new file mode 100644 index 0000000..750fa4c --- /dev/null +++ b/docs/AdminOrganizationsResponseModel.md @@ -0,0 +1,32 @@ +# AdminOrganizationsResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**organizations** | [**List[OrganizationFields]**](OrganizationFields.md) | | [optional] +**organization_count** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.admin_organizations_response_model import AdminOrganizationsResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminOrganizationsResponseModel from a JSON string +admin_organizations_response_model_instance = AdminOrganizationsResponseModel.from_json(json) +# print the JSON string representation of the object +print(AdminOrganizationsResponseModel.to_json()) + +# convert the object into a dict +admin_organizations_response_model_dict = admin_organizations_response_model_instance.to_dict() +# create an instance of AdminOrganizationsResponseModel from a dict +admin_organizations_response_model_form_dict = admin_organizations_response_model.from_dict(admin_organizations_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminOrganizationsSummaryResponseModel.md b/docs/AdminOrganizationsSummaryResponseModel.md new file mode 100644 index 0000000..c8e3515 --- /dev/null +++ b/docs/AdminOrganizationsSummaryResponseModel.md @@ -0,0 +1,31 @@ +# AdminOrganizationsSummaryResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**organizations** | [**List[AdminOrganizationSummaryFields]**](AdminOrganizationSummaryFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_organizations_summary_response_model import AdminOrganizationsSummaryResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminOrganizationsSummaryResponseModel from a JSON string +admin_organizations_summary_response_model_instance = AdminOrganizationsSummaryResponseModel.from_json(json) +# print the JSON string representation of the object +print(AdminOrganizationsSummaryResponseModel.to_json()) + +# convert the object into a dict +admin_organizations_summary_response_model_dict = admin_organizations_summary_response_model_instance.to_dict() +# create an instance of AdminOrganizationsSummaryResponseModel from a dict +admin_organizations_summary_response_model_form_dict = admin_organizations_summary_response_model.from_dict(admin_organizations_summary_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminUserFields.md b/docs/AdminUserFields.md new file mode 100644 index 0000000..f529c1e --- /dev/null +++ b/docs/AdminUserFields.md @@ -0,0 +1,35 @@ +# AdminUserFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**username** | **str** | | +**email** | **str** | | +**org_id** | **int** | | +**org_name** | **str** | | +**created_at** | **datetime** | | [optional] +**last_login** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.admin_user_fields import AdminUserFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminUserFields from a JSON string +admin_user_fields_instance = AdminUserFields.from_json(json) +# print the JSON string representation of the object +print(AdminUserFields.to_json()) + +# convert the object into a dict +admin_user_fields_dict = admin_user_fields_instance.to_dict() +# create an instance of AdminUserFields from a dict +admin_user_fields_form_dict = admin_user_fields.from_dict(admin_user_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminUserResponseModel.md b/docs/AdminUserResponseModel.md new file mode 100644 index 0000000..4a80ad3 --- /dev/null +++ b/docs/AdminUserResponseModel.md @@ -0,0 +1,31 @@ +# AdminUserResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**user** | [**AdminUserFields**](AdminUserFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_user_response_model import AdminUserResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminUserResponseModel from a JSON string +admin_user_response_model_instance = AdminUserResponseModel.from_json(json) +# print the JSON string representation of the object +print(AdminUserResponseModel.to_json()) + +# convert the object into a dict +admin_user_response_model_dict = admin_user_response_model_instance.to_dict() +# create an instance of AdminUserResponseModel from a dict +admin_user_response_model_form_dict = admin_user_response_model.from_dict(admin_user_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminUsersResponseModel.md b/docs/AdminUsersResponseModel.md new file mode 100644 index 0000000..eac33a0 --- /dev/null +++ b/docs/AdminUsersResponseModel.md @@ -0,0 +1,31 @@ +# AdminUsersResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**users** | [**List[AdminUserFields]**](AdminUserFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.admin_users_response_model import AdminUsersResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminUsersResponseModel from a JSON string +admin_users_response_model_instance = AdminUsersResponseModel.from_json(json) +# print the JSON string representation of the object +print(AdminUsersResponseModel.to_json()) + +# convert the object into a dict +admin_users_response_model_dict = admin_users_response_model_instance.to_dict() +# create an instance of AdminUsersResponseModel from a dict +admin_users_response_model_form_dict = admin_users_response_model.from_dict(admin_users_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AdminVersionResponseModel.md b/docs/AdminVersionResponseModel.md new file mode 100644 index 0000000..5415177 --- /dev/null +++ b/docs/AdminVersionResponseModel.md @@ -0,0 +1,31 @@ +# AdminVersionResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**version** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.admin_version_response_model import AdminVersionResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AdminVersionResponseModel from a JSON string +admin_version_response_model_instance = AdminVersionResponseModel.from_json(json) +# print the JSON string representation of the object +print(AdminVersionResponseModel.to_json()) + +# convert the object into a dict +admin_version_response_model_dict = admin_version_response_model_instance.to_dict() +# create an instance of AdminVersionResponseModel from a dict +admin_version_response_model_form_dict = admin_version_response_model.from_dict(admin_version_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VolumeResource.md b/docs/AdminVolumeResource.md similarity index 57% rename from docs/VolumeResource.md rename to docs/AdminVolumeResource.md index f229f2e..a11672e 100644 --- a/docs/VolumeResource.md +++ b/docs/AdminVolumeResource.md @@ -1,4 +1,4 @@ -# VolumeResource +# AdminVolumeResource ## Properties @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **name** | **str** | | [optional] +**openstack_id** | **str** | | [optional] **type** | **str** | | [optional] **size** | **int** | | [optional] **status** | **str** | | [optional] @@ -16,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.volume_resource import VolumeResource +from hyperstack.models.admin_volume_resource import AdminVolumeResource # TODO update the JSON string below json = "{}" -# create an instance of VolumeResource from a JSON string -volume_resource_instance = VolumeResource.from_json(json) +# create an instance of AdminVolumeResource from a JSON string +admin_volume_resource_instance = AdminVolumeResource.from_json(json) # print the JSON string representation of the object -print VolumeResource.to_json() +print(AdminVolumeResource.to_json()) # convert the object into a dict -volume_resource_dict = volume_resource_instance.to_dict() -# create an instance of VolumeResource from a dict -volume_resource_form_dict = volume_resource.from_dict(volume_resource_dict) +admin_volume_resource_dict = admin_volume_resource_instance.to_dict() +# create an instance of AdminVolumeResource from a dict +admin_volume_resource_form_dict = admin_volume_resource.from_dict(admin_volume_resource_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Adminaddorganizationpayload.md b/docs/Adminaddorganizationpayload.md index faa1325..68dcc9a 100644 --- a/docs/Adminaddorganizationpayload.md +++ b/docs/Adminaddorganizationpayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of Adminaddorganizationpayload from a JSON string adminaddorganizationpayload_instance = Adminaddorganizationpayload.from_json(json) # print the JSON string representation of the object -print Adminaddorganizationpayload.to_json() +print(Adminaddorganizationpayload.to_json()) # convert the object into a dict adminaddorganizationpayload_dict = adminaddorganizationpayload_instance.to_dict() diff --git a/docs/Admincreditpostpayload.md b/docs/Admincreditpostpayload.md index 60954d4..cd5b683 100644 --- a/docs/Admincreditpostpayload.md +++ b/docs/Admincreditpostpayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of Admincreditpostpayload from a JSON string admincreditpostpayload_instance = Admincreditpostpayload.from_json(json) # print the JSON string representation of the object -print Admincreditpostpayload.to_json() +print(Admincreditpostpayload.to_json()) # convert the object into a dict admincreditpostpayload_dict = admincreditpostpayload_instance.to_dict() diff --git a/docs/Adminpaymenthistoryfields.md b/docs/Adminpaymenthistoryfields.md new file mode 100644 index 0000000..080a196 --- /dev/null +++ b/docs/Adminpaymenthistoryfields.md @@ -0,0 +1,34 @@ +# Adminpaymenthistoryfields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **float** | | [optional] +**medium** | **str** | | [optional] +**status** | **str** | | [optional] +**transaction_id** | **str** | | [optional] +**payment_id** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.adminpaymenthistoryfields import Adminpaymenthistoryfields + +# TODO update the JSON string below +json = "{}" +# create an instance of Adminpaymenthistoryfields from a JSON string +adminpaymenthistoryfields_instance = Adminpaymenthistoryfields.from_json(json) +# print the JSON string representation of the object +print(Adminpaymenthistoryfields.to_json()) + +# convert the object into a dict +adminpaymenthistoryfields_dict = adminpaymenthistoryfields_instance.to_dict() +# create an instance of Adminpaymenthistoryfields from a dict +adminpaymenthistoryfields_form_dict = adminpaymenthistoryfields.from_dict(adminpaymenthistoryfields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Adminpaymenthistoryresponse.md b/docs/Adminpaymenthistoryresponse.md new file mode 100644 index 0000000..542cc84 --- /dev/null +++ b/docs/Adminpaymenthistoryresponse.md @@ -0,0 +1,31 @@ +# Adminpaymenthistoryresponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**status** | **bool** | | [optional] +**payments** | [**List[Adminpaymenthistoryfields]**](Adminpaymenthistoryfields.md) | | [optional] + +## Example + +```python +from hyperstack.models.adminpaymenthistoryresponse import Adminpaymenthistoryresponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Adminpaymenthistoryresponse from a JSON string +adminpaymenthistoryresponse_instance = Adminpaymenthistoryresponse.from_json(json) +# print the JSON string representation of the object +print(Adminpaymenthistoryresponse.to_json()) + +# convert the object into a dict +adminpaymenthistoryresponse_dict = adminpaymenthistoryresponse_instance.to_dict() +# create an instance of Adminpaymenthistoryresponse from a dict +adminpaymenthistoryresponse_form_dict = adminpaymenthistoryresponse.from_dict(adminpaymenthistoryresponse_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Adminrechargehistoryfields.md b/docs/Adminrechargehistoryfields.md index f143047..8051818 100644 --- a/docs/Adminrechargehistoryfields.md +++ b/docs/Adminrechargehistoryfields.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of Adminrechargehistoryfields from a JSON string adminrechargehistoryfields_instance = Adminrechargehistoryfields.from_json(json) # print the JSON string representation of the object -print Adminrechargehistoryfields.to_json() +print(Adminrechargehistoryfields.to_json()) # convert the object into a dict adminrechargehistoryfields_dict = adminrechargehistoryfields_instance.to_dict() diff --git a/docs/Adminrechargehistoryresponse.md b/docs/Adminrechargehistoryresponse.md index 59ca23a..d966828 100644 --- a/docs/Adminrechargehistoryresponse.md +++ b/docs/Adminrechargehistoryresponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Adminrechargehistoryresponse from a JSON string adminrechargehistoryresponse_instance = Adminrechargehistoryresponse.from_json(json) # print the JSON string representation of the object -print Adminrechargehistoryresponse.to_json() +print(Adminrechargehistoryresponse.to_json()) # convert the object into a dict adminrechargehistoryresponse_dict = adminrechargehistoryresponse_instance.to_dict() diff --git a/docs/Adminthresholdpostpayload.md b/docs/Adminthresholdpostpayload.md index b8bf62f..0184c97 100644 --- a/docs/Adminthresholdpostpayload.md +++ b/docs/Adminthresholdpostpayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of Adminthresholdpostpayload from a JSON string adminthresholdpostpayload_instance = Adminthresholdpostpayload.from_json(json) # print the JSON string representation of the object -print Adminthresholdpostpayload.to_json() +print(Adminthresholdpostpayload.to_json()) # convert the object into a dict adminthresholdpostpayload_dict = adminthresholdpostpayload_instance.to_dict() diff --git a/docs/ApiKeyApi.md b/docs/ApiKeyApi.md index df14f41..67b05f8 100644 --- a/docs/ApiKeyApi.md +++ b/docs/ApiKeyApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **generate_api_key** -> APIKeygeneration generate_api_key() +> GenerateApiKeyResponseModel generate_api_key() Generate API Key @@ -19,7 +19,7 @@ Generate API Key ```python import hyperstack -from hyperstack.models.api_keygeneration import APIKeygeneration +from hyperstack.models.generate_api_key_response_model import GenerateApiKeyResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -62,7 +62,7 @@ This endpoint does not need any parameter. ### Return type -[**APIKeygeneration**](APIKeygeneration.md) +[**GenerateApiKeyResponseModel**](GenerateApiKeyResponseModel.md) ### Authorization @@ -77,7 +77,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | API Key generated successfully | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | @@ -85,7 +85,7 @@ This endpoint does not need any parameter. [[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_api_key** -> APIKey get_api_key() +> GetApiKeyResponseModel get_api_key() Get API Key @@ -96,7 +96,7 @@ Get API Key ```python import hyperstack -from hyperstack.models.api_key import APIKey +from hyperstack.models.get_api_key_response_model import GetApiKeyResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -145,7 +145,7 @@ This endpoint does not need any parameter. ### Return type -[**APIKey**](APIKey.md) +[**GetApiKeyResponseModel**](GetApiKeyResponseModel.md) ### Authorization @@ -160,7 +160,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting API Key success | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/ApiKeyVerifyFields.md b/docs/ApiKeyVerifyFields.md index b0a5071..585832a 100644 --- a/docs/ApiKeyVerifyFields.md +++ b/docs/ApiKeyVerifyFields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of ApiKeyVerifyFields from a JSON string api_key_verify_fields_instance = ApiKeyVerifyFields.from_json(json) # print the JSON string representation of the object -print ApiKeyVerifyFields.to_json() +print(ApiKeyVerifyFields.to_json()) # convert the object into a dict api_key_verify_fields_dict = api_key_verify_fields_instance.to_dict() diff --git a/docs/AssignRBACRolePayload.md b/docs/AssignRBACRolePayload.md index 44b1199..ff79b21 100644 --- a/docs/AssignRBACRolePayload.md +++ b/docs/AssignRBACRolePayload.md @@ -1,4 +1,4 @@ -# AssignRBACRolePayload +# AssignRbacRolePayload ## Properties @@ -10,18 +10,18 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.assign_rbac_role_payload import AssignRBACRolePayload +from hyperstack.models.assign_rbac_role_payload import AssignRbacRolePayload # TODO update the JSON string below json = "{}" -# create an instance of AssignRBACRolePayload from a JSON string -assign_rbac_role_payload_instance = AssignRBACRolePayload.from_json(json) +# create an instance of AssignRbacRolePayload from a JSON string +assign_rbac_role_payload_instance = AssignRbacRolePayload.from_json(json) # print the JSON string representation of the object -print AssignRBACRolePayload.to_json() +print(AssignRbacRolePayload.to_json()) # convert the object into a dict assign_rbac_role_payload_dict = assign_rbac_role_payload_instance.to_dict() -# create an instance of AssignRBACRolePayload from a dict +# create an instance of AssignRbacRolePayload from a dict assign_rbac_role_payload_form_dict = assign_rbac_role_payload.from_dict(assign_rbac_role_payload_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AssigningMemberRoleApi.md b/docs/AssigningMemberRoleApi.md index 9fab293..cf98dd1 100644 --- a/docs/AssigningMemberRoleApi.md +++ b/docs/AssigningMemberRoleApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **assign_rbac_roles** -> RBACRole assign_rbac_roles(user_id, payload) +> RbacRoleDetailResponseModel assign_rbac_roles(user_id, payload) Assign RBAC Roles @@ -20,8 +20,8 @@ Assign RBAC Roles ```python import hyperstack -from hyperstack.models.assign_rbac_role_payload import AssignRBACRolePayload -from hyperstack.models.rbac_role import RBACRole +from hyperstack.models.assign_rbac_role_payload import AssignRbacRolePayload +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -53,7 +53,7 @@ with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.AssigningMemberRoleApi(api_client) user_id = 56 # int | - payload = hyperstack.AssignRBACRolePayload() # AssignRBACRolePayload | + payload = hyperstack.AssignRbacRolePayload() # AssignRbacRolePayload | try: # Assign RBAC Roles @@ -72,11 +72,11 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **int**| | - **payload** | [**AssignRBACRolePayload**](AssignRBACRolePayload.md)| | + **payload** | [**AssignRbacRolePayload**](AssignRbacRolePayload.md)| | ### Return type -[**RBACRole**](RBACRole.md) +[**RbacRoleDetailResponseModel**](RbacRoleDetailResponseModel.md) ### Authorization @@ -91,7 +91,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Assigning RBAC Role success | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -100,7 +100,7 @@ Name | Type | Description | Notes [[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_role_from_a_user** -> ResponseModel remove_role_from_a_user(user_id) +> CommonResponseModel remove_role_from_a_user(user_id) Remove role from a user @@ -111,7 +111,7 @@ Remove role from a user ```python import hyperstack -from hyperstack.models.response_model import ResponseModel +from hyperstack.models.common_response_model import CommonResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -164,7 +164,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseModel**](ResponseModel.md) +[**CommonResponseModel**](CommonResponseModel.md) ### Authorization @@ -179,7 +179,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | RBAC member role deleted successfully | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/AttachCallbackPayload.md b/docs/AttachCallbackPayload.md index c3950c6..0f9d582 100644 --- a/docs/AttachCallbackPayload.md +++ b/docs/AttachCallbackPayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of AttachCallbackPayload from a JSON string attach_callback_payload_instance = AttachCallbackPayload.from_json(json) # print the JSON string representation of the object -print AttachCallbackPayload.to_json() +print(AttachCallbackPayload.to_json()) # convert the object into a dict attach_callback_payload_dict = attach_callback_payload_instance.to_dict() diff --git a/docs/AttachCallbackResponse.md b/docs/AttachCallbackResponse.md index 6474972..deb8690 100644 --- a/docs/AttachCallbackResponse.md +++ b/docs/AttachCallbackResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of AttachCallbackResponse from a JSON string attach_callback_response_instance = AttachCallbackResponse.from_json(json) # print the JSON string representation of the object -print AttachCallbackResponse.to_json() +print(AttachCallbackResponse.to_json()) # convert the object into a dict attach_callback_response_dict = attach_callback_response_instance.to_dict() diff --git a/docs/AttachFirewallWithVM.md b/docs/AttachFirewallWithVM.md new file mode 100644 index 0000000..9d999d6 --- /dev/null +++ b/docs/AttachFirewallWithVM.md @@ -0,0 +1,29 @@ +# AttachFirewallWithVM + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**vms** | **List[int]** | | + +## Example + +```python +from hyperstack.models.attach_firewall_with_vm import AttachFirewallWithVM + +# TODO update the JSON string below +json = "{}" +# create an instance of AttachFirewallWithVM from a JSON string +attach_firewall_with_vm_instance = AttachFirewallWithVM.from_json(json) +# print the JSON string representation of the object +print(AttachFirewallWithVM.to_json()) + +# convert the object into a dict +attach_firewall_with_vm_dict = attach_firewall_with_vm_instance.to_dict() +# create an instance of AttachFirewallWithVM from a dict +attach_firewall_with_vm_form_dict = attach_firewall_with_vm.from_dict(attach_firewall_with_vm_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AttachFirewallsToVMPayload.md b/docs/AttachFirewallsToVMPayload.md new file mode 100644 index 0000000..16c2f03 --- /dev/null +++ b/docs/AttachFirewallsToVMPayload.md @@ -0,0 +1,29 @@ +# AttachFirewallsToVMPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**firewalls** | **List[int]** | | + +## Example + +```python +from hyperstack.models.attach_firewalls_to_vm_payload import AttachFirewallsToVMPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AttachFirewallsToVMPayload from a JSON string +attach_firewalls_to_vm_payload_instance = AttachFirewallsToVMPayload.from_json(json) +# print the JSON string representation of the object +print(AttachFirewallsToVMPayload.to_json()) + +# convert the object into a dict +attach_firewalls_to_vm_payload_dict = attach_firewalls_to_vm_payload_instance.to_dict() +# create an instance of AttachFirewallsToVMPayload from a dict +attach_firewalls_to_vm_payload_form_dict = attach_firewalls_to_vm_payload.from_dict(attach_firewalls_to_vm_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AttachVolumeFields.md b/docs/AttachVolumeFields.md index 32528b5..dd7df73 100644 --- a/docs/AttachVolumeFields.md +++ b/docs/AttachVolumeFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of AttachVolumeFields from a JSON string attach_volume_fields_instance = AttachVolumeFields.from_json(json) # print the JSON string representation of the object -print AttachVolumeFields.to_json() +print(AttachVolumeFields.to_json()) # convert the object into a dict attach_volume_fields_dict = attach_volume_fields_instance.to_dict() diff --git a/docs/AttachVolumes.md b/docs/AttachVolumes.md index 5b6c165..df05580 100644 --- a/docs/AttachVolumes.md +++ b/docs/AttachVolumes.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of AttachVolumes from a JSON string attach_volumes_instance = AttachVolumes.from_json(json) # print the JSON string representation of the object -print AttachVolumes.to_json() +print(AttachVolumes.to_json()) # convert the object into a dict attach_volumes_dict = attach_volumes_instance.to_dict() diff --git a/docs/AttachVolumesPayload.md b/docs/AttachVolumesPayload.md index ba939e4..4e031d5 100644 --- a/docs/AttachVolumesPayload.md +++ b/docs/AttachVolumesPayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of AttachVolumesPayload from a JSON string attach_volumes_payload_instance = AttachVolumesPayload.from_json(json) # print the JSON string representation of the object -print AttachVolumesPayload.to_json() +print(AttachVolumesPayload.to_json()) # convert the object into a dict attach_volumes_payload_dict = attach_volumes_payload_instance.to_dict() diff --git a/docs/AuthApi.md b/docs/AuthApi.md index bd0096b..7916514 100644 --- a/docs/AuthApi.md +++ b/docs/AuthApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **auth_user_information** -> UserInfoResponse auth_user_information() +> AuthUserInfoResponseModel auth_user_information() Get me information @@ -19,7 +19,7 @@ Get me information ```python import hyperstack -from hyperstack.models.user_info_response import UserInfoResponse +from hyperstack.models.auth_user_info_response_model import AuthUserInfoResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -68,7 +68,7 @@ This endpoint does not need any parameter. ### Return type -[**UserInfoResponse**](UserInfoResponse.md) +[**AuthUserInfoResponseModel**](AuthUserInfoResponseModel.md) ### Authorization diff --git a/docs/AuthGetTokenResponseModel.md b/docs/AuthGetTokenResponseModel.md new file mode 100644 index 0000000..1922e60 --- /dev/null +++ b/docs/AuthGetTokenResponseModel.md @@ -0,0 +1,32 @@ +# AuthGetTokenResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**token** | [**TokenFields**](TokenFields.md) | | [optional] +**first_login** | **bool** | | [optional] + +## Example + +```python +from hyperstack.models.auth_get_token_response_model import AuthGetTokenResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthGetTokenResponseModel from a JSON string +auth_get_token_response_model_instance = AuthGetTokenResponseModel.from_json(json) +# print the JSON string representation of the object +print(AuthGetTokenResponseModel.to_json()) + +# convert the object into a dict +auth_get_token_response_model_dict = auth_get_token_response_model_instance.to_dict() +# create an instance of AuthGetTokenResponseModel from a dict +auth_get_token_response_model_form_dict = auth_get_token_response_model.from_dict(auth_get_token_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthRequestLoginFields.md b/docs/AuthRequestLoginFields.md new file mode 100644 index 0000000..24166ae --- /dev/null +++ b/docs/AuthRequestLoginFields.md @@ -0,0 +1,30 @@ +# AuthRequestLoginFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**authorization_url** | **str** | | [optional] +**session_id** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.auth_request_login_fields import AuthRequestLoginFields + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthRequestLoginFields from a JSON string +auth_request_login_fields_instance = AuthRequestLoginFields.from_json(json) +# print the JSON string representation of the object +print(AuthRequestLoginFields.to_json()) + +# convert the object into a dict +auth_request_login_fields_dict = auth_request_login_fields_instance.to_dict() +# create an instance of AuthRequestLoginFields from a dict +auth_request_login_fields_form_dict = auth_request_login_fields.from_dict(auth_request_login_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthRequestLoginResponseModel.md b/docs/AuthRequestLoginResponseModel.md new file mode 100644 index 0000000..86ae212 --- /dev/null +++ b/docs/AuthRequestLoginResponseModel.md @@ -0,0 +1,31 @@ +# AuthRequestLoginResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**data** | [**AuthRequestLoginFields**](AuthRequestLoginFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.auth_request_login_response_model import AuthRequestLoginResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthRequestLoginResponseModel from a JSON string +auth_request_login_response_model_instance = AuthRequestLoginResponseModel.from_json(json) +# print the JSON string representation of the object +print(AuthRequestLoginResponseModel.to_json()) + +# convert the object into a dict +auth_request_login_response_model_dict = auth_request_login_response_model_instance.to_dict() +# create an instance of AuthRequestLoginResponseModel from a dict +auth_request_login_response_model_form_dict = auth_request_login_response_model.from_dict(auth_request_login_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserFields.md b/docs/AuthUserFields.md similarity index 58% rename from docs/UserFields.md rename to docs/AuthUserFields.md index cf58437..9df6d16 100644 --- a/docs/UserFields.md +++ b/docs/AuthUserFields.md @@ -1,4 +1,4 @@ -# UserFields +# AuthUserFields ## Properties @@ -13,19 +13,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.user_fields import UserFields +from hyperstack.models.auth_user_fields import AuthUserFields # TODO update the JSON string below json = "{}" -# create an instance of UserFields from a JSON string -user_fields_instance = UserFields.from_json(json) +# create an instance of AuthUserFields from a JSON string +auth_user_fields_instance = AuthUserFields.from_json(json) # print the JSON string representation of the object -print UserFields.to_json() +print(AuthUserFields.to_json()) # convert the object into a dict -user_fields_dict = user_fields_instance.to_dict() -# create an instance of UserFields from a dict -user_fields_form_dict = user_fields.from_dict(user_fields_dict) +auth_user_fields_dict = auth_user_fields_instance.to_dict() +# create an instance of AuthUserFields from a dict +auth_user_fields_form_dict = auth_user_fields.from_dict(auth_user_fields_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthUserInfoResponseModel.md b/docs/AuthUserInfoResponseModel.md new file mode 100644 index 0000000..932b7bb --- /dev/null +++ b/docs/AuthUserInfoResponseModel.md @@ -0,0 +1,31 @@ +# AuthUserInfoResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**user** | [**AuthUserFields**](AuthUserFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.auth_user_info_response_model import AuthUserInfoResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthUserInfoResponseModel from a JSON string +auth_user_info_response_model_instance = AuthUserInfoResponseModel.from_json(json) +# print the JSON string representation of the object +print(AuthUserInfoResponseModel.to_json()) + +# convert the object into a dict +auth_user_info_response_model_dict = auth_user_info_response_model_instance.to_dict() +# create an instance of AuthUserInfoResponseModel from a dict +auth_user_info_response_model_form_dict = auth_user_info_response_model.from_dict(auth_user_info_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingResponse.md b/docs/BillingResponse.md index 44f4cc9..8092b13 100644 --- a/docs/BillingResponse.md +++ b/docs/BillingResponse.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of BillingResponse from a JSON string billing_response_instance = BillingResponse.from_json(json) # print the JSON string representation of the object -print BillingResponse.to_json() +print(BillingResponse.to_json()) # convert the object into a dict billing_response_dict = billing_response_instance.to_dict() diff --git a/docs/Billingimmuneresources.md b/docs/Billingimmuneresources.md new file mode 100644 index 0000000..fc8a0f6 --- /dev/null +++ b/docs/Billingimmuneresources.md @@ -0,0 +1,31 @@ +# Billingimmuneresources + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **int** | | [optional] +**resource_type** | **str** | | [optional] +**organization_id** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.billingimmuneresources import Billingimmuneresources + +# TODO update the JSON string below +json = "{}" +# create an instance of Billingimmuneresources from a JSON string +billingimmuneresources_instance = Billingimmuneresources.from_json(json) +# print the JSON string representation of the object +print(Billingimmuneresources.to_json()) + +# convert the object into a dict +billingimmuneresources_dict = billingimmuneresources_instance.to_dict() +# create an instance of Billingimmuneresources from a dict +billingimmuneresources_form_dict = billingimmuneresources.from_dict(billingimmuneresources_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Billingimmuneresourcesresponse.md b/docs/Billingimmuneresourcesresponse.md new file mode 100644 index 0000000..6cf5f6c --- /dev/null +++ b/docs/Billingimmuneresourcesresponse.md @@ -0,0 +1,31 @@ +# Billingimmuneresourcesresponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**data** | [**List[Billingimmuneresources]**](Billingimmuneresources.md) | | [optional] + +## Example + +```python +from hyperstack.models.billingimmuneresourcesresponse import Billingimmuneresourcesresponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Billingimmuneresourcesresponse from a JSON string +billingimmuneresourcesresponse_instance = Billingimmuneresourcesresponse.from_json(json) +# print the JSON string representation of the object +print(Billingimmuneresourcesresponse.to_json()) + +# convert the object into a dict +billingimmuneresourcesresponse_dict = billingimmuneresourcesresponse_instance.to_dict() +# create an instance of Billingimmuneresourcesresponse from a dict +billingimmuneresourcesresponse_form_dict = billingimmuneresourcesresponse.from_dict(billingimmuneresourcesresponse_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Billingmetricesfields.md b/docs/Billingmetricesfields.md index 64ad220..636aeef 100644 --- a/docs/Billingmetricesfields.md +++ b/docs/Billingmetricesfields.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **total_up_time** | **float** | | [optional] **total_bill** | **float** | | [optional] **active** | **bool** | | [optional] +**exclude_billing** | **bool** | | [optional] ## Example @@ -26,7 +27,7 @@ json = "{}" # create an instance of Billingmetricesfields from a JSON string billingmetricesfields_instance = Billingmetricesfields.from_json(json) # print the JSON string representation of the object -print Billingmetricesfields.to_json() +print(Billingmetricesfields.to_json()) # convert the object into a dict billingmetricesfields_dict = billingmetricesfields_instance.to_dict() diff --git a/docs/Billingmetricesresponse.md b/docs/Billingmetricesresponse.md index 8a00e0d..bba68e3 100644 --- a/docs/Billingmetricesresponse.md +++ b/docs/Billingmetricesresponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Billingmetricesresponse from a JSON string billingmetricesresponse_instance = Billingmetricesresponse.from_json(json) # print the JSON string representation of the object -print Billingmetricesresponse.to_json() +print(Billingmetricesresponse.to_json()) # convert the object into a dict billingmetricesresponse_dict = billingmetricesresponse_instance.to_dict() diff --git a/docs/CallbacksApi.md b/docs/CallbacksApi.md index d51c7af..08e1e35 100644 --- a/docs/CallbacksApi.md +++ b/docs/CallbacksApi.md @@ -4,18 +4,20 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**attach_a_callback_to_a_volume**](CallbacksApi.md#attach_a_callback_to_a_volume) | **POST** /core/volumes/{id}/attach-callback | Attach a callback to a volume -[**attach_a_callback_to_an_instance**](CallbacksApi.md#attach_a_callback_to_an_instance) | **POST** /core/virtual-machines/{id}/attach-callback | Attach a callback to an instance -[**delete_a_callback_url_for_an_instance**](CallbacksApi.md#delete_a_callback_url_for_an_instance) | **DELETE** /core/virtual-machines/{id}/delete-callback | Delete a callback URL for an instance -[**delete_callback_url_for_a_volume**](CallbacksApi.md#delete_callback_url_for_a_volume) | **DELETE** /core/volumes/{id}/delete-callback | Delete callback URL for a volume -[**update_a_callback_url**](CallbacksApi.md#update_a_callback_url) | **PUT** /core/virtual-machines/{id}/update-callback | Update a callback URL -[**update_callback_url_for_volume**](CallbacksApi.md#update_callback_url_for_volume) | **PUT** /core/volumes/{id}/update-callback | Update callback URL for volume +[**attach_callback_to_virtual_machine**](CallbacksApi.md#attach_callback_to_virtual_machine) | **POST** /core/virtual-machines/{id}/attach-callback | Attach callback to virtual machine +[**attach_callback_to_volume**](CallbacksApi.md#attach_callback_to_volume) | **POST** /core/volumes/{id}/attach-callback | Attach callback to volume +[**delete_virtual_machine_callback**](CallbacksApi.md#delete_virtual_machine_callback) | **DELETE** /core/virtual-machines/{id}/delete-callback | Delete virtual machine callback +[**delete_volume_callback**](CallbacksApi.md#delete_volume_callback) | **DELETE** /core/volumes/{id}/delete-callback | Delete volume callback +[**update_virtual_machine_callback**](CallbacksApi.md#update_virtual_machine_callback) | **PUT** /core/virtual-machines/{id}/update-callback | Update virtual machine callback +[**update_volume_callback**](CallbacksApi.md#update_volume_callback) | **PUT** /core/volumes/{id}/update-callback | Update volume callback -# **attach_a_callback_to_a_volume** -> AttachCallbackResponse attach_a_callback_to_a_volume(id, payload) +# **attach_callback_to_virtual_machine** +> AttachCallbackResponse attach_callback_to_virtual_machine(id, payload) -Attach a callback to a volume +Attach callback to virtual machine + +Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine). ### Example @@ -60,12 +62,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.AttachCallbackPayload() # AttachCallbackPayload | try: - # Attach a callback to a volume - api_response = api_instance.attach_a_callback_to_a_volume(id, payload) - print("The response of CallbacksApi->attach_a_callback_to_a_volume:\n") + # Attach callback to virtual machine + api_response = api_instance.attach_callback_to_virtual_machine(id, payload) + print("The response of CallbacksApi->attach_callback_to_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling CallbacksApi->attach_a_callback_to_a_volume: %s\n" % e) + print("Exception when calling CallbacksApi->attach_callback_to_virtual_machine: %s\n" % e) ``` @@ -95,7 +97,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Callback URL successfully attached to your volume. Any action events on your volume will be posted to the provided URL | - | +**200** | Callback URL successfully attached to your virtual machine. Any action events on your virtual machine will be posted to the provided URL | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -103,10 +105,12 @@ Name | Type | Description | Notes [[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) -# **attach_a_callback_to_an_instance** -> AttachCallbackResponse attach_a_callback_to_an_instance(id, payload) +# **attach_callback_to_volume** +> AttachCallbackResponse attach_callback_to_volume(id, payload) + +Attach callback to volume -Attach a callback to an instance +Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). ### Example @@ -151,12 +155,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.AttachCallbackPayload() # AttachCallbackPayload | try: - # Attach a callback to an instance - api_response = api_instance.attach_a_callback_to_an_instance(id, payload) - print("The response of CallbacksApi->attach_a_callback_to_an_instance:\n") + # Attach callback to volume + api_response = api_instance.attach_callback_to_volume(id, payload) + print("The response of CallbacksApi->attach_callback_to_volume:\n") pprint(api_response) except Exception as e: - print("Exception when calling CallbacksApi->attach_a_callback_to_an_instance: %s\n" % e) + print("Exception when calling CallbacksApi->attach_callback_to_volume: %s\n" % e) ``` @@ -186,7 +190,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Callback URL successfully attached to your instance. Any action events on your instance will be posted to the provided URL | - | +**200** | Callback URL successfully attached to your volume. Any action events on your volume will be posted to the provided URL | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -194,10 +198,12 @@ Name | Type | Description | Notes [[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_a_callback_url_for_an_instance** -> ResponseModel delete_a_callback_url_for_an_instance(id) +# **delete_virtual_machine_callback** +> ResponseModel delete_virtual_machine_callback(id) + +Delete virtual machine callback -Delete a callback URL for an instance +Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). ### Example @@ -240,12 +246,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete a callback URL for an instance - api_response = api_instance.delete_a_callback_url_for_an_instance(id) - print("The response of CallbacksApi->delete_a_callback_url_for_an_instance:\n") + # Delete virtual machine callback + api_response = api_instance.delete_virtual_machine_callback(id) + print("The response of CallbacksApi->delete_virtual_machine_callback:\n") pprint(api_response) except Exception as e: - print("Exception when calling CallbacksApi->delete_a_callback_url_for_an_instance: %s\n" % e) + print("Exception when calling CallbacksApi->delete_virtual_machine_callback: %s\n" % e) ``` @@ -274,7 +280,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Virtual machine callback URL successfully deleted. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -282,10 +288,12 @@ Name | Type | Description | Notes [[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_callback_url_for_a_volume** -> ResponseModel delete_callback_url_for_a_volume(id) +# **delete_volume_callback** +> ResponseModel delete_volume_callback(id) -Delete callback URL for a volume +Delete volume callback + +Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). ### Example @@ -328,12 +336,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete callback URL for a volume - api_response = api_instance.delete_callback_url_for_a_volume(id) - print("The response of CallbacksApi->delete_callback_url_for_a_volume:\n") + # Delete volume callback + api_response = api_instance.delete_volume_callback(id) + print("The response of CallbacksApi->delete_volume_callback:\n") pprint(api_response) except Exception as e: - print("Exception when calling CallbacksApi->delete_callback_url_for_a_volume: %s\n" % e) + print("Exception when calling CallbacksApi->delete_volume_callback: %s\n" % e) ``` @@ -362,7 +370,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Volume callback URL successfully deleted. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -370,10 +378,12 @@ Name | Type | Description | Notes [[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_a_callback_url** -> AttachCallbackResponse update_a_callback_url(id, payload) +# **update_virtual_machine_callback** +> AttachCallbackResponse update_virtual_machine_callback(id, payload) + +Update virtual machine callback -Update a callback URL +Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). ### Example @@ -418,12 +428,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.AttachCallbackPayload() # AttachCallbackPayload | try: - # Update a callback URL - api_response = api_instance.update_a_callback_url(id, payload) - print("The response of CallbacksApi->update_a_callback_url:\n") + # Update virtual machine callback + api_response = api_instance.update_virtual_machine_callback(id, payload) + print("The response of CallbacksApi->update_virtual_machine_callback:\n") pprint(api_response) except Exception as e: - print("Exception when calling CallbacksApi->update_a_callback_url: %s\n" % e) + print("Exception when calling CallbacksApi->update_virtual_machine_callback: %s\n" % e) ``` @@ -453,7 +463,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Callback URL successfully updated. | - | +**200** | Virtual machine callback URL successfully updated. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -461,10 +471,12 @@ Name | Type | Description | Notes [[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_callback_url_for_volume** -> AttachCallbackResponse update_callback_url_for_volume(id, payload) +# **update_volume_callback** +> AttachCallbackResponse update_volume_callback(id, payload) + +Update volume callback -Update callback URL for volume +Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). ### Example @@ -509,12 +521,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.AttachCallbackPayload() # AttachCallbackPayload | try: - # Update callback URL for volume - api_response = api_instance.update_callback_url_for_volume(id, payload) - print("The response of CallbacksApi->update_callback_url_for_volume:\n") + # Update volume callback + api_response = api_instance.update_volume_callback(id, payload) + print("The response of CallbacksApi->update_volume_callback:\n") pprint(api_response) except Exception as e: - print("Exception when calling CallbacksApi->update_callback_url_for_volume: %s\n" % e) + print("Exception when calling CallbacksApi->update_volume_callback: %s\n" % e) ``` diff --git a/docs/CommonResponseModel.md b/docs/CommonResponseModel.md new file mode 100644 index 0000000..fe0da03 --- /dev/null +++ b/docs/CommonResponseModel.md @@ -0,0 +1,30 @@ +# CommonResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.common_response_model import CommonResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of CommonResponseModel from a JSON string +common_response_model_instance = CommonResponseModel.from_json(json) +# print the JSON string representation of the object +print(CommonResponseModel.to_json()) + +# convert the object into a dict +common_response_model_dict = common_response_model_instance.to_dict() +# create an instance of CommonResponseModel from a dict +common_response_model_form_dict = common_response_model.from_dict(common_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index 5b72f6a..2fd3703 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -4,16 +4,16 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_compliance**](ComplianceApi.md#create_compliance) | **POST** /core/compliance | Create Compliance +[**create_compliance**](ComplianceApi.md#create_compliance) | **POST** /core/compliance | Create compliance [**delete_a_compliance**](ComplianceApi.md#delete_a_compliance) | **DELETE** /core/compliance/{gpu_model} | Delete a compliance -[**get_compliance_list**](ComplianceApi.md#get_compliance_list) | **GET** /core/compliance | Get Compliance List +[**retrieve_compliance**](ComplianceApi.md#retrieve_compliance) | **GET** /core/compliance | Retrieve GPU compliance [**update_a_compliance**](ComplianceApi.md#update_a_compliance) | **PUT** /core/compliance | Update a compliance # **create_compliance** > CreateUpdateComplianceResponse create_compliance(payload) -Create Compliance +Create compliance ### Example @@ -57,7 +57,7 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.CompliancePayload() # CompliancePayload | try: - # Create Compliance + # Create compliance api_response = api_instance.create_compliance(payload) print("The response of ComplianceApi->create_compliance:\n") pprint(api_response) @@ -189,10 +189,12 @@ Name | Type | Description | Notes [[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_compliance_list** -> ComplianceResponse get_compliance_list(gpu=gpu) +# **retrieve_compliance** +> ComplianceResponse retrieve_compliance(gpu=gpu) -Get Compliance List +Retrieve GPU compliance + +Returns a list of compliance objects each corresponding to available GPU models. These compliance objects contain minimum and maximum values for RAM in GB, number of vCPUs, and system disk capacity in GB. Use the optional `gpu` model parameter in the query string to filter responses by GPU model. For additional details on GPU compliance, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#adhering-to-gpu-compliance). ### Example @@ -235,12 +237,12 @@ with hyperstack.ApiClient(configuration) as api_client: gpu = None # object | This is for gpu model (optional) try: - # Get Compliance List - api_response = api_instance.get_compliance_list(gpu=gpu) - print("The response of ComplianceApi->get_compliance_list:\n") + # Retrieve GPU compliance + api_response = api_instance.retrieve_compliance(gpu=gpu) + print("The response of ComplianceApi->retrieve_compliance:\n") pprint(api_response) except Exception as e: - print("Exception when calling ComplianceApi->get_compliance_list: %s\n" % e) + print("Exception when calling ComplianceApi->retrieve_compliance: %s\n" % e) ``` @@ -269,7 +271,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Compliance list retrieved successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/ComplianceFields.md b/docs/ComplianceFields.md index d446c73..b70479c 100644 --- a/docs/ComplianceFields.md +++ b/docs/ComplianceFields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of ComplianceFields from a JSON string compliance_fields_instance = ComplianceFields.from_json(json) # print the JSON string representation of the object -print ComplianceFields.to_json() +print(ComplianceFields.to_json()) # convert the object into a dict compliance_fields_dict = compliance_fields_instance.to_dict() diff --git a/docs/ComplianceModelFields.md b/docs/ComplianceModelFields.md index 6d9ace8..40b33b4 100644 --- a/docs/ComplianceModelFields.md +++ b/docs/ComplianceModelFields.md @@ -23,7 +23,7 @@ json = "{}" # create an instance of ComplianceModelFields from a JSON string compliance_model_fields_instance = ComplianceModelFields.from_json(json) # print the JSON string representation of the object -print ComplianceModelFields.to_json() +print(ComplianceModelFields.to_json()) # convert the object into a dict compliance_model_fields_dict = compliance_model_fields_instance.to_dict() diff --git a/docs/CompliancePayload.md b/docs/CompliancePayload.md index a78fe02..22faccb 100644 --- a/docs/CompliancePayload.md +++ b/docs/CompliancePayload.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of CompliancePayload from a JSON string compliance_payload_instance = CompliancePayload.from_json(json) # print the JSON string representation of the object -print CompliancePayload.to_json() +print(CompliancePayload.to_json()) # convert the object into a dict compliance_payload_dict = compliance_payload_instance.to_dict() diff --git a/docs/ComplianceResponse.md b/docs/ComplianceResponse.md index 22781e1..e9c4abb 100644 --- a/docs/ComplianceResponse.md +++ b/docs/ComplianceResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of ComplianceResponse from a JSON string compliance_response_instance = ComplianceResponse.from_json(json) # print the JSON string representation of the object -print ComplianceResponse.to_json() +print(ComplianceResponse.to_json()) # convert the object into a dict compliance_response_dict = compliance_response_instance.to_dict() diff --git a/docs/ContainerOverviewFields.md b/docs/ContainerOverviewFields.md index 389ebc2..b0b2cfa 100644 --- a/docs/ContainerOverviewFields.md +++ b/docs/ContainerOverviewFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of ContainerOverviewFields from a JSON string container_overview_fields_instance = ContainerOverviewFields.from_json(json) # print the JSON string representation of the object -print ContainerOverviewFields.to_json() +print(ContainerOverviewFields.to_json()) # convert the object into a dict container_overview_fields_dict = container_overview_fields_instance.to_dict() diff --git a/docs/ContractInstanceFields.md b/docs/ContractInstanceFields.md new file mode 100644 index 0000000..d656efb --- /dev/null +++ b/docs/ContractInstanceFields.md @@ -0,0 +1,34 @@ +# ContractInstanceFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**status** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**flavor_name** | **str** | | [optional] +**gpu_count** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.contract_instance_fields import ContractInstanceFields + +# TODO update the JSON string below +json = "{}" +# create an instance of ContractInstanceFields from a JSON string +contract_instance_fields_instance = ContractInstanceFields.from_json(json) +# print the JSON string representation of the object +print(ContractInstanceFields.to_json()) + +# convert the object into a dict +contract_instance_fields_dict = contract_instance_fields_instance.to_dict() +# create an instance of ContractInstanceFields from a dict +contract_instance_fields_form_dict = contract_instance_fields.from_dict(contract_instance_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ContractInstancesResponse.md b/docs/ContractInstancesResponse.md new file mode 100644 index 0000000..8eab0ae --- /dev/null +++ b/docs/ContractInstancesResponse.md @@ -0,0 +1,31 @@ +# ContractInstancesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**instances** | [**List[ContractInstanceFields]**](ContractInstanceFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.contract_instances_response import ContractInstancesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ContractInstancesResponse from a JSON string +contract_instances_response_instance = ContractInstancesResponse.from_json(json) +# print the JSON string representation of the object +print(ContractInstancesResponse.to_json()) + +# convert the object into a dict +contract_instances_response_dict = contract_instances_response_instance.to_dict() +# create an instance of ContractInstancesResponse from a dict +contract_instances_response_form_dict = contract_instances_response.from_dict(contract_instances_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateContarctFields.md b/docs/CreateContarctFields.md new file mode 100644 index 0000000..6c02de8 --- /dev/null +++ b/docs/CreateContarctFields.md @@ -0,0 +1,36 @@ +# CreateContarctFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**org_id** | **int** | | [optional] +**description** | **str** | | [optional] +**start_date** | **datetime** | | [optional] +**end_date** | **datetime** | | [optional] +**expiration_policy** | **int** | | [optional] +**discount_plans** | [**List[DiscountPlanFields]**](DiscountPlanFields.md) | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.create_contarct_fields import CreateContarctFields + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateContarctFields from a JSON string +create_contarct_fields_instance = CreateContarctFields.from_json(json) +# print the JSON string representation of the object +print(CreateContarctFields.to_json()) + +# convert the object into a dict +create_contarct_fields_dict = create_contarct_fields_instance.to_dict() +# create an instance of CreateContarctFields from a dict +create_contarct_fields_form_dict = create_contarct_fields.from_dict(create_contarct_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateContractPayload.md b/docs/CreateContractPayload.md new file mode 100644 index 0000000..266debf --- /dev/null +++ b/docs/CreateContractPayload.md @@ -0,0 +1,34 @@ +# CreateContractPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | +**description** | **str** | | [optional] +**discount_resources** | [**List[ResourcePayload]**](ResourcePayload.md) | | +**start_date** | **datetime** | | [optional] +**end_date** | **datetime** | | [optional] +**expiration_policy** | **int** | | + +## Example + +```python +from hyperstack.models.create_contract_payload import CreateContractPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateContractPayload from a JSON string +create_contract_payload_instance = CreateContractPayload.from_json(json) +# print the JSON string representation of the object +print(CreateContractPayload.to_json()) + +# convert the object into a dict +create_contract_payload_dict = create_contract_payload_instance.to_dict() +# create an instance of CreateContractPayload from a dict +create_contract_payload_form_dict = create_contract_payload.from_dict(create_contract_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateDiscountResponse.md b/docs/CreateDiscountResponse.md index 6370787..b8dcbce 100644 --- a/docs/CreateDiscountResponse.md +++ b/docs/CreateDiscountResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of CreateDiscountResponse from a JSON string create_discount_response_instance = CreateDiscountResponse.from_json(json) # print the JSON string representation of the object -print CreateDiscountResponse.to_json() +print(CreateDiscountResponse.to_json()) # convert the object into a dict create_discount_response_dict = create_discount_response_instance.to_dict() diff --git a/docs/CreateDiscountsPayload.md b/docs/CreateDiscountsPayload.md index 090861b..e85e2cb 100644 --- a/docs/CreateDiscountsPayload.md +++ b/docs/CreateDiscountsPayload.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**org_id** | **int** | | +**customers** | [**List[CustomerPayload]**](CustomerPayload.md) | | **discount_resources** | [**List[ResourcePayload]**](ResourcePayload.md) | | **start_date** | **datetime** | | [optional] **end_date** | **datetime** | | [optional] @@ -21,7 +21,7 @@ json = "{}" # create an instance of CreateDiscountsPayload from a JSON string create_discounts_payload_instance = CreateDiscountsPayload.from_json(json) # print the JSON string representation of the object -print CreateDiscountsPayload.to_json() +print(CreateDiscountsPayload.to_json()) # convert the object into a dict create_discounts_payload_dict = create_discounts_payload_instance.to_dict() diff --git a/docs/CreateEnvironment.md b/docs/CreateEnvironment.md index bd489d3..a4309ed 100644 --- a/docs/CreateEnvironment.md +++ b/docs/CreateEnvironment.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | -**region** | **str** | | +**name** | **str** | The name of the environment being created. | +**region** | **str** | The geographic location of the data center where the environment is being created. To learn more about regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions). | ## Example @@ -18,7 +18,7 @@ json = "{}" # create an instance of CreateEnvironment from a JSON string create_environment_instance = CreateEnvironment.from_json(json) # print the JSON string representation of the object -print CreateEnvironment.to_json() +print(CreateEnvironment.to_json()) # convert the object into a dict create_environment_dict = create_environment_instance.to_dict() diff --git a/docs/CreateFirewallPayload.md b/docs/CreateFirewallPayload.md new file mode 100644 index 0000000..978baa9 --- /dev/null +++ b/docs/CreateFirewallPayload.md @@ -0,0 +1,31 @@ +# CreateFirewallPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] +**environment_id** | **int** | | + +## Example + +```python +from hyperstack.models.create_firewall_payload import CreateFirewallPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFirewallPayload from a JSON string +create_firewall_payload_instance = CreateFirewallPayload.from_json(json) +# print the JSON string representation of the object +print(CreateFirewallPayload.to_json()) + +# convert the object into a dict +create_firewall_payload_dict = create_firewall_payload_instance.to_dict() +# create an instance of CreateFirewallPayload from a dict +create_firewall_payload_form_dict = create_firewall_payload.from_dict(create_firewall_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateFirewallRulePayload.md b/docs/CreateFirewallRulePayload.md new file mode 100644 index 0000000..0e7829a --- /dev/null +++ b/docs/CreateFirewallRulePayload.md @@ -0,0 +1,34 @@ +# CreateFirewallRulePayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**direction** | **str** | | +**protocol** | **str** | | +**port_range_min** | **int** | | [optional] +**port_range_max** | **int** | | [optional] +**ethertype** | **str** | | +**remote_ip_prefix** | **str** | | + +## Example + +```python +from hyperstack.models.create_firewall_rule_payload import CreateFirewallRulePayload + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateFirewallRulePayload from a JSON string +create_firewall_rule_payload_instance = CreateFirewallRulePayload.from_json(json) +# print the JSON string representation of the object +print(CreateFirewallRulePayload.to_json()) + +# convert the object into a dict +create_firewall_rule_payload_dict = create_firewall_rule_payload_instance.to_dict() +# create an instance of CreateFirewallRulePayload from a dict +create_firewall_rule_payload_form_dict = create_firewall_rule_payload.from_dict(create_firewall_rule_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateGPU.md b/docs/CreateGPU.md index c78764e..5d501c1 100644 --- a/docs/CreateGPU.md +++ b/docs/CreateGPU.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | **regions** | **List[str]** | | [optional] -**example_metadata** | **str** | | [optional] +**example_metadata** | **str** | A valid JSON string. | [optional] ## Example @@ -19,7 +19,7 @@ json = "{}" # create an instance of CreateGPU from a JSON string create_gpu_instance = CreateGPU.from_json(json) # print the JSON string representation of the object -print CreateGPU.to_json() +print(CreateGPU.to_json()) # convert the object into a dict create_gpu_dict = create_gpu_instance.to_dict() diff --git a/docs/CreateInstancesPayload.md b/docs/CreateInstancesPayload.md index 8ae8566..9b422fb 100644 --- a/docs/CreateInstancesPayload.md +++ b/docs/CreateInstancesPayload.md @@ -5,19 +5,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | -**environment_name** | **str** | | -**image_name** | **str** | | [optional] -**volume_name** | **str** | | [optional] -**create_bootable_volume** | **bool** | | [optional] -**flavor_name** | **str** | | [optional] +**name** | **str** | The name of the virtual machine being created. | +**environment_name** | **str** | The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) in which the virtual machine is to be created. | +**image_name** | **str** | The [operating system (OS) image](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images) name designated for installation on the virtual machine. | [optional] +**volume_name** | **str** | The names of the volume(s) to be attached to the virtual machine being created. | [optional] +**create_bootable_volume** | **bool** | Indicates whether to create a bootable volume for the virtual machine. When set to `true`, a bootable volume will be created; the default value is `false`. | [optional] +**flavor_name** | **str** | The name of the GPU hardware configuration ([flavor](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors)) for the virtual machines being created. | **flavor** | [**FlavorObjectFields**](FlavorObjectFields.md) | | [optional] -**key_name** | **str** | | -**user_data** | **str** | | [optional] -**callback_url** | **str** | | [optional] -**assign_floating_ip** | **bool** | | [optional] +**key_name** | **str** | The name of the existing SSH key pair to be used for secure access to the virtual machine. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair). | +**user_data** | **str** | Optional initialization configuration commands to manage the configuration of a virtual machine at launch using cloud-init scripts. For more information about custom VM configuration using cloud-init, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/initialization-configuration). | [optional] +**callback_url** | **str** | An optional URL where actions performed on the virtual machine will be sent. For additional information on event callbacks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). | [optional] +**assign_floating_ip** | **bool** | When this field is set to `true`, it attaches a [public IP address](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip) to the virtual machine, enabling internet accessibility. | [optional] +**security_rules** | [**List[CreateSecurityRulePayload]**](CreateSecurityRulePayload.md) | | [optional] **profile** | [**ProfileObjectFields**](ProfileObjectFields.md) | | [optional] -**count** | **int** | | +**count** | **int** | The number of virtual machines to be created. | +**labels** | **List[str]** | | [optional] ## Example @@ -29,7 +31,7 @@ json = "{}" # create an instance of CreateInstancesPayload from a JSON string create_instances_payload_instance = CreateInstancesPayload.from_json(json) # print the JSON string representation of the object -print CreateInstancesPayload.to_json() +print(CreateInstancesPayload.to_json()) # convert the object into a dict create_instances_payload_dict = create_instances_payload_instance.to_dict() diff --git a/docs/CreateProfilePayload.md b/docs/CreateProfilePayload.md index eb4d3ff..d74eac9 100644 --- a/docs/CreateProfilePayload.md +++ b/docs/CreateProfilePayload.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | -**description** | **str** | | [optional] -**data** | **Dict[str, str]** | | +**name** | **str** | The name of the profile being created. | +**description** | **str** | The optional description for the profile being created. | [optional] +**data** | **Dict[str, str]** | The data object which contains the configuration of the virtual machine profile being created. | ## Example @@ -19,7 +19,7 @@ json = "{}" # create an instance of CreateProfilePayload from a JSON string create_profile_payload_instance = CreateProfilePayload.from_json(json) # print the JSON string representation of the object -print CreateProfilePayload.to_json() +print(CreateProfilePayload.to_json()) # convert the object into a dict create_profile_payload_dict = create_profile_payload_instance.to_dict() diff --git a/docs/CreateProfileResponse.md b/docs/CreateProfileResponse.md index 34b96c3..6b0a27d 100644 --- a/docs/CreateProfileResponse.md +++ b/docs/CreateProfileResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of CreateProfileResponse from a JSON string create_profile_response_instance = CreateProfileResponse.from_json(json) # print the JSON string representation of the object -print CreateProfileResponse.to_json() +print(CreateProfileResponse.to_json()) # convert the object into a dict create_profile_response_dict = create_profile_response_instance.to_dict() diff --git a/docs/CreateSecurityRulePayload.md b/docs/CreateSecurityRulePayload.md index 569c2c8..5d4d433 100644 --- a/docs/CreateSecurityRulePayload.md +++ b/docs/CreateSecurityRulePayload.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**direction** | **str** | | -**protocol** | **str** | | -**ethertype** | **str** | | -**remote_ip_prefix** | **str** | | +**direction** | **str** | The direction of traffic that the firewall rule applies to. | +**protocol** | **str** | The network protocol associated with the rule. Call the [`GET /core/sg-rules-protocols`](https://infrahub-api-doc.nexgencloud.com/#get-/core/sg-rules-protocols) endpoint to retrieve a list of permitted network protocols. | +**ethertype** | **str** | The Ethernet type associated with the rule. | +**remote_ip_prefix** | **str** | The IP address range that is allowed to access the specified port. Use \"0.0.0.0/0\" to allow any IP address. | ## Example @@ -20,7 +20,7 @@ json = "{}" # create an instance of CreateSecurityRulePayload from a JSON string create_security_rule_payload_instance = CreateSecurityRulePayload.from_json(json) # print the JSON string representation of the object -print CreateSecurityRulePayload.to_json() +print(CreateSecurityRulePayload.to_json()) # convert the object into a dict create_security_rule_payload_dict = create_security_rule_payload_instance.to_dict() diff --git a/docs/CreateUpdateComplianceResponse.md b/docs/CreateUpdateComplianceResponse.md index ed15f16..29d0b60 100644 --- a/docs/CreateUpdateComplianceResponse.md +++ b/docs/CreateUpdateComplianceResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of CreateUpdateComplianceResponse from a JSON string create_update_compliance_response_instance = CreateUpdateComplianceResponse.from_json(json) # print the JSON string representation of the object -print CreateUpdateComplianceResponse.to_json() +print(CreateUpdateComplianceResponse.to_json()) # convert the object into a dict create_update_compliance_response_dict = create_update_compliance_response_instance.to_dict() diff --git a/docs/CreateUpdatePermissionPayload.md b/docs/CreateUpdatePermissionPayload.md new file mode 100644 index 0000000..bc901db --- /dev/null +++ b/docs/CreateUpdatePermissionPayload.md @@ -0,0 +1,32 @@ +# CreateUpdatePermissionPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource** | **str** | | +**permission** | **str** | | +**method** | **str** | | +**endpoint** | **str** | | + +## Example + +```python +from hyperstack.models.create_update_permission_payload import CreateUpdatePermissionPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUpdatePermissionPayload from a JSON string +create_update_permission_payload_instance = CreateUpdatePermissionPayload.from_json(json) +# print the JSON string representation of the object +print(CreateUpdatePermissionPayload.to_json()) + +# convert the object into a dict +create_update_permission_payload_dict = create_update_permission_payload_instance.to_dict() +# create an instance of CreateUpdatePermissionPayload from a dict +create_update_permission_payload_form_dict = create_update_permission_payload.from_dict(create_update_permission_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUpdatePermissionResponseModel.md b/docs/CreateUpdatePermissionResponseModel.md new file mode 100644 index 0000000..eddd07f --- /dev/null +++ b/docs/CreateUpdatePermissionResponseModel.md @@ -0,0 +1,31 @@ +# CreateUpdatePermissionResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**permission** | [**PermissionFields**](PermissionFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.create_update_permission_response_model import CreateUpdatePermissionResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUpdatePermissionResponseModel from a JSON string +create_update_permission_response_model_instance = CreateUpdatePermissionResponseModel.from_json(json) +# print the JSON string representation of the object +print(CreateUpdatePermissionResponseModel.to_json()) + +# convert the object into a dict +create_update_permission_response_model_dict = create_update_permission_response_model_instance.to_dict() +# create an instance of CreateUpdatePermissionResponseModel from a dict +create_update_permission_response_model_form_dict = create_update_permission_response_model.from_dict(create_update_permission_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUpdatePolicyPayload.md b/docs/CreateUpdatePolicyPayload.md new file mode 100644 index 0000000..341b888 --- /dev/null +++ b/docs/CreateUpdatePolicyPayload.md @@ -0,0 +1,32 @@ +# CreateUpdatePolicyPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | +**is_public** | **bool** | | +**permissions** | **List[int]** | | + +## Example + +```python +from hyperstack.models.create_update_policy_payload import CreateUpdatePolicyPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUpdatePolicyPayload from a JSON string +create_update_policy_payload_instance = CreateUpdatePolicyPayload.from_json(json) +# print the JSON string representation of the object +print(CreateUpdatePolicyPayload.to_json()) + +# convert the object into a dict +create_update_policy_payload_dict = create_update_policy_payload_instance.to_dict() +# create an instance of CreateUpdatePolicyPayload from a dict +create_update_policy_payload_form_dict = create_update_policy_payload.from_dict(create_update_policy_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUpdatePolicyResponseModel.md b/docs/CreateUpdatePolicyResponseModel.md new file mode 100644 index 0000000..e3280c8 --- /dev/null +++ b/docs/CreateUpdatePolicyResponseModel.md @@ -0,0 +1,31 @@ +# CreateUpdatePolicyResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**policy** | [**PolicyFields**](PolicyFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.create_update_policy_response_model import CreateUpdatePolicyResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUpdatePolicyResponseModel from a JSON string +create_update_policy_response_model_instance = CreateUpdatePolicyResponseModel.from_json(json) +# print the JSON string representation of the object +print(CreateUpdatePolicyResponseModel.to_json()) + +# convert the object into a dict +create_update_policy_response_model_dict = create_update_policy_response_model_instance.to_dict() +# create an instance of CreateUpdatePolicyResponseModel from a dict +create_update_policy_response_model_form_dict = create_update_policy_response_model.from_dict(create_update_policy_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateUpdateRbacRolePayload.md b/docs/CreateUpdateRbacRolePayload.md new file mode 100644 index 0000000..1dbd41f --- /dev/null +++ b/docs/CreateUpdateRbacRolePayload.md @@ -0,0 +1,32 @@ +# CreateUpdateRbacRolePayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | +**policies** | **List[int]** | | [optional] +**permissions** | **List[int]** | | [optional] + +## Example + +```python +from hyperstack.models.create_update_rbac_role_payload import CreateUpdateRbacRolePayload + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateUpdateRbacRolePayload from a JSON string +create_update_rbac_role_payload_instance = CreateUpdateRbacRolePayload.from_json(json) +# print the JSON string representation of the object +print(CreateUpdateRbacRolePayload.to_json()) + +# convert the object into a dict +create_update_rbac_role_payload_dict = create_update_rbac_role_payload_instance.to_dict() +# create an instance of CreateUpdateRbacRolePayload from a dict +create_update_rbac_role_payload_form_dict = create_update_rbac_role_payload.from_dict(create_update_rbac_role_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateVolumePayload.md b/docs/CreateVolumePayload.md index 13931f2..9771394 100644 --- a/docs/CreateVolumePayload.md +++ b/docs/CreateVolumePayload.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | [optional] -**environment_name** | **str** | | [optional] -**description** | **str** | | [optional] -**volume_type** | **str** | | [optional] -**size** | **int** | | [optional] -**image_id** | **int** | | [optional] -**callback_url** | **str** | | [optional] +**name** | **str** | The name of the volume being created. | +**environment_name** | **str** | The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) within which the volume is being created. | +**description** | **str** | A brief description or comment about the volume. | +**volume_type** | **str** | Specifies the type of volume being created, which determines the storage technology it will use. Call the \"[List volume types](https://infrahub-api-doc.nexgencloud.com/#get-/core/volumes)\" endpoint to retrieve a list of available volume model types. | +**size** | **int** | The size of the volume in GB. 1048576GB storage capacity per volume. | +**image_id** | **int** | The ID of the operating system image that will be associated with the volume. By providing an `image_id` in the create volume request, you will create a bootable volume. | [optional] +**callback_url** | **str** | A URL that can be attached to the volume you are creating. This `callback_url` will post any action events that occur to your volume to the provided URL. | [optional] ## Example @@ -23,7 +23,7 @@ json = "{}" # create an instance of CreateVolumePayload from a JSON string create_volume_payload_instance = CreateVolumePayload.from_json(json) # print the JSON string representation of the object -print CreateVolumePayload.to_json() +print(CreateVolumePayload.to_json()) # convert the object into a dict create_volume_payload_dict = create_volume_payload_instance.to_dict() diff --git a/docs/CustomerContractApi.md b/docs/CustomerContractApi.md new file mode 100644 index 0000000..af3fcf8 --- /dev/null +++ b/docs/CustomerContractApi.md @@ -0,0 +1,189 @@ +# hyperstack.CustomerContractApi + +All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**details_of_contract_by_id_for_customer**](CustomerContractApi.md#details_of_contract_by_id_for_customer) | **GET** /pricebook/contracts/{contract_id} | Details of Contract by ID for Customer +[**list_contracts_for_customer**](CustomerContractApi.md#list_contracts_for_customer) | **GET** /pricebook/contracts | List Contracts for Customer + + +# **details_of_contract_by_id_for_customer** +> CustomerContractDetailResponseModel details_of_contract_by_id_for_customer(contract_id) + +Details of Contract by ID for Customer + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.customer_contract_detail_response_model import CustomerContractDetailResponseModel +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.CustomerContractApi(api_client) + contract_id = 56 # int | + + try: + # Details of Contract by ID for Customer + api_response = api_instance.details_of_contract_by_id_for_customer(contract_id) + print("The response of CustomerContractApi->details_of_contract_by_id_for_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomerContractApi->details_of_contract_by_id_for_customer: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract_id** | **int**| | + +### Return type + +[**CustomerContractDetailResponseModel**](CustomerContractDetailResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**404** | Not Found | - | +**405** | Method Not Allowed | - | +**500** | Internal Server Error | - | + +[[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_contracts_for_customer** +> GetCustomerContractsListResponseModel list_contracts_for_customer(page=page, per_page=per_page) + +List Contracts for Customer + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.get_customer_contracts_list_response_model import GetCustomerContractsListResponseModel +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.CustomerContractApi(api_client) + page = 56 # int | (optional) + per_page = 56 # int | (optional) + + try: + # List Contracts for Customer + api_response = api_instance.list_contracts_for_customer(page=page, per_page=per_page) + print("The response of CustomerContractApi->list_contracts_for_customer:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CustomerContractApi->list_contracts_for_customer: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| | [optional] + **per_page** | **int**| | [optional] + +### Return type + +[**GetCustomerContractsListResponseModel**](GetCustomerContractsListResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**405** | Method Not Allowed | - | +**500** | Internal Server Error | - | + +[[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/CustomerContractDetailResponseModel.md b/docs/CustomerContractDetailResponseModel.md new file mode 100644 index 0000000..ae97695 --- /dev/null +++ b/docs/CustomerContractDetailResponseModel.md @@ -0,0 +1,31 @@ +# CustomerContractDetailResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**contracts** | [**CustomerContractFields**](CustomerContractFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.customer_contract_detail_response_model import CustomerContractDetailResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomerContractDetailResponseModel from a JSON string +customer_contract_detail_response_model_instance = CustomerContractDetailResponseModel.from_json(json) +# print the JSON string representation of the object +print(CustomerContractDetailResponseModel.to_json()) + +# convert the object into a dict +customer_contract_detail_response_model_dict = customer_contract_detail_response_model_instance.to_dict() +# create an instance of CustomerContractDetailResponseModel from a dict +customer_contract_detail_response_model_form_dict = customer_contract_detail_response_model.from_dict(customer_contract_detail_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomerContractFields.md b/docs/CustomerContractFields.md new file mode 100644 index 0000000..4c9a5c3 --- /dev/null +++ b/docs/CustomerContractFields.md @@ -0,0 +1,37 @@ +# CustomerContractFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**org_id** | **int** | | [optional] +**description** | **str** | | [optional] +**start_date** | **datetime** | | [optional] +**end_date** | **datetime** | | [optional] +**expiration_policy** | **int** | | [optional] +**status** | **str** | | [optional] +**discounts** | [**List[DiscountPlanFields]**](DiscountPlanFields.md) | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.customer_contract_fields import CustomerContractFields + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomerContractFields from a JSON string +customer_contract_fields_instance = CustomerContractFields.from_json(json) +# print the JSON string representation of the object +print(CustomerContractFields.to_json()) + +# convert the object into a dict +customer_contract_fields_dict = customer_contract_fields_instance.to_dict() +# create an instance of CustomerContractFields from a dict +customer_contract_fields_form_dict = customer_contract_fields.from_dict(customer_contract_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomerFields.md b/docs/CustomerFields.md new file mode 100644 index 0000000..a67f59e --- /dev/null +++ b/docs/CustomerFields.md @@ -0,0 +1,30 @@ +# CustomerFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**plan_type** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.customer_fields import CustomerFields + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomerFields from a JSON string +customer_fields_instance = CustomerFields.from_json(json) +# print the JSON string representation of the object +print(CustomerFields.to_json()) + +# convert the object into a dict +customer_fields_dict = customer_fields_instance.to_dict() +# create an instance of CustomerFields from a dict +customer_fields_form_dict = customer_fields.from_dict(customer_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomerPayload.md b/docs/CustomerPayload.md new file mode 100644 index 0000000..0a9cc2d --- /dev/null +++ b/docs/CustomerPayload.md @@ -0,0 +1,30 @@ +# CustomerPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**plan_type** | **str** | | + +## Example + +```python +from hyperstack.models.customer_payload import CustomerPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of CustomerPayload from a JSON string +customer_payload_instance = CustomerPayload.from_json(json) +# print the JSON string representation of the object +print(CustomerPayload.to_json()) + +# convert the object into a dict +customer_payload_dict = customer_payload_instance.to_dict() +# create an instance of CustomerPayload from a dict +customer_payload_form_dict = customer_payload.from_dict(customer_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardApi.md b/docs/DashboardApi.md index b967fba..8e32782 100644 --- a/docs/DashboardApi.md +++ b/docs/DashboardApi.md @@ -4,13 +4,15 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_instances_containers_and_volumes_overview**](DashboardApi.md#get_instances_containers_and_volumes_overview) | **GET** /core/dashboard | Get Instances, Containers and Volumes Overview +[**retrieve_dashboard**](DashboardApi.md#retrieve_dashboard) | **GET** /core/dashboard | Retrieve Dashboard -# **get_instances_containers_and_volumes_overview** -> DashboardInfoResponse get_instances_containers_and_volumes_overview() +# **retrieve_dashboard** +> DashboardInfoResponse retrieve_dashboard() -Get Instances, Containers and Volumes Overview +Retrieve Dashboard + +Returns hardware and pricing overview for your active resources, including virtual machines, containers, and volumes. For additional information on the Dashboard feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/dashboard). ### Example @@ -52,12 +54,12 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.DashboardApi(api_client) try: - # Get Instances, Containers and Volumes Overview - api_response = api_instance.get_instances_containers_and_volumes_overview() - print("The response of DashboardApi->get_instances_containers_and_volumes_overview:\n") + # Retrieve Dashboard + api_response = api_instance.retrieve_dashboard() + print("The response of DashboardApi->retrieve_dashboard:\n") pprint(api_response) except Exception as e: - print("Exception when calling DashboardApi->get_instances_containers_and_volumes_overview: %s\n" % e) + print("Exception when calling DashboardApi->retrieve_dashboard: %s\n" % e) ``` diff --git a/docs/DashboardInfoResponse.md b/docs/DashboardInfoResponse.md index 49fd8d4..3d00b51 100644 --- a/docs/DashboardInfoResponse.md +++ b/docs/DashboardInfoResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of DashboardInfoResponse from a JSON string dashboard_info_response_instance = DashboardInfoResponse.from_json(json) # print the JSON string representation of the object -print DashboardInfoResponse.to_json() +print(DashboardInfoResponse.to_json()) # convert the object into a dict dashboard_info_response_dict = dashboard_info_response_instance.to_dict() diff --git a/docs/DeploymentFields.md b/docs/DeploymentFields.md index 0a958b6..f137152 100644 --- a/docs/DeploymentFields.md +++ b/docs/DeploymentFields.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of DeploymentFields from a JSON string deployment_fields_instance = DeploymentFields.from_json(json) # print the JSON string representation of the object -print DeploymentFields.to_json() +print(DeploymentFields.to_json()) # convert the object into a dict deployment_fields_dict = deployment_fields_instance.to_dict() diff --git a/docs/DeploymentFieldsforstartdeployments.md b/docs/DeploymentFieldsforstartdeployments.md index e3ef2e2..7ae2c32 100644 --- a/docs/DeploymentFieldsforstartdeployments.md +++ b/docs/DeploymentFieldsforstartdeployments.md @@ -23,7 +23,7 @@ json = "{}" # create an instance of DeploymentFieldsforstartdeployments from a JSON string deployment_fieldsforstartdeployments_instance = DeploymentFieldsforstartdeployments.from_json(json) # print the JSON string representation of the object -print DeploymentFieldsforstartdeployments.to_json() +print(DeploymentFieldsforstartdeployments.to_json()) # convert the object into a dict deployment_fieldsforstartdeployments_dict = deployment_fieldsforstartdeployments_instance.to_dict() diff --git a/docs/Deployments.md b/docs/Deployments.md index 6cbee49..a3e0dfe 100644 --- a/docs/Deployments.md +++ b/docs/Deployments.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Deployments from a JSON string deployments_instance = Deployments.from_json(json) # print the JSON string representation of the object -print Deployments.to_json() +print(Deployments.to_json()) # convert the object into a dict deployments_dict = deployments_instance.to_dict() diff --git a/docs/DetachVolumes.md b/docs/DetachVolumes.md index 77a7cdc..239a341 100644 --- a/docs/DetachVolumes.md +++ b/docs/DetachVolumes.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of DetachVolumes from a JSON string detach_volumes_instance = DetachVolumes.from_json(json) # print the JSON string representation of the object -print DetachVolumes.to_json() +print(DetachVolumes.to_json()) # convert the object into a dict detach_volumes_dict = detach_volumes_instance.to_dict() diff --git a/docs/DetachVolumesPayload.md b/docs/DetachVolumesPayload.md index 443382b..fe282da 100644 --- a/docs/DetachVolumesPayload.md +++ b/docs/DetachVolumesPayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of DetachVolumesPayload from a JSON string detach_volumes_payload_instance = DetachVolumesPayload.from_json(json) # print the JSON string representation of the object -print DetachVolumesPayload.to_json() +print(DetachVolumesPayload.to_json()) # convert the object into a dict detach_volumes_payload_dict = detach_volumes_payload_instance.to_dict() diff --git a/docs/DiscountDetailResponse.md b/docs/DiscountDetailResponse.md deleted file mode 100644 index c9d4582..0000000 --- a/docs/DiscountDetailResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# DiscountDetailResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**discount_plan** | [**List[InsertDiscountPlanFields]**](InsertDiscountPlanFields.md) | | [optional] - -## Example - -```python -from hyperstack.models.discount_detail_response import DiscountDetailResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of DiscountDetailResponse from a JSON string -discount_detail_response_instance = DiscountDetailResponse.from_json(json) -# print the JSON string representation of the object -print DiscountDetailResponse.to_json() - -# convert the object into a dict -discount_detail_response_dict = discount_detail_response_instance.to_dict() -# create an instance of DiscountDetailResponse from a dict -discount_detail_response_form_dict = discount_detail_response.from_dict(discount_detail_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DiscountEntityModel.md b/docs/DiscountEntityModel.md new file mode 100644 index 0000000..1695ad7 --- /dev/null +++ b/docs/DiscountEntityModel.md @@ -0,0 +1,30 @@ +# DiscountEntityModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity** | **str** | | [optional] +**data** | [**List[DiscountPlanFields]**](DiscountPlanFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.discount_entity_model import DiscountEntityModel + +# TODO update the JSON string below +json = "{}" +# create an instance of DiscountEntityModel from a JSON string +discount_entity_model_instance = DiscountEntityModel.from_json(json) +# print the JSON string representation of the object +print(DiscountEntityModel.to_json()) + +# convert the object into a dict +discount_entity_model_dict = discount_entity_model_instance.to_dict() +# create an instance of DiscountEntityModel from a dict +discount_entity_model_form_dict = discount_entity_model.from_dict(discount_entity_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DiscountFields.md b/docs/DiscountFields.md new file mode 100644 index 0000000..c3e4475 --- /dev/null +++ b/docs/DiscountFields.md @@ -0,0 +1,35 @@ +# DiscountFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**org_name** | **str** | | [optional] +**plan_type** | **str** | | [optional] +**vm_id** | **int** | | [optional] +**vm_name** | **str** | | [optional] +**end_date** | **datetime** | | [optional] +**discount_status** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.discount_fields import DiscountFields + +# TODO update the JSON string below +json = "{}" +# create an instance of DiscountFields from a JSON string +discount_fields_instance = DiscountFields.from_json(json) +# print the JSON string representation of the object +print(DiscountFields.to_json()) + +# convert the object into a dict +discount_fields_dict = discount_fields_instance.to_dict() +# create an instance of DiscountFields from a dict +discount_fields_form_dict = discount_fields.from_dict(discount_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DiscountPlanFields.md b/docs/DiscountPlanFields.md new file mode 100644 index 0000000..5c9b267 --- /dev/null +++ b/docs/DiscountPlanFields.md @@ -0,0 +1,37 @@ +# DiscountPlanFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**resource_id** | **int** | | [optional] +**resource_name** | **str** | | [optional] +**resource_count** | **int** | | [optional] +**discount_type** | **str** | | [optional] +**discount_code** | **str** | | [optional] +**discount_percent** | **float** | | [optional] +**discount_amount** | **float** | | [optional] +**discount_status** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.discount_plan_fields import DiscountPlanFields + +# TODO update the JSON string below +json = "{}" +# create an instance of DiscountPlanFields from a JSON string +discount_plan_fields_instance = DiscountPlanFields.from_json(json) +# print the JSON string representation of the object +print(DiscountPlanFields.to_json()) + +# convert the object into a dict +discount_plan_fields_dict = discount_plan_fields_instance.to_dict() +# create an instance of DiscountPlanFields from a dict +discount_plan_fields_form_dict = discount_plan_fields.from_dict(discount_plan_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DiscountResourceFields.md b/docs/DiscountResourceFields.md index 5067209..190d4c8 100644 --- a/docs/DiscountResourceFields.md +++ b/docs/DiscountResourceFields.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of DiscountResourceFields from a JSON string discount_resource_fields_instance = DiscountResourceFields.from_json(json) # print the JSON string representation of the object -print DiscountResourceFields.to_json() +print(DiscountResourceFields.to_json()) # convert the object into a dict discount_resource_fields_dict = discount_resource_fields_instance.to_dict() diff --git a/docs/EditlabelofanexistingVMPayload.md b/docs/EditlabelofanexistingVMPayload.md new file mode 100644 index 0000000..a06b1a7 --- /dev/null +++ b/docs/EditlabelofanexistingVMPayload.md @@ -0,0 +1,29 @@ +# EditlabelofanexistingVMPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**labels** | **List[str]** | | [optional] + +## Example + +```python +from hyperstack.models.editlabelofanexisting_vm_payload import EditlabelofanexistingVMPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of EditlabelofanexistingVMPayload from a JSON string +editlabelofanexisting_vm_payload_instance = EditlabelofanexistingVMPayload.from_json(json) +# print the JSON string representation of the object +print(EditlabelofanexistingVMPayload.to_json()) + +# convert the object into a dict +editlabelofanexisting_vm_payload_dict = editlabelofanexisting_vm_payload_instance.to_dict() +# create an instance of EditlabelofanexistingVMPayload from a dict +editlabelofanexisting_vm_payload_form_dict = editlabelofanexisting_vm_payload.from_dict(editlabelofanexisting_vm_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Environment.md b/docs/Environment.md index ac8f956..bb343b8 100644 --- a/docs/Environment.md +++ b/docs/Environment.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Environment from a JSON string environment_instance = Environment.from_json(json) # print the JSON string representation of the object -print Environment.to_json() +print(Environment.to_json()) # convert the object into a dict environment_dict = environment_instance.to_dict() diff --git a/docs/EnvironmentApi.md b/docs/EnvironmentApi.md index cad595e..361db0c 100644 --- a/docs/EnvironmentApi.md +++ b/docs/EnvironmentApi.md @@ -4,17 +4,19 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_environment**](EnvironmentApi.md#create_environment) | **POST** /core/environments | Create Environment -[**delete_an_environment**](EnvironmentApi.md#delete_an_environment) | **DELETE** /core/environments/{id} | Delete an environment -[**get_an_environment_details**](EnvironmentApi.md#get_an_environment_details) | **GET** /core/environments/{id} | Get an environment detail -[**list_environments**](EnvironmentApi.md#list_environments) | **GET** /core/environments | List Environments -[**update_an_environment**](EnvironmentApi.md#update_an_environment) | **PUT** /core/environments/{id} | Update Environment +[**create_environment**](EnvironmentApi.md#create_environment) | **POST** /core/environments | Create environment +[**delete_environment**](EnvironmentApi.md#delete_environment) | **DELETE** /core/environments/{id} | Delete environment +[**list_environments**](EnvironmentApi.md#list_environments) | **GET** /core/environments | List environments +[**retrieve_environment**](EnvironmentApi.md#retrieve_environment) | **GET** /core/environments/{id} | Retrieve environment +[**update_environment**](EnvironmentApi.md#update_environment) | **PUT** /core/environments/{id} | Update environment # **create_environment** > Environment create_environment(payload) -Create Environment +Create environment + +Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body. ### Example @@ -58,7 +60,7 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.CreateEnvironment() # CreateEnvironment | try: - # Create Environment + # Create environment api_response = api_instance.create_environment(payload) print("The response of EnvironmentApi->create_environment:\n") pprint(api_response) @@ -92,7 +94,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Environment is created successfully | - | +**200** | Environment has been created successfully | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -101,10 +103,12 @@ Name | Type | Description | Notes [[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_an_environment** -> ResponseModel delete_an_environment(id) +# **delete_environment** +> ResponseModel delete_environment(id) + +Delete environment -Delete an environment +Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment. ### Example @@ -147,12 +151,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete an environment - api_response = api_instance.delete_an_environment(id) - print("The response of EnvironmentApi->delete_an_environment:\n") + # Delete environment + api_response = api_instance.delete_environment(id) + print("The response of EnvironmentApi->delete_environment:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnvironmentApi->delete_an_environment: %s\n" % e) + print("Exception when calling EnvironmentApi->delete_environment: %s\n" % e) ``` @@ -181,7 +185,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | The environment has been successfully deleted. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -189,10 +193,12 @@ Name | Type | Description | Notes [[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_an_environment_details** -> Environment get_an_environment_details(id) +# **list_environments** +> Environments list_environments() + +List environments -Get an environment detail +Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features). ### Example @@ -201,7 +207,7 @@ Get an environment detail ```python import hyperstack -from hyperstack.models.environment import Environment +from hyperstack.models.environments import Environments from hyperstack.rest import ApiException from pprint import pprint @@ -232,29 +238,25 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.EnvironmentApi(api_client) - id = 56 # int | try: - # Get an environment detail - api_response = api_instance.get_an_environment_details(id) - print("The response of EnvironmentApi->get_an_environment_details:\n") + # List environments + api_response = api_instance.list_environments() + print("The response of EnvironmentApi->list_environments:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnvironmentApi->get_an_environment_details: %s\n" % e) + print("Exception when calling EnvironmentApi->list_environments: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| | +This endpoint does not need any parameter. ### Return type -[**Environment**](Environment.md) +[**Environments**](Environments.md) ### Authorization @@ -269,18 +271,19 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting detail successful | - | +**200** | Successful retrieval of environments list. | - | **400** | Bad Request | - | **401** | Unauthorized | - | -**404** | Not Found | - | **500** | Internal Server Error | - | [[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_environments** -> Environments list_environments() +# **retrieve_environment** +> Environment retrieve_environment(id) + +Retrieve environment -List Environments +Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. ### Example @@ -289,7 +292,7 @@ List Environments ```python import hyperstack -from hyperstack.models.environments import Environments +from hyperstack.models.environment import Environment from hyperstack.rest import ApiException from pprint import pprint @@ -320,25 +323,29 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.EnvironmentApi(api_client) + id = 56 # int | try: - # List Environments - api_response = api_instance.list_environments() - print("The response of EnvironmentApi->list_environments:\n") + # Retrieve environment + api_response = api_instance.retrieve_environment(id) + print("The response of EnvironmentApi->retrieve_environment:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnvironmentApi->list_environments: %s\n" % e) + print("Exception when calling EnvironmentApi->retrieve_environment: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | ### Return type -[**Environments**](Environments.md) +[**Environment**](Environment.md) ### Authorization @@ -353,17 +360,20 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting environments successful | - | +**200** | Environment details retrieved successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**404** | Not Found | - | **500** | Internal Server Error | - | [[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_an_environment** -> Environment update_an_environment(id, payload) +# **update_environment** +> Environment update_environment(id, payload) + +Update environment -Update Environment +Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. ### Example @@ -408,12 +418,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.UpdateEnvironment() # UpdateEnvironment | try: - # Update Environment - api_response = api_instance.update_an_environment(id, payload) - print("The response of EnvironmentApi->update_an_environment:\n") + # Update environment + api_response = api_instance.update_environment(id, payload) + print("The response of EnvironmentApi->update_environment:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnvironmentApi->update_an_environment: %s\n" % e) + print("Exception when calling EnvironmentApi->update_environment: %s\n" % e) ``` @@ -443,7 +453,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Update an environment success | - | +**200** | Environment name successfully updated. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/EnvironmentFields.md b/docs/EnvironmentFields.md index 3bedb30..fc25e63 100644 --- a/docs/EnvironmentFields.md +++ b/docs/EnvironmentFields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of EnvironmentFields from a JSON string environment_fields_instance = EnvironmentFields.from_json(json) # print the JSON string representation of the object -print EnvironmentFields.to_json() +print(EnvironmentFields.to_json()) # convert the object into a dict environment_fields_dict = environment_fields_instance.to_dict() diff --git a/docs/EnvironmentFieldsforVolume.md b/docs/EnvironmentFieldsforVolume.md index ec68a19..1b2b207 100644 --- a/docs/EnvironmentFieldsforVolume.md +++ b/docs/EnvironmentFieldsforVolume.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of EnvironmentFieldsforVolume from a JSON string environment_fieldsfor_volume_instance = EnvironmentFieldsforVolume.from_json(json) # print the JSON string representation of the object -print EnvironmentFieldsforVolume.to_json() +print(EnvironmentFieldsforVolume.to_json()) # convert the object into a dict environment_fieldsfor_volume_dict = environment_fieldsfor_volume_instance.to_dict() diff --git a/docs/Environments.md b/docs/Environments.md index a506a91..412eea8 100644 --- a/docs/Environments.md +++ b/docs/Environments.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Environments from a JSON string environments_instance = Environments.from_json(json) # print the JSON string representation of the object -print Environments.to_json() +print(Environments.to_json()) # convert the object into a dict environments_dict = environments_instance.to_dict() diff --git a/docs/EnvrionmentResources.md b/docs/EnvrionmentResources.md deleted file mode 100644 index fbe9710..0000000 --- a/docs/EnvrionmentResources.md +++ /dev/null @@ -1,36 +0,0 @@ -# EnvrionmentResources - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **str** | | [optional] -**region** | **str** | | [optional] -**instances** | [**List[InstanceResources]**](InstanceResources.md) | | [optional] -**volumes** | [**List[VolumeResource]**](VolumeResource.md) | | [optional] -**containers** | [**List[ContainerResource]**](ContainerResource.md) | | [optional] -**clusters** | [**List[ClusterResource]**](ClusterResource.md) | | [optional] -**created_at** | **datetime** | | [optional] - -## Example - -```python -from hyperstack.models.envrionment_resources import EnvrionmentResources - -# TODO update the JSON string below -json = "{}" -# create an instance of EnvrionmentResources from a JSON string -envrionment_resources_instance = EnvrionmentResources.from_json(json) -# print the JSON string representation of the object -print EnvrionmentResources.to_json() - -# convert the object into a dict -envrionment_resources_dict = envrionment_resources_instance.to_dict() -# create an instance of EnvrionmentResources from a dict -envrionment_resources_form_dict = envrionment_resources.from_dict(envrionment_resources_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ErrorResponseModel.md b/docs/ErrorResponseModel.md index 9d19558..4511731 100644 --- a/docs/ErrorResponseModel.md +++ b/docs/ErrorResponseModel.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of ErrorResponseModel from a JSON string error_response_model_instance = ErrorResponseModel.from_json(json) # print the JSON string representation of the object -print ErrorResponseModel.to_json() +print(ErrorResponseModel.to_json()) # convert the object into a dict error_response_model_dict = error_response_model_instance.to_dict() diff --git a/docs/Excludebillingpostpayload.md b/docs/Excludebillingpostpayload.md new file mode 100644 index 0000000..dfa6ef9 --- /dev/null +++ b/docs/Excludebillingpostpayload.md @@ -0,0 +1,30 @@ +# Excludebillingpostpayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_id** | **int** | | +**exclude** | **bool** | | + +## Example + +```python +from hyperstack.models.excludebillingpostpayload import Excludebillingpostpayload + +# TODO update the JSON string below +json = "{}" +# create an instance of Excludebillingpostpayload from a JSON string +excludebillingpostpayload_instance = Excludebillingpostpayload.from_json(json) +# print the JSON string representation of the object +print(Excludebillingpostpayload.to_json()) + +# convert the object into a dict +excludebillingpostpayload_dict = excludebillingpostpayload_instance.to_dict() +# create an instance of Excludebillingpostpayload from a dict +excludebillingpostpayload_form_dict = excludebillingpostpayload.from_dict(excludebillingpostpayload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Excludebillingpostresponse.md b/docs/Excludebillingpostresponse.md new file mode 100644 index 0000000..d2605b4 --- /dev/null +++ b/docs/Excludebillingpostresponse.md @@ -0,0 +1,31 @@ +# Excludebillingpostresponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**data** | [**Excludebillingpostpayload**](Excludebillingpostpayload.md) | | [optional] + +## Example + +```python +from hyperstack.models.excludebillingpostresponse import Excludebillingpostresponse + +# TODO update the JSON string below +json = "{}" +# create an instance of Excludebillingpostresponse from a JSON string +excludebillingpostresponse_instance = Excludebillingpostresponse.from_json(json) +# print the JSON string representation of the object +print(Excludebillingpostresponse.to_json()) + +# convert the object into a dict +excludebillingpostresponse_dict = excludebillingpostresponse_instance.to_dict() +# create an instance of Excludebillingpostresponse from a dict +excludebillingpostresponse_form_dict = excludebillingpostresponse.from_dict(excludebillingpostresponse_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallAttachmentApi.md b/docs/FirewallAttachmentApi.md new file mode 100644 index 0000000..b27a2c5 --- /dev/null +++ b/docs/FirewallAttachmentApi.md @@ -0,0 +1,102 @@ +# hyperstack.FirewallAttachmentApi + +All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**attach_firewall_to_vms**](FirewallAttachmentApi.md#attach_firewall_to_vms) | **POST** /core/firewalls/{firewall_id}/update-attachments | Attach Firewalls to VMs + + +# **attach_firewall_to_vms** +> ResponseModel attach_firewall_to_vms(firewall_id, payload) + +Attach Firewalls to VMs + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.attach_firewall_with_vm import AttachFirewallWithVM +from hyperstack.models.response_model import ResponseModel +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.FirewallAttachmentApi(api_client) + firewall_id = 56 # int | + payload = hyperstack.AttachFirewallWithVM() # AttachFirewallWithVM | + + try: + # Attach Firewalls to VMs + api_response = api_instance.attach_firewall_to_vms(firewall_id, payload) + print("The response of FirewallAttachmentApi->attach_firewall_to_vms:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallAttachmentApi->attach_firewall_to_vms: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **firewall_id** | **int**| | + **payload** | [**AttachFirewallWithVM**](AttachFirewallWithVM.md)| | + +### Return type + +[**ResponseModel**](ResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**500** | Internal Server Error | - | + +[[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/FirewallAttachmentModel.md b/docs/FirewallAttachmentModel.md new file mode 100644 index 0000000..c6543a2 --- /dev/null +++ b/docs/FirewallAttachmentModel.md @@ -0,0 +1,32 @@ +# FirewallAttachmentModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**status** | **str** | | [optional] +**vm** | [**FirewallAttachmentVMModel**](FirewallAttachmentVMModel.md) | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.firewall_attachment_model import FirewallAttachmentModel + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallAttachmentModel from a JSON string +firewall_attachment_model_instance = FirewallAttachmentModel.from_json(json) +# print the JSON string representation of the object +print(FirewallAttachmentModel.to_json()) + +# convert the object into a dict +firewall_attachment_model_dict = firewall_attachment_model_instance.to_dict() +# create an instance of FirewallAttachmentModel from a dict +firewall_attachment_model_form_dict = firewall_attachment_model.from_dict(firewall_attachment_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallAttachmentVMModel.md b/docs/FirewallAttachmentVMModel.md new file mode 100644 index 0000000..c599f7f --- /dev/null +++ b/docs/FirewallAttachmentVMModel.md @@ -0,0 +1,34 @@ +# FirewallAttachmentVMModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**flavor** | **str** | | [optional] +**environment** | **str** | | [optional] +**status** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.firewall_attachment_vm_model import FirewallAttachmentVMModel + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallAttachmentVMModel from a JSON string +firewall_attachment_vm_model_instance = FirewallAttachmentVMModel.from_json(json) +# print the JSON string representation of the object +print(FirewallAttachmentVMModel.to_json()) + +# convert the object into a dict +firewall_attachment_vm_model_dict = firewall_attachment_vm_model_instance.to_dict() +# create an instance of FirewallAttachmentVMModel from a dict +firewall_attachment_vm_model_form_dict = firewall_attachment_vm_model.from_dict(firewall_attachment_vm_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallDetailFields.md b/docs/FirewallDetailFields.md new file mode 100644 index 0000000..7421aac --- /dev/null +++ b/docs/FirewallDetailFields.md @@ -0,0 +1,36 @@ +# FirewallDetailFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**environment** | [**FirewallEnvironmentFields**](FirewallEnvironmentFields.md) | | [optional] +**status** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**rules** | [**List[SecurityGroupRuleFields]**](SecurityGroupRuleFields.md) | | [optional] +**attachments** | [**List[FirewallAttachmentModel]**](FirewallAttachmentModel.md) | | [optional] + +## Example + +```python +from hyperstack.models.firewall_detail_fields import FirewallDetailFields + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallDetailFields from a JSON string +firewall_detail_fields_instance = FirewallDetailFields.from_json(json) +# print the JSON string representation of the object +print(FirewallDetailFields.to_json()) + +# convert the object into a dict +firewall_detail_fields_dict = firewall_detail_fields_instance.to_dict() +# create an instance of FirewallDetailFields from a dict +firewall_detail_fields_form_dict = firewall_detail_fields.from_dict(firewall_detail_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallDetailResponse.md b/docs/FirewallDetailResponse.md new file mode 100644 index 0000000..6f6b5a0 --- /dev/null +++ b/docs/FirewallDetailResponse.md @@ -0,0 +1,31 @@ +# FirewallDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**firewall** | [**FirewallDetailFields**](FirewallDetailFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.firewall_detail_response import FirewallDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallDetailResponse from a JSON string +firewall_detail_response_instance = FirewallDetailResponse.from_json(json) +# print the JSON string representation of the object +print(FirewallDetailResponse.to_json()) + +# convert the object into a dict +firewall_detail_response_dict = firewall_detail_response_instance.to_dict() +# create an instance of FirewallDetailResponse from a dict +firewall_detail_response_form_dict = firewall_detail_response.from_dict(firewall_detail_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallEnvironmentFields.md b/docs/FirewallEnvironmentFields.md new file mode 100644 index 0000000..462d3f5 --- /dev/null +++ b/docs/FirewallEnvironmentFields.md @@ -0,0 +1,31 @@ +# FirewallEnvironmentFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**region** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.firewall_environment_fields import FirewallEnvironmentFields + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallEnvironmentFields from a JSON string +firewall_environment_fields_instance = FirewallEnvironmentFields.from_json(json) +# print the JSON string representation of the object +print(FirewallEnvironmentFields.to_json()) + +# convert the object into a dict +firewall_environment_fields_dict = firewall_environment_fields_instance.to_dict() +# create an instance of FirewallEnvironmentFields from a dict +firewall_environment_fields_form_dict = firewall_environment_fields.from_dict(firewall_environment_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FirewallFields.md b/docs/FirewallFields.md new file mode 100644 index 0000000..e9654ef --- /dev/null +++ b/docs/FirewallFields.md @@ -0,0 +1,34 @@ +# FirewallFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**environment** | [**FirewallEnvironmentFields**](FirewallEnvironmentFields.md) | | [optional] +**status** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.firewall_fields import FirewallFields + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallFields from a JSON string +firewall_fields_instance = FirewallFields.from_json(json) +# print the JSON string representation of the object +print(FirewallFields.to_json()) + +# convert the object into a dict +firewall_fields_dict = firewall_fields_instance.to_dict() +# create an instance of FirewallFields from a dict +firewall_fields_form_dict = firewall_fields.from_dict(firewall_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetTokenResponse.md b/docs/FirewallResponse.md similarity index 50% rename from docs/GetTokenResponse.md rename to docs/FirewallResponse.md index 98b5223..d4065f4 100644 --- a/docs/GetTokenResponse.md +++ b/docs/FirewallResponse.md @@ -1,4 +1,4 @@ -# GetTokenResponse +# FirewallResponse ## Properties @@ -7,24 +7,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | | [optional] **message** | **str** | | [optional] -**token** | [**TokenFields**](TokenFields.md) | | [optional] +**firewall** | [**FirewallFields**](FirewallFields.md) | | [optional] ## Example ```python -from hyperstack.models.get_token_response import GetTokenResponse +from hyperstack.models.firewall_response import FirewallResponse # TODO update the JSON string below json = "{}" -# create an instance of GetTokenResponse from a JSON string -get_token_response_instance = GetTokenResponse.from_json(json) +# create an instance of FirewallResponse from a JSON string +firewall_response_instance = FirewallResponse.from_json(json) # print the JSON string representation of the object -print GetTokenResponse.to_json() +print(FirewallResponse.to_json()) # convert the object into a dict -get_token_response_dict = get_token_response_instance.to_dict() -# create an instance of GetTokenResponse from a dict -get_token_response_form_dict = get_token_response.from_dict(get_token_response_dict) +firewall_response_dict = firewall_response_instance.to_dict() +# create an instance of FirewallResponse from a dict +firewall_response_form_dict = firewall_response.from_dict(firewall_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/APIKeygeneration.md b/docs/FirewallRule.md similarity index 51% rename from docs/APIKeygeneration.md rename to docs/FirewallRule.md index e3124be..d7458aa 100644 --- a/docs/APIKeygeneration.md +++ b/docs/FirewallRule.md @@ -1,4 +1,4 @@ -# APIKeygeneration +# FirewallRule ## Properties @@ -7,24 +7,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | | [optional] **message** | **str** | | [optional] -**api_key** | **str** | | [optional] +**firewall_rule** | [**SecurityGroupRuleFields**](SecurityGroupRuleFields.md) | | [optional] ## Example ```python -from hyperstack.models.api_keygeneration import APIKeygeneration +from hyperstack.models.firewall_rule import FirewallRule # TODO update the JSON string below json = "{}" -# create an instance of APIKeygeneration from a JSON string -api_keygeneration_instance = APIKeygeneration.from_json(json) +# create an instance of FirewallRule from a JSON string +firewall_rule_instance = FirewallRule.from_json(json) # print the JSON string representation of the object -print APIKeygeneration.to_json() +print(FirewallRule.to_json()) # convert the object into a dict -api_keygeneration_dict = api_keygeneration_instance.to_dict() -# create an instance of APIKeygeneration from a dict -api_keygeneration_form_dict = api_keygeneration.from_dict(api_keygeneration_dict) +firewall_rule_dict = firewall_rule_instance.to_dict() +# create an instance of FirewallRule from a dict +firewall_rule_form_dict = firewall_rule.from_dict(firewall_rule_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FirewallsApi.md b/docs/FirewallsApi.md new file mode 100644 index 0000000..434fcd7 --- /dev/null +++ b/docs/FirewallsApi.md @@ -0,0 +1,551 @@ +# hyperstack.FirewallsApi + +All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_rules_to_firewall**](FirewallsApi.md#add_rules_to_firewall) | **POST** /core/firewalls/{firewall_id}/firewall-rules | Add Rules to Firewall +[**create_firewall**](FirewallsApi.md#create_firewall) | **POST** /core/firewalls | Create Firewall +[**delete_firewall**](FirewallsApi.md#delete_firewall) | **DELETE** /core/firewalls/{id} | Delete Firewall +[**delete_firewall_rules_from_firewall**](FirewallsApi.md#delete_firewall_rules_from_firewall) | **DELETE** /core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id} | Delete Firewall Rules from Firewall +[**details_of_firewall_by_id**](FirewallsApi.md#details_of_firewall_by_id) | **GET** /core/firewalls/{id} | Details of Firewall by ID +[**retrieve_firewalls**](FirewallsApi.md#retrieve_firewalls) | **GET** /core/firewalls | Retrieve Firewalls + + +# **add_rules_to_firewall** +> FirewallRule add_rules_to_firewall(firewall_id, payload) + +Add Rules to Firewall + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.create_firewall_rule_payload import CreateFirewallRulePayload +from hyperstack.models.firewall_rule import FirewallRule +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.FirewallsApi(api_client) + firewall_id = 56 # int | + payload = hyperstack.CreateFirewallRulePayload() # CreateFirewallRulePayload | + + try: + # Add Rules to Firewall + api_response = api_instance.add_rules_to_firewall(firewall_id, payload) + print("The response of FirewallsApi->add_rules_to_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->add_rules_to_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **firewall_id** | **int**| | + **payload** | [**CreateFirewallRulePayload**](CreateFirewallRulePayload.md)| | + +### Return type + +[**FirewallRule**](FirewallRule.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**500** | Internal Server Error | - | + +[[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_firewall** +> FirewallResponse create_firewall(payload) + +Create Firewall + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.create_firewall_payload import CreateFirewallPayload +from hyperstack.models.firewall_response import FirewallResponse +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.FirewallsApi(api_client) + payload = hyperstack.CreateFirewallPayload() # CreateFirewallPayload | + + try: + # Create Firewall + api_response = api_instance.create_firewall(payload) + print("The response of FirewallsApi->create_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->create_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | [**CreateFirewallPayload**](CreateFirewallPayload.md)| | + +### Return type + +[**FirewallResponse**](FirewallResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**500** | Internal Server Error | - | + +[[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_firewall** +> ResponseModel delete_firewall(id) + +Delete Firewall + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.response_model import ResponseModel +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.FirewallsApi(api_client) + id = 56 # int | + + try: + # Delete Firewall + api_response = api_instance.delete_firewall(id) + print("The response of FirewallsApi->delete_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->delete_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**ResponseModel**](ResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**500** | Internal Server Error | - | + +[[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_firewall_rules_from_firewall** +> ResponseModel delete_firewall_rules_from_firewall(firewall_id, firewall_rule_id) + +Delete Firewall Rules from Firewall + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.response_model import ResponseModel +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.FirewallsApi(api_client) + firewall_id = 56 # int | + firewall_rule_id = 56 # int | + + try: + # Delete Firewall Rules from Firewall + api_response = api_instance.delete_firewall_rules_from_firewall(firewall_id, firewall_rule_id) + print("The response of FirewallsApi->delete_firewall_rules_from_firewall:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->delete_firewall_rules_from_firewall: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **firewall_id** | **int**| | + **firewall_rule_id** | **int**| | + +### Return type + +[**ResponseModel**](ResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Exists | - | +**409** | Conflict | - | +**500** | Internal Server Error | - | + +[[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) + +# **details_of_firewall_by_id** +> FirewallDetailResponse details_of_firewall_by_id(id) + +Details of Firewall by ID + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.firewall_detail_response import FirewallDetailResponse +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.FirewallsApi(api_client) + id = 56 # int | + + try: + # Details of Firewall by ID + api_response = api_instance.details_of_firewall_by_id(id) + print("The response of FirewallsApi->details_of_firewall_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->details_of_firewall_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**FirewallDetailResponse**](FirewallDetailResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **retrieve_firewalls** +> FirewallsListResponse retrieve_firewalls() + +Retrieve Firewalls + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.firewalls_list_response import FirewallsListResponse +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.FirewallsApi(api_client) + + try: + # Retrieve Firewalls + api_response = api_instance.retrieve_firewalls() + print("The response of FirewallsApi->retrieve_firewalls:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FirewallsApi->retrieve_firewalls: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FirewallsListResponse**](FirewallsListResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**500** | Internal Server Error | - | + +[[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/FirewallsListResponse.md b/docs/FirewallsListResponse.md new file mode 100644 index 0000000..0e9ee8d --- /dev/null +++ b/docs/FirewallsListResponse.md @@ -0,0 +1,31 @@ +# FirewallsListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**firewalls** | [**List[FirewallDetailFields]**](FirewallDetailFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.firewalls_list_response import FirewallsListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FirewallsListResponse from a JSON string +firewalls_list_response_instance = FirewallsListResponse.from_json(json) +# print the JSON string representation of the object +print(FirewallsListResponse.to_json()) + +# convert the object into a dict +firewalls_list_response_dict = firewalls_list_response_instance.to_dict() +# create an instance of FirewallsListResponse from a dict +firewalls_list_response_form_dict = firewalls_list_response.from_dict(firewalls_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorAdminResponse.md b/docs/FlavorAdminResponse.md new file mode 100644 index 0000000..20f1c0c --- /dev/null +++ b/docs/FlavorAdminResponse.md @@ -0,0 +1,31 @@ +# FlavorAdminResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**flavor** | [**FlavorAdminResponseFlavors**](FlavorAdminResponseFlavors.md) | | [optional] + +## Example + +```python +from hyperstack.models.flavor_admin_response import FlavorAdminResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorAdminResponse from a JSON string +flavor_admin_response_instance = FlavorAdminResponse.from_json(json) +# print the JSON string representation of the object +print(FlavorAdminResponse.to_json()) + +# convert the object into a dict +flavor_admin_response_dict = flavor_admin_response_instance.to_dict() +# create an instance of FlavorAdminResponse from a dict +flavor_admin_response_form_dict = flavor_admin_response.from_dict(flavor_admin_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorAdminResponseFlavors.md b/docs/FlavorAdminResponseFlavors.md new file mode 100644 index 0000000..7da4123 --- /dev/null +++ b/docs/FlavorAdminResponseFlavors.md @@ -0,0 +1,48 @@ +# FlavorAdminResponseFlavors + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**description** | **str** | | [optional] +**openstack_id** | **str** | | [optional] +**region_id** | **int** | | [optional] +**region** | **str** | | [optional] +**cpu** | **int** | | [optional] +**ram** | **float** | | [optional] +**disk** | **int** | | [optional] +**ephemeral** | **int** | | [optional] +**gpu** | **str** | | [optional] +**gpu_count** | **int** | | [optional] +**order** | **int** | | [optional] +**is_public** | **bool** | | [optional] +**is_custom** | **bool** | | [optional] +**status** | **str** | | [optional] +**organizations** | **List[int]** | | +**flavors** | **List[str]** | | [optional] +**projects** | **List[str]** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.flavor_admin_response_flavors import FlavorAdminResponseFlavors + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorAdminResponseFlavors from a JSON string +flavor_admin_response_flavors_instance = FlavorAdminResponseFlavors.from_json(json) +# print the JSON string representation of the object +print(FlavorAdminResponseFlavors.to_json()) + +# convert the object into a dict +flavor_admin_response_flavors_dict = flavor_admin_response_flavors_instance.to_dict() +# create an instance of FlavorAdminResponseFlavors from a dict +flavor_admin_response_flavors_form_dict = flavor_admin_response_flavors.from_dict(flavor_admin_response_flavors_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorApi.md b/docs/FlavorApi.md index 2290e0f..a6ba98c 100644 --- a/docs/FlavorApi.md +++ b/docs/FlavorApi.md @@ -4,13 +4,15 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**retrieve_flavors**](FlavorApi.md#retrieve_flavors) | **GET** /core/flavors | Retrieve Flavors +[**list_flavors**](FlavorApi.md#list_flavors) | **GET** /core/flavors | List flavors -# **retrieve_flavors** -> FlavorListResponse retrieve_flavors(region=region) +# **list_flavors** +> FlavorListResponse list_flavors(region=region) -Retrieve Flavors +List flavors + +Returns a list of available virtual machine specification configurations, referred to as **flavors**. Include a `region_name` in the query string of the request to return only the flavors available in the specified region; the default value will retrieve flavors available in all regions. For more details on flavors, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors). ### Example @@ -53,12 +55,12 @@ with hyperstack.ApiClient(configuration) as api_client: region = None # object | Region Name (optional) try: - # Retrieve Flavors - api_response = api_instance.retrieve_flavors(region=region) - print("The response of FlavorApi->retrieve_flavors:\n") + # List flavors + api_response = api_instance.list_flavors(region=region) + print("The response of FlavorApi->list_flavors:\n") pprint(api_response) except Exception as e: - print("Exception when calling FlavorApi->retrieve_flavors: %s\n" % e) + print("Exception when calling FlavorApi->list_flavors: %s\n" % e) ``` @@ -87,7 +89,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting flavors successful | - | +**200** | Successful retrieval of flavors list. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/FlavorDetailResponse.md b/docs/FlavorDetailResponse.md new file mode 100644 index 0000000..3e97039 --- /dev/null +++ b/docs/FlavorDetailResponse.md @@ -0,0 +1,31 @@ +# FlavorDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**flavor** | [**AdminFlavorDetailFields**](AdminFlavorDetailFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.flavor_detail_response import FlavorDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorDetailResponse from a JSON string +flavor_detail_response_instance = FlavorDetailResponse.from_json(json) +# print the JSON string representation of the object +print(FlavorDetailResponse.to_json()) + +# convert the object into a dict +flavor_detail_response_dict = flavor_detail_response_instance.to_dict() +# create an instance of FlavorDetailResponse from a dict +flavor_detail_response_form_dict = flavor_detail_response.from_dict(flavor_detail_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorFields.md b/docs/FlavorFields.md index 4bcd2aa..6e5c75c 100644 --- a/docs/FlavorFields.md +++ b/docs/FlavorFields.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **cpu** | **int** | | [optional] **ram** | **float** | | [optional] **disk** | **int** | | [optional] +**ephemeral** | **int** | | [optional] **gpu** | **str** | | [optional] **gpu_count** | **int** | | [optional] **stock_available** | **bool** | | [optional] @@ -26,7 +27,7 @@ json = "{}" # create an instance of FlavorFields from a JSON string flavor_fields_instance = FlavorFields.from_json(json) # print the JSON string representation of the object -print FlavorFields.to_json() +print(FlavorFields.to_json()) # convert the object into a dict flavor_fields_dict = flavor_fields_instance.to_dict() diff --git a/docs/FlavorItemGetResponse.md b/docs/FlavorItemGetResponse.md index 013cf6b..a0ea29a 100644 --- a/docs/FlavorItemGetResponse.md +++ b/docs/FlavorItemGetResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of FlavorItemGetResponse from a JSON string flavor_item_get_response_instance = FlavorItemGetResponse.from_json(json) # print the JSON string representation of the object -print FlavorItemGetResponse.to_json() +print(FlavorItemGetResponse.to_json()) # convert the object into a dict flavor_item_get_response_dict = flavor_item_get_response_instance.to_dict() diff --git a/docs/FlavorListResponse.md b/docs/FlavorListResponse.md index 96df349..4037c96 100644 --- a/docs/FlavorListResponse.md +++ b/docs/FlavorListResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of FlavorListResponse from a JSON string flavor_list_response_instance = FlavorListResponse.from_json(json) # print the JSON string representation of the object -print FlavorListResponse.to_json() +print(FlavorListResponse.to_json()) # convert the object into a dict flavor_list_response_dict = flavor_list_response_instance.to_dict() diff --git a/docs/FlavorObjectFields.md b/docs/FlavorObjectFields.md index 7f4e684..2e8c28f 100644 --- a/docs/FlavorObjectFields.md +++ b/docs/FlavorObjectFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of FlavorObjectFields from a JSON string flavor_object_fields_instance = FlavorObjectFields.from_json(json) # print the JSON string representation of the object -print FlavorObjectFields.to_json() +print(FlavorObjectFields.to_json()) # convert the object into a dict flavor_object_fields_dict = flavor_object_fields_instance.to_dict() diff --git a/docs/FlavorPayload.md b/docs/FlavorPayload.md index 0a58f8a..2c5e992 100644 --- a/docs/FlavorPayload.md +++ b/docs/FlavorPayload.md @@ -24,7 +24,7 @@ json = "{}" # create an instance of FlavorPayload from a JSON string flavor_payload_instance = FlavorPayload.from_json(json) # print the JSON string representation of the object -print FlavorPayload.to_json() +print(FlavorPayload.to_json()) # convert the object into a dict flavor_payload_dict = flavor_payload_instance.to_dict() diff --git a/docs/FlavorResource.md b/docs/FlavorResource.md deleted file mode 100644 index bd03631..0000000 --- a/docs/FlavorResource.md +++ /dev/null @@ -1,35 +0,0 @@ -# FlavorResource - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**name** | **str** | | [optional] -**cpu** | **int** | | [optional] -**ram** | **float** | | [optional] -**disk** | **int** | | [optional] -**gpu** | **str** | | [optional] -**gpu_count** | **int** | | [optional] - -## Example - -```python -from hyperstack.models.flavor_resource import FlavorResource - -# TODO update the JSON string below -json = "{}" -# create an instance of FlavorResource from a JSON string -flavor_resource_instance = FlavorResource.from_json(json) -# print the JSON string representation of the object -print FlavorResource.to_json() - -# convert the object into a dict -flavor_resource_dict = flavor_resource_instance.to_dict() -# create an instance of FlavorResource from a dict -flavor_resource_form_dict = flavor_resource.from_dict(flavor_resource_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FlavorResponse.md b/docs/FlavorResponse.md index ffdff83..8d9d363 100644 --- a/docs/FlavorResponse.md +++ b/docs/FlavorResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of FlavorResponse from a JSON string flavor_response_instance = FlavorResponse.from_json(json) # print the JSON string representation of the object -print FlavorResponse.to_json() +print(FlavorResponse.to_json()) # convert the object into a dict flavor_response_dict = flavor_response_instance.to_dict() diff --git a/docs/FlavorVMFields.md b/docs/FlavorVMFields.md new file mode 100644 index 0000000..6ca7cc4 --- /dev/null +++ b/docs/FlavorVMFields.md @@ -0,0 +1,35 @@ +# FlavorVMFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**openstack_id** | **str** | | [optional] +**name** | **str** | | [optional] +**host** | **str** | | [optional] +**org_id** | **int** | | [optional] +**status** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.flavor_vm_fields import FlavorVMFields + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorVMFields from a JSON string +flavor_vm_fields_instance = FlavorVMFields.from_json(json) +# print the JSON string representation of the object +print(FlavorVMFields.to_json()) + +# convert the object into a dict +flavor_vm_fields_dict = flavor_vm_fields_instance.to_dict() +# create an instance of FlavorVMFields from a dict +flavor_vm_fields_form_dict = flavor_vm_fields.from_dict(flavor_vm_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FlavorVMsResponse.md b/docs/FlavorVMsResponse.md new file mode 100644 index 0000000..9b28313 --- /dev/null +++ b/docs/FlavorVMsResponse.md @@ -0,0 +1,31 @@ +# FlavorVMsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**flavor_vms** | [**List[FlavorVMFields]**](FlavorVMFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.flavor_vms_response import FlavorVMsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of FlavorVMsResponse from a JSON string +flavor_vms_response_instance = FlavorVMsResponse.from_json(json) +# print the JSON string representation of the object +print(FlavorVMsResponse.to_json()) + +# convert the object into a dict +flavor_vms_response_dict = flavor_vms_response_instance.to_dict() +# create an instance of FlavorVMsResponse from a dict +flavor_vms_response_form_dict = flavor_vms_response.from_dict(flavor_vms_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FloatingIpApi.md b/docs/FloatingIpApi.md index b3ca453..5b6eab5 100644 --- a/docs/FloatingIpApi.md +++ b/docs/FloatingIpApi.md @@ -4,14 +4,16 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**attach_floating_ip_to_instance**](FloatingIpApi.md#attach_floating_ip_to_instance) | **POST** /core/virtual-machines/{id}/attach-floatingip | Attach Floating IP to Instance -[**detach_floating_ip_to_instance**](FloatingIpApi.md#detach_floating_ip_to_instance) | **POST** /core/virtual-machines/{id}/detach-floatingip | Detach Floating IP to Instance +[**attach_public_ip_to_virtual_machine**](FloatingIpApi.md#attach_public_ip_to_virtual_machine) | **POST** /core/virtual-machines/{id}/attach-floatingip | Attach public IP to virtual machine +[**detach_public_ip_from_virtual_machine**](FloatingIpApi.md#detach_public_ip_from_virtual_machine) | **POST** /core/virtual-machines/{id}/detach-floatingip | Detach public IP from virtual machine -# **attach_floating_ip_to_instance** -> ResponseModel attach_floating_ip_to_instance(id) +# **attach_public_ip_to_virtual_machine** +> ResponseModel attach_public_ip_to_virtual_machine(id) -Attach Floating IP to Instance +Attach public IP to virtual machine + +Initiates the creation of a public IP address and attaches it to an existing virtual machine, making it accessible through the internet. Include the virtual machine ID in the path to attach a public IP to the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). ### Example @@ -54,12 +56,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Attach Floating IP to Instance - api_response = api_instance.attach_floating_ip_to_instance(id) - print("The response of FloatingIpApi->attach_floating_ip_to_instance:\n") + # Attach public IP to virtual machine + api_response = api_instance.attach_public_ip_to_virtual_machine(id) + print("The response of FloatingIpApi->attach_public_ip_to_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling FloatingIpApi->attach_floating_ip_to_instance: %s\n" % e) + print("Exception when calling FloatingIpApi->attach_public_ip_to_virtual_machine: %s\n" % e) ``` @@ -88,7 +90,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Public IP successfully attached to VM. | - | **400** | Insufficient balance to create the resource | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -96,10 +98,12 @@ Name | Type | Description | Notes [[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_floating_ip_to_instance** -> ResponseModel detach_floating_ip_to_instance(id) +# **detach_public_ip_from_virtual_machine** +> ResponseModel detach_public_ip_from_virtual_machine(id) + +Detach public IP from virtual machine -Detach Floating IP to Instance +Removes a public IP address from an existing virtual machine, disabling internet accessibility to the VM. Include the virtual machine ID in the path to detach the public IP from the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). ### Example @@ -142,12 +146,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Detach Floating IP to Instance - api_response = api_instance.detach_floating_ip_to_instance(id) - print("The response of FloatingIpApi->detach_floating_ip_to_instance:\n") + # Detach public IP from virtual machine + api_response = api_instance.detach_public_ip_from_virtual_machine(id) + print("The response of FloatingIpApi->detach_public_ip_from_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling FloatingIpApi->detach_floating_ip_to_instance: %s\n" % e) + print("Exception when calling FloatingIpApi->detach_public_ip_from_virtual_machine: %s\n" % e) ``` diff --git a/docs/FutureNodeModel.md b/docs/FutureNodeModel.md index 1d6f91a..a7b7980 100644 --- a/docs/FutureNodeModel.md +++ b/docs/FutureNodeModel.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] [readonly] **openstack_name** | **str** | | [optional] **nexgen_name** | **str** | | [optional] -**expected_provision_date** | **datetime** | | +**expected_provision_date** | **datetime** | Date and time in the format YYYY-MM-DD HH:mm:ss | **stocks** | [**List[FutureNodeStockModel]**](FutureNodeStockModel.md) | | [optional] ## Example @@ -21,7 +21,7 @@ json = "{}" # create an instance of FutureNodeModel from a JSON string future_node_model_instance = FutureNodeModel.from_json(json) # print the JSON string representation of the object -print FutureNodeModel.to_json() +print(FutureNodeModel.to_json()) # convert the object into a dict future_node_model_dict = future_node_model_instance.to_dict() diff --git a/docs/FutureNodeResponseModel.md b/docs/FutureNodeResponseModel.md index d9ce542..4854298 100644 --- a/docs/FutureNodeResponseModel.md +++ b/docs/FutureNodeResponseModel.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of FutureNodeResponseModel from a JSON string future_node_response_model_instance = FutureNodeResponseModel.from_json(json) # print the JSON string representation of the object -print FutureNodeResponseModel.to_json() +print(FutureNodeResponseModel.to_json()) # convert the object into a dict future_node_response_model_dict = future_node_response_model_instance.to_dict() diff --git a/docs/FutureNodeStockModel.md b/docs/FutureNodeStockModel.md index c3d1b0e..28bcfd7 100644 --- a/docs/FutureNodeStockModel.md +++ b/docs/FutureNodeStockModel.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of FutureNodeStockModel from a JSON string future_node_stock_model_instance = FutureNodeStockModel.from_json(json) # print the JSON string representation of the object -print FutureNodeStockModel.to_json() +print(FutureNodeStockModel.to_json()) # convert the object into a dict future_node_stock_model_dict = future_node_stock_model_instance.to_dict() diff --git a/docs/FutureNodeUpdateModel.md b/docs/FutureNodeUpdateModel.md index 32a9fbf..9a4c44c 100644 --- a/docs/FutureNodeUpdateModel.md +++ b/docs/FutureNodeUpdateModel.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of FutureNodeUpdateModel from a JSON string future_node_update_model_instance = FutureNodeUpdateModel.from_json(json) # print the JSON string representation of the object -print FutureNodeUpdateModel.to_json() +print(FutureNodeUpdateModel.to_json()) # convert the object into a dict future_node_update_model_dict = future_node_update_model_instance.to_dict() diff --git a/docs/FutureNodesStockModel.md b/docs/FutureNodesStockModel.md index c20eb46..eed059e 100644 --- a/docs/FutureNodesStockModel.md +++ b/docs/FutureNodesStockModel.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of FutureNodesStockModel from a JSON string future_nodes_stock_model_instance = FutureNodesStockModel.from_json(json) # print the JSON string representation of the object -print FutureNodesStockModel.to_json() +print(FutureNodesStockModel.to_json()) # convert the object into a dict future_nodes_stock_model_dict = future_nodes_stock_model_instance.to_dict() diff --git a/docs/GPU.md b/docs/GPU.md index 674a71c..4b6d253 100644 --- a/docs/GPU.md +++ b/docs/GPU.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of GPU from a JSON string gpu_instance = GPU.from_json(json) # print the JSON string representation of the object -print GPU.to_json() +print(GPU.to_json()) # convert the object into a dict gpu_dict = gpu_instance.to_dict() diff --git a/docs/GPUFields.md b/docs/GPUFields.md index 2fd94d6..6003a04 100644 --- a/docs/GPUFields.md +++ b/docs/GPUFields.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of GPUFields from a JSON string gpu_fields_instance = GPUFields.from_json(json) # print the JSON string representation of the object -print GPUFields.to_json() +print(GPUFields.to_json()) # convert the object into a dict gpu_fields_dict = gpu_fields_instance.to_dict() diff --git a/docs/GPUList.md b/docs/GPUList.md index 87436d0..fc9284e 100644 --- a/docs/GPUList.md +++ b/docs/GPUList.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of GPUList from a JSON string gpu_list_instance = GPUList.from_json(json) # print the JSON string representation of the object -print GPUList.to_json() +print(GPUList.to_json()) # convert the object into a dict gpu_list_dict = gpu_list_instance.to_dict() diff --git a/docs/GPURegionFields.md b/docs/GPURegionFields.md index 2993624..0bca410 100644 --- a/docs/GPURegionFields.md +++ b/docs/GPURegionFields.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of GPURegionFields from a JSON string gpu_region_fields_instance = GPURegionFields.from_json(json) # print the JSON string representation of the object -print GPURegionFields.to_json() +print(GPURegionFields.to_json()) # convert the object into a dict gpu_region_fields_dict = gpu_region_fields_instance.to_dict() diff --git a/docs/GenerateApiKeyResponseModel.md b/docs/GenerateApiKeyResponseModel.md new file mode 100644 index 0000000..01d6af3 --- /dev/null +++ b/docs/GenerateApiKeyResponseModel.md @@ -0,0 +1,31 @@ +# GenerateApiKeyResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**api_key** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.generate_api_key_response_model import GenerateApiKeyResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GenerateApiKeyResponseModel from a JSON string +generate_api_key_response_model_instance = GenerateApiKeyResponseModel.from_json(json) +# print the JSON string representation of the object +print(GenerateApiKeyResponseModel.to_json()) + +# convert the object into a dict +generate_api_key_response_model_dict = generate_api_key_response_model_instance.to_dict() +# create an instance of GenerateApiKeyResponseModel from a dict +generate_api_key_response_model_form_dict = generate_api_key_response_model.from_dict(generate_api_key_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetAllDiscountForAllOrganizationResponse.md b/docs/GetAllDiscountForAllOrganizationResponse.md index 6cb5ef6..338e385 100644 --- a/docs/GetAllDiscountForAllOrganizationResponse.md +++ b/docs/GetAllDiscountForAllOrganizationResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | | [optional] **message** | **str** | | [optional] -**discount_plans** | [**List[InsertDiscountPlanFields]**](InsertDiscountPlanFields.md) | | [optional] +**discount_plans** | [**List[GetAllDiscountsFields]**](GetAllDiscountsFields.md) | | [optional] ## Example @@ -19,7 +19,7 @@ json = "{}" # create an instance of GetAllDiscountForAllOrganizationResponse from a JSON string get_all_discount_for_all_organization_response_instance = GetAllDiscountForAllOrganizationResponse.from_json(json) # print the JSON string representation of the object -print GetAllDiscountForAllOrganizationResponse.to_json() +print(GetAllDiscountForAllOrganizationResponse.to_json()) # convert the object into a dict get_all_discount_for_all_organization_response_dict = get_all_discount_for_all_organization_response_instance.to_dict() diff --git a/docs/GetAllDiscountsFields.md b/docs/GetAllDiscountsFields.md new file mode 100644 index 0000000..325a21d --- /dev/null +++ b/docs/GetAllDiscountsFields.md @@ -0,0 +1,34 @@ +# GetAllDiscountsFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | [optional] +**org_name** | **str** | | [optional] +**start_date** | **datetime** | | [optional] +**end_date** | **datetime** | | [optional] +**discount_status** | **str** | | [optional] +**discount_resources** | [**List[DiscountResourceFields]**](DiscountResourceFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_all_discounts_fields import GetAllDiscountsFields + +# TODO update the JSON string below +json = "{}" +# create an instance of GetAllDiscountsFields from a JSON string +get_all_discounts_fields_instance = GetAllDiscountsFields.from_json(json) +# print the JSON string representation of the object +print(GetAllDiscountsFields.to_json()) + +# convert the object into a dict +get_all_discounts_fields_dict = get_all_discounts_fields_instance.to_dict() +# create an instance of GetAllDiscountsFields from a dict +get_all_discounts_fields_form_dict = get_all_discounts_fields.from_dict(get_all_discounts_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetApiKeyResponseModel.md b/docs/GetApiKeyResponseModel.md new file mode 100644 index 0000000..2d7c951 --- /dev/null +++ b/docs/GetApiKeyResponseModel.md @@ -0,0 +1,31 @@ +# GetApiKeyResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**api_key** | [**ApiKeyFields**](ApiKeyFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_api_key_response_model import GetApiKeyResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetApiKeyResponseModel from a JSON string +get_api_key_response_model_instance = GetApiKeyResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetApiKeyResponseModel.to_json()) + +# convert the object into a dict +get_api_key_response_model_dict = get_api_key_response_model_instance.to_dict() +# create an instance of GetApiKeyResponseModel from a dict +get_api_key_response_model_form_dict = get_api_key_response_model.from_dict(get_api_key_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetContractDetailResponseModel.md b/docs/GetContractDetailResponseModel.md new file mode 100644 index 0000000..03dbceb --- /dev/null +++ b/docs/GetContractDetailResponseModel.md @@ -0,0 +1,32 @@ +# GetContractDetailResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**contract** | [**AdminGetContractDetailFields**](AdminGetContractDetailFields.md) | | [optional] +**discount_plans** | [**List[DiscountPlanFields]**](DiscountPlanFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_contract_detail_response_model import GetContractDetailResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetContractDetailResponseModel from a JSON string +get_contract_detail_response_model_instance = GetContractDetailResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetContractDetailResponseModel.to_json()) + +# convert the object into a dict +get_contract_detail_response_model_dict = get_contract_detail_response_model_instance.to_dict() +# create an instance of GetContractDetailResponseModel from a dict +get_contract_detail_response_model_form_dict = get_contract_detail_response_model.from_dict(get_contract_detail_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetContractEventsResponseModel.md b/docs/GetContractEventsResponseModel.md new file mode 100644 index 0000000..fd2c5ca --- /dev/null +++ b/docs/GetContractEventsResponseModel.md @@ -0,0 +1,32 @@ +# GetContractEventsResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**contract_events** | [**List[AdminContractEventFields]**](AdminContractEventFields.md) | | [optional] +**count** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.get_contract_events_response_model import GetContractEventsResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetContractEventsResponseModel from a JSON string +get_contract_events_response_model_instance = GetContractEventsResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetContractEventsResponseModel.to_json()) + +# convert the object into a dict +get_contract_events_response_model_dict = get_contract_events_response_model_instance.to_dict() +# create an instance of GetContractEventsResponseModel from a dict +get_contract_events_response_model_form_dict = get_contract_events_response_model.from_dict(get_contract_events_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetContractsListResponseModel.md b/docs/GetContractsListResponseModel.md new file mode 100644 index 0000000..b6695b5 --- /dev/null +++ b/docs/GetContractsListResponseModel.md @@ -0,0 +1,32 @@ +# GetContractsListResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**contracts** | [**List[AdminContractFields]**](AdminContractFields.md) | | [optional] +**count** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.get_contracts_list_response_model import GetContractsListResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetContractsListResponseModel from a JSON string +get_contracts_list_response_model_instance = GetContractsListResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetContractsListResponseModel.to_json()) + +# convert the object into a dict +get_contracts_list_response_model_dict = get_contracts_list_response_model_instance.to_dict() +# create an instance of GetContractsListResponseModel from a dict +get_contracts_list_response_model_form_dict = get_contracts_list_response_model.from_dict(get_contracts_list_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetCustomerContractsListResponseModel.md b/docs/GetCustomerContractsListResponseModel.md new file mode 100644 index 0000000..d5ae773 --- /dev/null +++ b/docs/GetCustomerContractsListResponseModel.md @@ -0,0 +1,32 @@ +# GetCustomerContractsListResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**contracts** | [**List[CustomerContractFields]**](CustomerContractFields.md) | | [optional] +**count** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.get_customer_contracts_list_response_model import GetCustomerContractsListResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetCustomerContractsListResponseModel from a JSON string +get_customer_contracts_list_response_model_instance = GetCustomerContractsListResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetCustomerContractsListResponseModel.to_json()) + +# convert the object into a dict +get_customer_contracts_list_response_model_dict = get_customer_contracts_list_response_model_instance.to_dict() +# create an instance of GetCustomerContractsListResponseModel from a dict +get_customer_contracts_list_response_model_form_dict = get_customer_contracts_list_response_model.from_dict(get_customer_contracts_list_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetDiscountDetailResponse.md b/docs/GetDiscountDetailResponse.md new file mode 100644 index 0000000..246155f --- /dev/null +++ b/docs/GetDiscountDetailResponse.md @@ -0,0 +1,31 @@ +# GetDiscountDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**discounts_entity** | [**DiscountEntityModel**](DiscountEntityModel.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_discount_detail_response import GetDiscountDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDiscountDetailResponse from a JSON string +get_discount_detail_response_instance = GetDiscountDetailResponse.from_json(json) +# print the JSON string representation of the object +print(GetDiscountDetailResponse.to_json()) + +# convert the object into a dict +get_discount_detail_response_dict = get_discount_detail_response_instance.to_dict() +# create an instance of GetDiscountDetailResponse from a dict +get_discount_detail_response_form_dict = get_discount_detail_response.from_dict(get_discount_detail_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetDiscountResponse.md b/docs/GetDiscountResponse.md new file mode 100644 index 0000000..d847eef --- /dev/null +++ b/docs/GetDiscountResponse.md @@ -0,0 +1,31 @@ +# GetDiscountResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**discount_entites** | [**List[DiscountFields]**](DiscountFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_discount_response import GetDiscountResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetDiscountResponse from a JSON string +get_discount_response_instance = GetDiscountResponse.from_json(json) +# print the JSON string representation of the object +print(GetDiscountResponse.to_json()) + +# convert the object into a dict +get_discount_response_dict = get_discount_response_instance.to_dict() +# create an instance of GetDiscountResponse from a dict +get_discount_response_form_dict = get_discount_response.from_dict(get_discount_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetEntityDiscountDetailResponse.md b/docs/GetEntityDiscountDetailResponse.md new file mode 100644 index 0000000..7fa6945 --- /dev/null +++ b/docs/GetEntityDiscountDetailResponse.md @@ -0,0 +1,32 @@ +# GetEntityDiscountDetailResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**organization** | [**List[DiscountPlanFields]**](DiscountPlanFields.md) | | [optional] +**virtual_machine** | [**List[DiscountPlanFields]**](DiscountPlanFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_entity_discount_detail_response import GetEntityDiscountDetailResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetEntityDiscountDetailResponse from a JSON string +get_entity_discount_detail_response_instance = GetEntityDiscountDetailResponse.from_json(json) +# print the JSON string representation of the object +print(GetEntityDiscountDetailResponse.to_json()) + +# convert the object into a dict +get_entity_discount_detail_response_dict = get_entity_discount_detail_response_instance.to_dict() +# create an instance of GetEntityDiscountDetailResponse from a dict +get_entity_discount_detail_response_form_dict = get_entity_discount_detail_response.from_dict(get_entity_discount_detail_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Invites.md b/docs/GetInvitesResponseModel.md similarity index 52% rename from docs/Invites.md rename to docs/GetInvitesResponseModel.md index f0f327b..7e22038 100644 --- a/docs/Invites.md +++ b/docs/GetInvitesResponseModel.md @@ -1,4 +1,4 @@ -# Invites +# GetInvitesResponseModel ## Properties @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.invites import Invites +from hyperstack.models.get_invites_response_model import GetInvitesResponseModel # TODO update the JSON string below json = "{}" -# create an instance of Invites from a JSON string -invites_instance = Invites.from_json(json) +# create an instance of GetInvitesResponseModel from a JSON string +get_invites_response_model_instance = GetInvitesResponseModel.from_json(json) # print the JSON string representation of the object -print Invites.to_json() +print(GetInvitesResponseModel.to_json()) # convert the object into a dict -invites_dict = invites_instance.to_dict() -# create an instance of Invites from a dict -invites_form_dict = invites.from_dict(invites_dict) +get_invites_response_model_dict = get_invites_response_model_instance.to_dict() +# create an instance of GetInvitesResponseModel from a dict +get_invites_response_model_form_dict = get_invites_response_model.from_dict(get_invites_response_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetOrganizationResponseModel.md b/docs/GetOrganizationResponseModel.md new file mode 100644 index 0000000..f573c39 --- /dev/null +++ b/docs/GetOrganizationResponseModel.md @@ -0,0 +1,31 @@ +# GetOrganizationResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**organization** | [**OrganizationFields**](OrganizationFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_organization_response_model import GetOrganizationResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetOrganizationResponseModel from a JSON string +get_organization_response_model_instance = GetOrganizationResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetOrganizationResponseModel.to_json()) + +# convert the object into a dict +get_organization_response_model_dict = get_organization_response_model_instance.to_dict() +# create an instance of GetOrganizationResponseModel from a dict +get_organization_response_model_form_dict = get_organization_response_model.from_dict(get_organization_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Permissions.md b/docs/GetPermissionsResponseModel.md similarity index 50% rename from docs/Permissions.md rename to docs/GetPermissionsResponseModel.md index 7a1d7ae..cd586aa 100644 --- a/docs/Permissions.md +++ b/docs/GetPermissionsResponseModel.md @@ -1,4 +1,4 @@ -# Permissions +# GetPermissionsResponseModel ## Properties @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.permissions import Permissions +from hyperstack.models.get_permissions_response_model import GetPermissionsResponseModel # TODO update the JSON string below json = "{}" -# create an instance of Permissions from a JSON string -permissions_instance = Permissions.from_json(json) +# create an instance of GetPermissionsResponseModel from a JSON string +get_permissions_response_model_instance = GetPermissionsResponseModel.from_json(json) # print the JSON string representation of the object -print Permissions.to_json() +print(GetPermissionsResponseModel.to_json()) # convert the object into a dict -permissions_dict = permissions_instance.to_dict() -# create an instance of Permissions from a dict -permissions_form_dict = permissions.from_dict(permissions_dict) +get_permissions_response_model_dict = get_permissions_response_model_instance.to_dict() +# create an instance of GetPermissionsResponseModel from a dict +get_permissions_response_model_form_dict = get_permissions_response_model.from_dict(get_permissions_response_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Policies.md b/docs/GetPoliciesResponseModel.md similarity index 51% rename from docs/Policies.md rename to docs/GetPoliciesResponseModel.md index adcb202..f5d0892 100644 --- a/docs/Policies.md +++ b/docs/GetPoliciesResponseModel.md @@ -1,4 +1,4 @@ -# Policies +# GetPoliciesResponseModel ## Properties @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.policies import Policies +from hyperstack.models.get_policies_response_model import GetPoliciesResponseModel # TODO update the JSON string below json = "{}" -# create an instance of Policies from a JSON string -policies_instance = Policies.from_json(json) +# create an instance of GetPoliciesResponseModel from a JSON string +get_policies_response_model_instance = GetPoliciesResponseModel.from_json(json) # print the JSON string representation of the object -print Policies.to_json() +print(GetPoliciesResponseModel.to_json()) # convert the object into a dict -policies_dict = policies_instance.to_dict() -# create an instance of Policies from a dict -policies_form_dict = policies.from_dict(policies_dict) +get_policies_response_model_dict = get_policies_response_model_instance.to_dict() +# create an instance of GetPoliciesResponseModel from a dict +get_policies_response_model_form_dict = get_policies_response_model.from_dict(get_policies_response_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetRbacRolesResponseModel.md b/docs/GetRbacRolesResponseModel.md new file mode 100644 index 0000000..afeec74 --- /dev/null +++ b/docs/GetRbacRolesResponseModel.md @@ -0,0 +1,31 @@ +# GetRbacRolesResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**roles** | [**List[RbacRoleFields]**](RbacRoleFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_rbac_roles_response_model import GetRbacRolesResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetRbacRolesResponseModel from a JSON string +get_rbac_roles_response_model_instance = GetRbacRolesResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetRbacRolesResponseModel.to_json()) + +# convert the object into a dict +get_rbac_roles_response_model_dict = get_rbac_roles_response_model_instance.to_dict() +# create an instance of GetRbacRolesResponseModel from a dict +get_rbac_roles_response_model_form_dict = get_rbac_roles_response_model.from_dict(get_rbac_roles_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetToken.md b/docs/GetTokenPayload.md similarity index 53% rename from docs/GetToken.md rename to docs/GetTokenPayload.md index bc24a5a..5de0667 100644 --- a/docs/GetToken.md +++ b/docs/GetTokenPayload.md @@ -1,4 +1,4 @@ -# GetToken +# GetTokenPayload ## Properties @@ -11,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.get_token import GetToken +from hyperstack.models.get_token_payload import GetTokenPayload # TODO update the JSON string below json = "{}" -# create an instance of GetToken from a JSON string -get_token_instance = GetToken.from_json(json) +# create an instance of GetTokenPayload from a JSON string +get_token_payload_instance = GetTokenPayload.from_json(json) # print the JSON string representation of the object -print GetToken.to_json() +print(GetTokenPayload.to_json()) # convert the object into a dict -get_token_dict = get_token_instance.to_dict() -# create an instance of GetToken from a dict -get_token_form_dict = get_token.from_dict(get_token_dict) +get_token_payload_dict = get_token_payload_instance.to_dict() +# create an instance of GetTokenPayload from a dict +get_token_payload_form_dict = get_token_payload.from_dict(get_token_payload_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetUserPermissionsResponseModel.md b/docs/GetUserPermissionsResponseModel.md new file mode 100644 index 0000000..a48693d --- /dev/null +++ b/docs/GetUserPermissionsResponseModel.md @@ -0,0 +1,31 @@ +# GetUserPermissionsResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**permissions** | [**List[UserPermissionFields]**](UserPermissionFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.get_user_permissions_response_model import GetUserPermissionsResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of GetUserPermissionsResponseModel from a JSON string +get_user_permissions_response_model_instance = GetUserPermissionsResponseModel.from_json(json) +# print the JSON string representation of the object +print(GetUserPermissionsResponseModel.to_json()) + +# convert the object into a dict +get_user_permissions_response_model_dict = get_user_permissions_response_model_instance.to_dict() +# create an instance of GetUserPermissionsResponseModel from a dict +get_user_permissions_response_model_form_dict = get_user_permissions_response_model.from_dict(get_user_permissions_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GetVersionResponse.md b/docs/GetVersionResponse.md new file mode 100644 index 0000000..a207edc --- /dev/null +++ b/docs/GetVersionResponse.md @@ -0,0 +1,31 @@ +# GetVersionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**version** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.get_version_response import GetVersionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of GetVersionResponse from a JSON string +get_version_response_instance = GetVersionResponse.from_json(json) +# print the JSON string representation of the object +print(GetVersionResponse.to_json()) + +# convert the object into a dict +get_version_response_dict = get_version_response_instance.to_dict() +# create an instance of GetVersionResponse from a dict +get_version_response_form_dict = get_version_response.from_dict(get_version_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Getcreditandthresholdinfo.md b/docs/Getcreditandthresholdinfo.md index 18f86a1..4791b7d 100644 --- a/docs/Getcreditandthresholdinfo.md +++ b/docs/Getcreditandthresholdinfo.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Getcreditandthresholdinfo from a JSON string getcreditandthresholdinfo_instance = Getcreditandthresholdinfo.from_json(json) # print the JSON string representation of the object -print Getcreditandthresholdinfo.to_json() +print(Getcreditandthresholdinfo.to_json()) # convert the object into a dict getcreditandthresholdinfo_dict = getcreditandthresholdinfo_instance.to_dict() diff --git a/docs/Getcreditandthresholdinfoinresponse.md b/docs/Getcreditandthresholdinfoinresponse.md index 2c0513e..3aadd5e 100644 --- a/docs/Getcreditandthresholdinfoinresponse.md +++ b/docs/Getcreditandthresholdinfoinresponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Getcreditandthresholdinfoinresponse from a JSON string getcreditandthresholdinfoinresponse_instance = Getcreditandthresholdinfoinresponse.from_json(json) # print the JSON string representation of the object -print Getcreditandthresholdinfoinresponse.to_json() +print(Getcreditandthresholdinfoinresponse.to_json()) # convert the object into a dict getcreditandthresholdinfoinresponse_dict = getcreditandthresholdinfoinresponse_instance.to_dict() diff --git a/docs/GpuApi.md b/docs/GpuApi.md index 740deef..8dd2b86 100644 --- a/docs/GpuApi.md +++ b/docs/GpuApi.md @@ -4,13 +4,15 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_gpu_list**](GpuApi.md#get_gpu_list) | **GET** /core/gpus | Get GPU List +[**list_gpus**](GpuApi.md#list_gpus) | **GET** /core/gpus | List GPUs -# **get_gpu_list** -> GPUList get_gpu_list() +# **list_gpus** +> GPUList list_gpus() -Get GPU List +List GPUs + +Returns a list of all available GPUs that can be utilized in the creation of custom virtual machine configurations. ### Example @@ -52,12 +54,12 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.GpuApi(api_client) try: - # Get GPU List - api_response = api_instance.get_gpu_list() - print("The response of GpuApi->get_gpu_list:\n") + # List GPUs + api_response = api_instance.list_gpus() + print("The response of GpuApi->list_gpus:\n") pprint(api_response) except Exception as e: - print("Exception when calling GpuApi->get_gpu_list: %s\n" % e) + print("Exception when calling GpuApi->list_gpus: %s\n" % e) ``` @@ -83,7 +85,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting GPU list successful | - | +**200** | Retrieval of GPUs list successful. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/ImageApi.md b/docs/ImageApi.md index 6eee349..755345c 100644 --- a/docs/ImageApi.md +++ b/docs/ImageApi.md @@ -4,13 +4,15 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**retrieve_images**](ImageApi.md#retrieve_images) | **GET** /core/images | Retrieve Images +[**list_images**](ImageApi.md#list_images) | **GET** /core/images | List images -# **retrieve_images** -> Images retrieve_images(region=region) +# **list_images** +> Images list_images(region=region) -Retrieve Images +List images + +Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. Include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. For more information on OS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images). ### Example @@ -53,12 +55,12 @@ with hyperstack.ApiClient(configuration) as api_client: region = None # object | Region Name (optional) try: - # Retrieve Images - api_response = api_instance.retrieve_images(region=region) - print("The response of ImageApi->retrieve_images:\n") + # List images + api_response = api_instance.list_images(region=region) + print("The response of ImageApi->list_images:\n") pprint(api_response) except Exception as e: - print("Exception when calling ImageApi->retrieve_images: %s\n" % e) + print("Exception when calling ImageApi->list_images: %s\n" % e) ``` @@ -87,7 +89,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting images successful | - | +**200** | Retrieval of images list successful. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/ImageFields.md b/docs/ImageFields.md index df775cd..62ff458 100644 --- a/docs/ImageFields.md +++ b/docs/ImageFields.md @@ -12,6 +12,9 @@ Name | Type | Description | Notes **version** | **str** | | [optional] **size** | **int** | | [optional] **display_size** | **str** | | [optional] +**description** | **str** | | [optional] +**labels** | [**List[LableResonse]**](LableResonse.md) | | [optional] +**is_public** | **bool** | | [optional] ## Example @@ -23,7 +26,7 @@ json = "{}" # create an instance of ImageFields from a JSON string image_fields_instance = ImageFields.from_json(json) # print the JSON string representation of the object -print ImageFields.to_json() +print(ImageFields.to_json()) # convert the object into a dict image_fields_dict = image_fields_instance.to_dict() diff --git a/docs/ImageGetResponse.md b/docs/ImageGetResponse.md index e2c8410..5f3b4e7 100644 --- a/docs/ImageGetResponse.md +++ b/docs/ImageGetResponse.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of ImageGetResponse from a JSON string image_get_response_instance = ImageGetResponse.from_json(json) # print the JSON string representation of the object -print ImageGetResponse.to_json() +print(ImageGetResponse.to_json()) # convert the object into a dict image_get_response_dict = image_get_response_instance.to_dict() diff --git a/docs/ImageLogos.md b/docs/ImageLogos.md index b617bd1..0316195 100644 --- a/docs/ImageLogos.md +++ b/docs/ImageLogos.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of ImageLogos from a JSON string image_logos_instance = ImageLogos.from_json(json) # print the JSON string representation of the object -print ImageLogos.to_json() +print(ImageLogos.to_json()) # convert the object into a dict image_logos_dict = image_logos_instance.to_dict() diff --git a/docs/Images.md b/docs/Images.md index 517d4ca..86981d2 100644 --- a/docs/Images.md +++ b/docs/Images.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Images from a JSON string images_instance = Images.from_json(json) # print the JSON string representation of the object -print Images.to_json() +print(Images.to_json()) # convert the object into a dict images_dict = images_instance.to_dict() diff --git a/docs/ImportKeypairPayload.md b/docs/ImportKeypairPayload.md index 3eaeb41..060db75 100644 --- a/docs/ImportKeypairPayload.md +++ b/docs/ImportKeypairPayload.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | -**environment_name** | **str** | | -**public_key** | **str** | | +**name** | **str** | The name of the key pair that is being created. | +**environment_name** | **str** | The name of the environment where the key pair is being created. | +**public_key** | **str** | The public key that is being used to import an SSH key pair. | ## Example @@ -19,7 +19,7 @@ json = "{}" # create an instance of ImportKeypairPayload from a JSON string import_keypair_payload_instance = ImportKeypairPayload.from_json(json) # print the JSON string representation of the object -print ImportKeypairPayload.to_json() +print(ImportKeypairPayload.to_json()) # convert the object into a dict import_keypair_payload_dict = import_keypair_payload_instance.to_dict() diff --git a/docs/ImportKeypairResponse.md b/docs/ImportKeypairResponse.md index 0501d05..34b5a7a 100644 --- a/docs/ImportKeypairResponse.md +++ b/docs/ImportKeypairResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of ImportKeypairResponse from a JSON string import_keypair_response_instance = ImportKeypairResponse.from_json(json) # print the JSON string representation of the object -print ImportKeypairResponse.to_json() +print(ImportKeypairResponse.to_json()) # convert the object into a dict import_keypair_response_dict = import_keypair_response_instance.to_dict() diff --git a/docs/InfrahubResourceObjectResponse.md b/docs/InfrahubResourceObjectResponse.md index a390671..127189f 100644 --- a/docs/InfrahubResourceObjectResponse.md +++ b/docs/InfrahubResourceObjectResponse.md @@ -28,7 +28,7 @@ json = "{}" # create an instance of InfrahubResourceObjectResponse from a JSON string infrahub_resource_object_response_instance = InfrahubResourceObjectResponse.from_json(json) # print the JSON string representation of the object -print InfrahubResourceObjectResponse.to_json() +print(InfrahubResourceObjectResponse.to_json()) # convert the object into a dict infrahub_resource_object_response_dict = infrahub_resource_object_response_instance.to_dict() diff --git a/docs/InsertDiscountPlanFields.md b/docs/InsertDiscountPlanFields.md index 4866d3c..858ff2b 100644 --- a/docs/InsertDiscountPlanFields.md +++ b/docs/InsertDiscountPlanFields.md @@ -5,8 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**org_id** | **int** | | [optional] -**org_name** | **str** | | [optional] +**customers** | [**List[CustomerFields]**](CustomerFields.md) | | [optional] **discount_resources** | [**List[DiscountResourceFields]**](DiscountResourceFields.md) | | [optional] **start_date** | **datetime** | | [optional] **end_date** | **datetime** | | [optional] @@ -22,7 +21,7 @@ json = "{}" # create an instance of InsertDiscountPlanFields from a JSON string insert_discount_plan_fields_instance = InsertDiscountPlanFields.from_json(json) # print the JSON string representation of the object -print InsertDiscountPlanFields.to_json() +print(InsertDiscountPlanFields.to_json()) # convert the object into a dict insert_discount_plan_fields_dict = insert_discount_plan_fields_instance.to_dict() diff --git a/docs/Instance.md b/docs/Instance.md index f63081c..3bd80ed 100644 --- a/docs/Instance.md +++ b/docs/Instance.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | | [optional] **message** | **str** | | [optional] -**instance** | [**InstanceAdminFields**](InstanceAdminFields.md) | | [optional] +**instance** | [**InstanceFields**](InstanceFields.md) | | [optional] ## Example @@ -19,7 +19,7 @@ json = "{}" # create an instance of Instance from a JSON string instance_instance = Instance.from_json(json) # print the JSON string representation of the object -print Instance.to_json() +print(Instance.to_json()) # convert the object into a dict instance_dict = instance_instance.to_dict() diff --git a/docs/Invite.md b/docs/InstanceAdmin.md similarity index 51% rename from docs/Invite.md rename to docs/InstanceAdmin.md index 98214fd..7aa96b6 100644 --- a/docs/Invite.md +++ b/docs/InstanceAdmin.md @@ -1,4 +1,4 @@ -# Invite +# InstanceAdmin ## Properties @@ -7,24 +7,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | | [optional] **message** | **str** | | [optional] -**invite** | [**InviteFields**](InviteFields.md) | | [optional] +**instance** | [**InstanceAdminFields**](InstanceAdminFields.md) | | [optional] ## Example ```python -from hyperstack.models.invite import Invite +from hyperstack.models.instance_admin import InstanceAdmin # TODO update the JSON string below json = "{}" -# create an instance of Invite from a JSON string -invite_instance = Invite.from_json(json) +# create an instance of InstanceAdmin from a JSON string +instance_admin_instance = InstanceAdmin.from_json(json) # print the JSON string representation of the object -print Invite.to_json() +print(InstanceAdmin.to_json()) # convert the object into a dict -invite_dict = invite_instance.to_dict() -# create an instance of Invite from a dict -invite_form_dict = invite.from_dict(invite_dict) +instance_admin_dict = instance_admin_instance.to_dict() +# create an instance of InstanceAdmin from a dict +instance_admin_form_dict = instance_admin.from_dict(instance_admin_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstanceAdminFields.md b/docs/InstanceAdminFields.md index ec87d83..2764cac 100644 --- a/docs/InstanceAdminFields.md +++ b/docs/InstanceAdminFields.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **environment** | [**InstanceEnvironmentFields**](InstanceEnvironmentFields.md) | | [optional] **image** | [**InstanceImageFields**](InstanceImageFields.md) | | [optional] **flavor** | [**InstanceFlavorFields**](InstanceFlavorFields.md) | | [optional] +**os** | **str** | | [optional] **keypair** | [**InstanceKeypairFields**](InstanceKeypairFields.md) | | [optional] **volume_attachments** | [**List[VolumeAttachmentFields]**](VolumeAttachmentFields.md) | | [optional] **security_rules** | [**List[SecurityRulesFieldsforInstance]**](SecurityRulesFieldsforInstance.md) | | [optional] @@ -19,8 +20,12 @@ Name | Type | Description | Notes **fixed_ip** | **str** | | [optional] **floating_ip** | **str** | | [optional] **floating_ip_status** | **str** | | [optional] +**locked** | **bool** | | [optional] +**contract_id** | **int** | | [optional] **created_at** | **datetime** | | [optional] +**labels** | **List[str]** | | [optional] **openstack_id** | **str** | | [optional] +**host** | **str** | | [optional] ## Example @@ -32,7 +37,7 @@ json = "{}" # create an instance of InstanceAdminFields from a JSON string instance_admin_fields_instance = InstanceAdminFields.from_json(json) # print the JSON string representation of the object -print InstanceAdminFields.to_json() +print(InstanceAdminFields.to_json()) # convert the object into a dict instance_admin_fields_dict = instance_admin_fields_instance.to_dict() diff --git a/docs/InstanceEnvironmentFields.md b/docs/InstanceEnvironmentFields.md index 37c5276..10b5044 100644 --- a/docs/InstanceEnvironmentFields.md +++ b/docs/InstanceEnvironmentFields.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] **name** | **str** | | [optional] **org_id** | **int** | | [optional] **region** | **str** | | [optional] @@ -19,7 +20,7 @@ json = "{}" # create an instance of InstanceEnvironmentFields from a JSON string instance_environment_fields_instance = InstanceEnvironmentFields.from_json(json) # print the JSON string representation of the object -print InstanceEnvironmentFields.to_json() +print(InstanceEnvironmentFields.to_json()) # convert the object into a dict instance_environment_fields_dict = instance_environment_fields_instance.to_dict() diff --git a/docs/InstanceEvents.md b/docs/InstanceEvents.md index 675007e..2df2fac 100644 --- a/docs/InstanceEvents.md +++ b/docs/InstanceEvents.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of InstanceEvents from a JSON string instance_events_instance = InstanceEvents.from_json(json) # print the JSON string representation of the object -print InstanceEvents.to_json() +print(InstanceEvents.to_json()) # convert the object into a dict instance_events_dict = instance_events_instance.to_dict() diff --git a/docs/InstanceEventsFields.md b/docs/InstanceEventsFields.md index c2eea26..a9a592a 100644 --- a/docs/InstanceEventsFields.md +++ b/docs/InstanceEventsFields.md @@ -24,7 +24,7 @@ json = "{}" # create an instance of InstanceEventsFields from a JSON string instance_events_fields_instance = InstanceEventsFields.from_json(json) # print the JSON string representation of the object -print InstanceEventsFields.to_json() +print(InstanceEventsFields.to_json()) # convert the object into a dict instance_events_fields_dict = instance_events_fields_instance.to_dict() diff --git a/docs/InstanceFields.md b/docs/InstanceFields.md new file mode 100644 index 0000000..63e68a7 --- /dev/null +++ b/docs/InstanceFields.md @@ -0,0 +1,47 @@ +# InstanceFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**status** | **str** | | [optional] +**environment** | [**InstanceEnvironmentFields**](InstanceEnvironmentFields.md) | | [optional] +**image** | [**InstanceImageFields**](InstanceImageFields.md) | | [optional] +**flavor** | [**InstanceFlavorFields**](InstanceFlavorFields.md) | | [optional] +**os** | **str** | | [optional] +**keypair** | [**InstanceKeypairFields**](InstanceKeypairFields.md) | | [optional] +**volume_attachments** | [**List[VolumeAttachmentFields]**](VolumeAttachmentFields.md) | | [optional] +**security_rules** | [**List[SecurityRulesFieldsforInstance]**](SecurityRulesFieldsforInstance.md) | | [optional] +**power_state** | **str** | | [optional] +**vm_state** | **str** | | [optional] +**fixed_ip** | **str** | | [optional] +**floating_ip** | **str** | | [optional] +**floating_ip_status** | **str** | | [optional] +**locked** | **bool** | | [optional] +**contract_id** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**labels** | **List[str]** | | [optional] + +## Example + +```python +from hyperstack.models.instance_fields import InstanceFields + +# TODO update the JSON string below +json = "{}" +# create an instance of InstanceFields from a JSON string +instance_fields_instance = InstanceFields.from_json(json) +# print the JSON string representation of the object +print(InstanceFields.to_json()) + +# convert the object into a dict +instance_fields_dict = instance_fields_instance.to_dict() +# create an instance of InstanceFields from a dict +instance_fields_form_dict = instance_fields.from_dict(instance_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstanceFlavorFields.md b/docs/InstanceFlavorFields.md index 5bca07e..503197f 100644 --- a/docs/InstanceFlavorFields.md +++ b/docs/InstanceFlavorFields.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **cpu** | **int** | | [optional] **ram** | **float** | | [optional] **disk** | **int** | | [optional] +**ephemeral** | **int** | | [optional] **gpu** | **str** | | [optional] **gpu_count** | **int** | | [optional] @@ -23,7 +24,7 @@ json = "{}" # create an instance of InstanceFlavorFields from a JSON string instance_flavor_fields_instance = InstanceFlavorFields.from_json(json) # print the JSON string representation of the object -print InstanceFlavorFields.to_json() +print(InstanceFlavorFields.to_json()) # convert the object into a dict instance_flavor_fields_dict = instance_flavor_fields_instance.to_dict() diff --git a/docs/InstanceImageFields.md b/docs/InstanceImageFields.md index 7d43a4c..9bfec74 100644 --- a/docs/InstanceImageFields.md +++ b/docs/InstanceImageFields.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of InstanceImageFields from a JSON string instance_image_fields_instance = InstanceImageFields.from_json(json) # print the JSON string representation of the object -print InstanceImageFields.to_json() +print(InstanceImageFields.to_json()) # convert the object into a dict instance_image_fields_dict = instance_image_fields_instance.to_dict() diff --git a/docs/InstanceKeypairFields.md b/docs/InstanceKeypairFields.md index 9dd13f7..832ad5b 100644 --- a/docs/InstanceKeypairFields.md +++ b/docs/InstanceKeypairFields.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of InstanceKeypairFields from a JSON string instance_keypair_fields_instance = InstanceKeypairFields.from_json(json) # print the JSON string representation of the object -print InstanceKeypairFields.to_json() +print(InstanceKeypairFields.to_json()) # convert the object into a dict instance_keypair_fields_dict = instance_keypair_fields_instance.to_dict() diff --git a/docs/InstanceOverviewFields.md b/docs/InstanceOverviewFields.md index 27fdbf6..86aa0c1 100644 --- a/docs/InstanceOverviewFields.md +++ b/docs/InstanceOverviewFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of InstanceOverviewFields from a JSON string instance_overview_fields_instance = InstanceOverviewFields.from_json(json) # print the JSON string representation of the object -print InstanceOverviewFields.to_json() +print(InstanceOverviewFields.to_json()) # convert the object into a dict instance_overview_fields_dict = instance_overview_fields_instance.to_dict() diff --git a/docs/InstanceResizePayload.md b/docs/InstanceResizePayload.md index 3190dfb..10b0b76 100644 --- a/docs/InstanceResizePayload.md +++ b/docs/InstanceResizePayload.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of InstanceResizePayload from a JSON string instance_resize_payload_instance = InstanceResizePayload.from_json(json) # print the JSON string representation of the object -print InstanceResizePayload.to_json() +print(InstanceResizePayload.to_json()) # convert the object into a dict instance_resize_payload_dict = instance_resize_payload_instance.to_dict() diff --git a/docs/Instances.md b/docs/Instances.md index 9383406..07f6454 100644 --- a/docs/Instances.md +++ b/docs/Instances.md @@ -7,8 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | | [optional] **message** | **str** | | [optional] -**instances** | [**List[InstanceAdminFields]**](InstanceAdminFields.md) | | [optional] -**instance_count** | **int** | | [optional] +**instances** | [**List[InstanceFields]**](InstanceFields.md) | | [optional] ## Example @@ -20,7 +19,7 @@ json = "{}" # create an instance of Instances from a JSON string instances_instance = Instances.from_json(json) # print the JSON string representation of the object -print Instances.to_json() +print(Instances.to_json()) # convert the object into a dict instances_dict = instances_instance.to_dict() diff --git a/docs/APIKey.md b/docs/InstancesAdmin.md similarity index 52% rename from docs/APIKey.md rename to docs/InstancesAdmin.md index 3ad6ee8..0178459 100644 --- a/docs/APIKey.md +++ b/docs/InstancesAdmin.md @@ -1,4 +1,4 @@ -# APIKey +# InstancesAdmin ## Properties @@ -7,24 +7,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | | [optional] **message** | **str** | | [optional] -**api_key** | [**APIKeyFields**](APIKeyFields.md) | | [optional] +**instances** | [**List[InstanceAdminFields]**](InstanceAdminFields.md) | | [optional] +**instance_count** | **int** | | [optional] ## Example ```python -from hyperstack.models.api_key import APIKey +from hyperstack.models.instances_admin import InstancesAdmin # TODO update the JSON string below json = "{}" -# create an instance of APIKey from a JSON string -api_key_instance = APIKey.from_json(json) +# create an instance of InstancesAdmin from a JSON string +instances_admin_instance = InstancesAdmin.from_json(json) # print the JSON string representation of the object -print APIKey.to_json() +print(InstancesAdmin.to_json()) # convert the object into a dict -api_key_dict = api_key_instance.to_dict() -# create an instance of APIKey from a dict -api_key_form_dict = api_key.from_dict(api_key_dict) +instances_admin_dict = instances_admin_instance.to_dict() +# create an instance of InstancesAdmin from a dict +instances_admin_form_dict = instances_admin.from_dict(instances_admin_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InstancesSummaryAdmin.md b/docs/InstancesSummaryAdmin.md new file mode 100644 index 0000000..d0bea6e --- /dev/null +++ b/docs/InstancesSummaryAdmin.md @@ -0,0 +1,31 @@ +# InstancesSummaryAdmin + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**instances** | [**List[InstancesSummaryFields]**](InstancesSummaryFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.instances_summary_admin import InstancesSummaryAdmin + +# TODO update the JSON string below +json = "{}" +# create an instance of InstancesSummaryAdmin from a JSON string +instances_summary_admin_instance = InstancesSummaryAdmin.from_json(json) +# print the JSON string representation of the object +print(InstancesSummaryAdmin.to_json()) + +# convert the object into a dict +instances_summary_admin_dict = instances_summary_admin_instance.to_dict() +# create an instance of InstancesSummaryAdmin from a dict +instances_summary_admin_form_dict = instances_summary_admin.from_dict(instances_summary_admin_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InstancesSummaryFields.md b/docs/InstancesSummaryFields.md new file mode 100644 index 0000000..5b5d5a8 --- /dev/null +++ b/docs/InstancesSummaryFields.md @@ -0,0 +1,45 @@ +# InstancesSummaryFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**environment** | **str** | | [optional] +**org_id** | **int** | | [optional] +**environment_id** | **int** | | [optional] +**image** | **str** | | [optional] +**image_id** | **int** | | [optional] +**flavor** | **str** | | [optional] +**flavor_id** | **int** | | [optional] +**keypair** | **str** | | [optional] +**keypair_id** | **int** | | [optional] +**fixed_ip** | **str** | | [optional] +**floating_ip** | **str** | | [optional] +**floating_ip_status** | **str** | | [optional] +**status** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.instances_summary_fields import InstancesSummaryFields + +# TODO update the JSON string below +json = "{}" +# create an instance of InstancesSummaryFields from a JSON string +instances_summary_fields_instance = InstancesSummaryFields.from_json(json) +# print the JSON string representation of the object +print(InstancesSummaryFields.to_json()) + +# convert the object into a dict +instances_summary_fields_dict = instances_summary_fields_instance.to_dict() +# create an instance of InstancesSummaryFields from a dict +instances_summary_fields_form_dict = instances_summary_fields.from_dict(instances_summary_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InternalEnvironmentFields.md b/docs/InternalEnvironmentFields.md index 7231d67..3a7285b 100644 --- a/docs/InternalEnvironmentFields.md +++ b/docs/InternalEnvironmentFields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of InternalEnvironmentFields from a JSON string internal_environment_fields_instance = InternalEnvironmentFields.from_json(json) # print the JSON string representation of the object -print InternalEnvironmentFields.to_json() +print(InternalEnvironmentFields.to_json()) # convert the object into a dict internal_environment_fields_dict = internal_environment_fields_instance.to_dict() diff --git a/docs/InternalInstanceFields.md b/docs/InternalInstanceFields.md index 248dad2..e5dae9f 100644 --- a/docs/InternalInstanceFields.md +++ b/docs/InternalInstanceFields.md @@ -35,7 +35,7 @@ json = "{}" # create an instance of InternalInstanceFields from a JSON string internal_instance_fields_instance = InternalInstanceFields.from_json(json) # print the JSON string representation of the object -print InternalInstanceFields.to_json() +print(InternalInstanceFields.to_json()) # convert the object into a dict internal_instance_fields_dict = internal_instance_fields_instance.to_dict() diff --git a/docs/InternalInstanceFlavorFields.md b/docs/InternalInstanceFlavorFields.md index 99e69fd..a66e02e 100644 --- a/docs/InternalInstanceFlavorFields.md +++ b/docs/InternalInstanceFlavorFields.md @@ -25,7 +25,7 @@ json = "{}" # create an instance of InternalInstanceFlavorFields from a JSON string internal_instance_flavor_fields_instance = InternalInstanceFlavorFields.from_json(json) # print the JSON string representation of the object -print InternalInstanceFlavorFields.to_json() +print(InternalInstanceFlavorFields.to_json()) # convert the object into a dict internal_instance_flavor_fields_dict = internal_instance_flavor_fields_instance.to_dict() diff --git a/docs/InternalInstanceImageFields.md b/docs/InternalInstanceImageFields.md index d0a4a93..99345f3 100644 --- a/docs/InternalInstanceImageFields.md +++ b/docs/InternalInstanceImageFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of InternalInstanceImageFields from a JSON string internal_instance_image_fields_instance = InternalInstanceImageFields.from_json(json) # print the JSON string representation of the object -print InternalInstanceImageFields.to_json() +print(InternalInstanceImageFields.to_json()) # convert the object into a dict internal_instance_image_fields_dict = internal_instance_image_fields_instance.to_dict() diff --git a/docs/InternalInstanceKeypairFields.md b/docs/InternalInstanceKeypairFields.md index 5ce29b2..66ddbb3 100644 --- a/docs/InternalInstanceKeypairFields.md +++ b/docs/InternalInstanceKeypairFields.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of InternalInstanceKeypairFields from a JSON string internal_instance_keypair_fields_instance = InternalInstanceKeypairFields.from_json(json) # print the JSON string representation of the object -print InternalInstanceKeypairFields.to_json() +print(InternalInstanceKeypairFields.to_json()) # convert the object into a dict internal_instance_keypair_fields_dict = internal_instance_keypair_fields_instance.to_dict() diff --git a/docs/InternalInstancesResponse.md b/docs/InternalInstancesResponse.md index 954ad7a..b51dedb 100644 --- a/docs/InternalInstancesResponse.md +++ b/docs/InternalInstancesResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of InternalInstancesResponse from a JSON string internal_instances_response_instance = InternalInstancesResponse.from_json(json) # print the JSON string representation of the object -print InternalInstancesResponse.to_json() +print(InternalInstancesResponse.to_json()) # convert the object into a dict internal_instances_response_dict = internal_instances_response_instance.to_dict() diff --git a/docs/InternalSecurityRulesFieldsForInstance.md b/docs/InternalSecurityRulesFieldsForInstance.md index 9dba655..bd208a7 100644 --- a/docs/InternalSecurityRulesFieldsForInstance.md +++ b/docs/InternalSecurityRulesFieldsForInstance.md @@ -25,7 +25,7 @@ json = "{}" # create an instance of InternalSecurityRulesFieldsForInstance from a JSON string internal_security_rules_fields_for_instance_instance = InternalSecurityRulesFieldsForInstance.from_json(json) # print the JSON string representation of the object -print InternalSecurityRulesFieldsForInstance.to_json() +print(InternalSecurityRulesFieldsForInstance.to_json()) # convert the object into a dict internal_security_rules_fields_for_instance_dict = internal_security_rules_fields_for_instance_instance.to_dict() diff --git a/docs/InternalVolumeAttachmentFields.md b/docs/InternalVolumeAttachmentFields.md index 2e204f0..ca18ba5 100644 --- a/docs/InternalVolumeAttachmentFields.md +++ b/docs/InternalVolumeAttachmentFields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of InternalVolumeAttachmentFields from a JSON string internal_volume_attachment_fields_instance = InternalVolumeAttachmentFields.from_json(json) # print the JSON string representation of the object -print InternalVolumeAttachmentFields.to_json() +print(InternalVolumeAttachmentFields.to_json()) # convert the object into a dict internal_volume_attachment_fields_dict = internal_volume_attachment_fields_instance.to_dict() diff --git a/docs/InternalVolumeFields.md b/docs/InternalVolumeFields.md index 6f76e5c..057696e 100644 --- a/docs/InternalVolumeFields.md +++ b/docs/InternalVolumeFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of InternalVolumeFields from a JSON string internal_volume_fields_instance = InternalVolumeFields.from_json(json) # print the JSON string representation of the object -print InternalVolumeFields.to_json() +print(InternalVolumeFields.to_json()) # convert the object into a dict internal_volume_fields_dict = internal_volume_fields_instance.to_dict() diff --git a/docs/InternalVolumesResponse.md b/docs/InternalVolumesResponse.md index d945cb0..123a4ce 100644 --- a/docs/InternalVolumesResponse.md +++ b/docs/InternalVolumesResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of InternalVolumesResponse from a JSON string internal_volumes_response_instance = InternalVolumesResponse.from_json(json) # print the JSON string representation of the object -print InternalVolumesResponse.to_json() +print(InternalVolumesResponse.to_json()) # convert the object into a dict internal_volumes_response_dict = internal_volumes_response_instance.to_dict() diff --git a/docs/InviteApi.md b/docs/InviteApi.md index f5c2fd9..3d4684e 100644 --- a/docs/InviteApi.md +++ b/docs/InviteApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description # **delete_invite** -> ResponseModel delete_invite(id) +> CommonResponseModel delete_invite(id) Delete Invite @@ -21,7 +21,7 @@ Delete Invite ```python import hyperstack -from hyperstack.models.response_model import ResponseModel +from hyperstack.models.common_response_model import CommonResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -74,7 +74,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseModel**](ResponseModel.md) +[**CommonResponseModel**](CommonResponseModel.md) ### Authorization @@ -98,7 +98,7 @@ Name | Type | Description | Notes [[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) # **invite_an_user_to_organization** -> Invite invite_an_user_to_organization(payload) +> InviteUserResponseModel invite_an_user_to_organization(payload) Invite an user to organization @@ -109,8 +109,8 @@ Invite an user to organization ```python import hyperstack -from hyperstack.models.invite import Invite -from hyperstack.models.invite_user import InviteUser +from hyperstack.models.invite_user_payload import InviteUserPayload +from hyperstack.models.invite_user_response_model import InviteUserResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -141,7 +141,7 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.InviteApi(api_client) - payload = hyperstack.InviteUser() # InviteUser | + payload = hyperstack.InviteUserPayload() # InviteUserPayload | try: # Invite an user to organization @@ -159,11 +159,11 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **payload** | [**InviteUser**](InviteUser.md)| | + **payload** | [**InviteUserPayload**](InviteUserPayload.md)| | ### Return type -[**Invite**](Invite.md) +[**InviteUserResponseModel**](InviteUserResponseModel.md) ### Authorization @@ -178,7 +178,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Inviting user successful | - | +**201** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **409** | Conflict | - | @@ -187,7 +187,7 @@ Name | Type | Description | Notes [[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_invites** -> Invites list_invites() +> GetInvitesResponseModel list_invites() List Invites @@ -198,7 +198,7 @@ List Invites ```python import hyperstack -from hyperstack.models.invites import Invites +from hyperstack.models.get_invites_response_model import GetInvitesResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -247,7 +247,7 @@ This endpoint does not need any parameter. ### Return type -[**Invites**](Invites.md) +[**GetInvitesResponseModel**](GetInvitesResponseModel.md) ### Authorization @@ -262,7 +262,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting invites successful | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/InviteFields.md b/docs/InviteFields.md index 95d168f..be3c5db 100644 --- a/docs/InviteFields.md +++ b/docs/InviteFields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of InviteFields from a JSON string invite_fields_instance = InviteFields.from_json(json) # print the JSON string representation of the object -print InviteFields.to_json() +print(InviteFields.to_json()) # convert the object into a dict invite_fields_dict = invite_fields_instance.to_dict() diff --git a/docs/InviteUser.md b/docs/InviteUserPayload.md similarity index 50% rename from docs/InviteUser.md rename to docs/InviteUserPayload.md index ac6fc71..5286c24 100644 --- a/docs/InviteUser.md +++ b/docs/InviteUserPayload.md @@ -1,4 +1,4 @@ -# InviteUser +# InviteUserPayload ## Properties @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.invite_user import InviteUser +from hyperstack.models.invite_user_payload import InviteUserPayload # TODO update the JSON string below json = "{}" -# create an instance of InviteUser from a JSON string -invite_user_instance = InviteUser.from_json(json) +# create an instance of InviteUserPayload from a JSON string +invite_user_payload_instance = InviteUserPayload.from_json(json) # print the JSON string representation of the object -print InviteUser.to_json() +print(InviteUserPayload.to_json()) # convert the object into a dict -invite_user_dict = invite_user_instance.to_dict() -# create an instance of InviteUser from a dict -invite_user_form_dict = invite_user.from_dict(invite_user_dict) +invite_user_payload_dict = invite_user_payload_instance.to_dict() +# create an instance of InviteUserPayload from a dict +invite_user_payload_form_dict = invite_user_payload.from_dict(invite_user_payload_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InviteUserResponseModel.md b/docs/InviteUserResponseModel.md new file mode 100644 index 0000000..4d868a3 --- /dev/null +++ b/docs/InviteUserResponseModel.md @@ -0,0 +1,31 @@ +# InviteUserResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**invite** | [**InviteFields**](InviteFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.invite_user_response_model import InviteUserResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of InviteUserResponseModel from a JSON string +invite_user_response_model_instance = InviteUserResponseModel.from_json(json) +# print the JSON string representation of the object +print(InviteUserResponseModel.to_json()) + +# convert the object into a dict +invite_user_response_model_dict = invite_user_response_model_instance.to_dict() +# create an instance of InviteUserResponseModel from a dict +invite_user_response_model_form_dict = invite_user_response_model.from_dict(invite_user_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/KeypairApi.md b/docs/KeypairApi.md index 4d6e5b8..9b1f37d 100644 --- a/docs/KeypairApi.md +++ b/docs/KeypairApi.md @@ -4,16 +4,18 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_keypair**](KeypairApi.md#delete_keypair) | **DELETE** /core/keypair/{id} | Delete Keypair -[**import_keypair**](KeypairApi.md#import_keypair) | **POST** /core/keypairs | Import Keypair -[**retrieve_user_keypairs**](KeypairApi.md#retrieve_user_keypairs) | **GET** /core/keypairs | Retrieve Keypairs -[**update_keypair_name**](KeypairApi.md#update_keypair_name) | **PUT** /core/keypair/{id} | Update Keypair name +[**delete_key_pair**](KeypairApi.md#delete_key_pair) | **DELETE** /core/keypair/{id} | Delete key pair +[**import_key_pair**](KeypairApi.md#import_key_pair) | **POST** /core/keypairs | Import key pair +[**list_key_pairs**](KeypairApi.md#list_key_pairs) | **GET** /core/keypairs | List key pairs +[**update_key_pair_name**](KeypairApi.md#update_key_pair_name) | **PUT** /core/keypair/{id} | Update key pair name -# **delete_keypair** -> ResponseModel delete_keypair(id) +# **delete_key_pair** +> ResponseModel delete_key_pair(id) -Delete Keypair +Delete key pair + +Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair. ### Example @@ -56,12 +58,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete Keypair - api_response = api_instance.delete_keypair(id) - print("The response of KeypairApi->delete_keypair:\n") + # Delete key pair + api_response = api_instance.delete_key_pair(id) + print("The response of KeypairApi->delete_key_pair:\n") pprint(api_response) except Exception as e: - print("Exception when calling KeypairApi->delete_keypair: %s\n" % e) + print("Exception when calling KeypairApi->delete_key_pair: %s\n" % e) ``` @@ -90,7 +92,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Keypair successfully deleted. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -98,10 +100,12 @@ Name | Type | Description | Notes [[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) -# **import_keypair** -> ImportKeypairResponse import_keypair(payload) +# **import_key_pair** +> ImportKeypairResponse import_key_pair(payload) + +Import key pair -Import Keypair +Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key). ### Example @@ -145,12 +149,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.ImportKeypairPayload() # ImportKeypairPayload | try: - # Import Keypair - api_response = api_instance.import_keypair(payload) - print("The response of KeypairApi->import_keypair:\n") + # Import key pair + api_response = api_instance.import_key_pair(payload) + print("The response of KeypairApi->import_key_pair:\n") pprint(api_response) except Exception as e: - print("Exception when calling KeypairApi->import_keypair: %s\n" % e) + print("Exception when calling KeypairApi->import_key_pair: %s\n" % e) ``` @@ -188,10 +192,12 @@ Name | Type | Description | Notes [[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) -# **retrieve_user_keypairs** -> Keypairs retrieve_user_keypairs() +# **list_key_pairs** +> Keypairs list_key_pairs() -Retrieve Keypairs +List key pairs + +Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features). ### Example @@ -233,12 +239,12 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.KeypairApi(api_client) try: - # Retrieve Keypairs - api_response = api_instance.retrieve_user_keypairs() - print("The response of KeypairApi->retrieve_user_keypairs:\n") + # List key pairs + api_response = api_instance.list_key_pairs() + print("The response of KeypairApi->list_key_pairs:\n") pprint(api_response) except Exception as e: - print("Exception when calling KeypairApi->retrieve_user_keypairs: %s\n" % e) + print("Exception when calling KeypairApi->list_key_pairs: %s\n" % e) ``` @@ -264,17 +270,19 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting user keypairs successful | - | +**200** | Retrieval of key pairs list successful. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | [[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_keypair_name** -> UpdateKeypairnameresponse update_keypair_name(id, payload) +# **update_key_pair_name** +> UpdateKeypairnameresponse update_key_pair_name(id, payload) + +Update key pair name -Update Keypair name +Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body. ### Example @@ -319,12 +327,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.UpdateKeypairName() # UpdateKeypairName | try: - # Update Keypair name - api_response = api_instance.update_keypair_name(id, payload) - print("The response of KeypairApi->update_keypair_name:\n") + # Update key pair name + api_response = api_instance.update_key_pair_name(id, payload) + print("The response of KeypairApi->update_key_pair_name:\n") pprint(api_response) except Exception as e: - print("Exception when calling KeypairApi->update_keypair_name: %s\n" % e) + print("Exception when calling KeypairApi->update_key_pair_name: %s\n" % e) ``` @@ -354,7 +362,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Keypair name updated successfully | - | +**200** | Keypair name updated successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/KeypairFields.md b/docs/KeypairFields.md index d944453..a31aa10 100644 --- a/docs/KeypairFields.md +++ b/docs/KeypairFields.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of KeypairFields from a JSON string keypair_fields_instance = KeypairFields.from_json(json) # print the JSON string representation of the object -print KeypairFields.to_json() +print(KeypairFields.to_json()) # convert the object into a dict keypair_fields_dict = keypair_fields_instance.to_dict() diff --git a/docs/Keypairs.md b/docs/Keypairs.md index f60b299..1ee810e 100644 --- a/docs/Keypairs.md +++ b/docs/Keypairs.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Keypairs from a JSON string keypairs_instance = Keypairs.from_json(json) # print the JSON string representation of the object -print Keypairs.to_json() +print(Keypairs.to_json()) # convert the object into a dict keypairs_dict = keypairs_instance.to_dict() diff --git a/docs/LableResonse.md b/docs/LableResonse.md new file mode 100644 index 0000000..5540b7d --- /dev/null +++ b/docs/LableResonse.md @@ -0,0 +1,30 @@ +# LableResonse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**label** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.lable_resonse import LableResonse + +# TODO update the JSON string below +json = "{}" +# create an instance of LableResonse from a JSON string +lable_resonse_instance = LableResonse.from_json(json) +# print the JSON string representation of the object +print(LableResonse.to_json()) + +# convert the object into a dict +lable_resonse_dict = lable_resonse_instance.to_dict() +# create an instance of LableResonse from a dict +lable_resonse_form_dict = lable_resonse.from_dict(lable_resonse_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Lastdaycostfields.md b/docs/Lastdaycostfields.md index 3af9d20..4402140 100644 --- a/docs/Lastdaycostfields.md +++ b/docs/Lastdaycostfields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of Lastdaycostfields from a JSON string lastdaycostfields_instance = Lastdaycostfields.from_json(json) # print the JSON string representation of the object -print Lastdaycostfields.to_json() +print(Lastdaycostfields.to_json()) # convert the object into a dict lastdaycostfields_dict = lastdaycostfields_instance.to_dict() diff --git a/docs/Lastdaycostresponse.md b/docs/Lastdaycostresponse.md index 830ee1a..fb2aecb 100644 --- a/docs/Lastdaycostresponse.md +++ b/docs/Lastdaycostresponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Lastdaycostresponse from a JSON string lastdaycostresponse_instance = Lastdaycostresponse.from_json(json) # print the JSON string representation of the object -print Lastdaycostresponse.to_json() +print(Lastdaycostresponse.to_json()) # convert the object into a dict lastdaycostresponse_dict = lastdaycostresponse_instance.to_dict() diff --git a/docs/LogoGetResponse.md b/docs/LogoGetResponse.md index f0aadf3..b69f94a 100644 --- a/docs/LogoGetResponse.md +++ b/docs/LogoGetResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of LogoGetResponse from a JSON string logo_get_response_instance = LogoGetResponse.from_json(json) # print the JSON string representation of the object -print LogoGetResponse.to_json() +print(LogoGetResponse.to_json()) # convert the object into a dict logo_get_response_dict = logo_get_response_instance.to_dict() diff --git a/docs/Logout.md b/docs/LogoutPayload.md similarity index 54% rename from docs/Logout.md rename to docs/LogoutPayload.md index 7b9b785..7061f04 100644 --- a/docs/Logout.md +++ b/docs/LogoutPayload.md @@ -1,4 +1,4 @@ -# Logout +# LogoutPayload ## Properties @@ -10,19 +10,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.logout import Logout +from hyperstack.models.logout_payload import LogoutPayload # TODO update the JSON string below json = "{}" -# create an instance of Logout from a JSON string -logout_instance = Logout.from_json(json) +# create an instance of LogoutPayload from a JSON string +logout_payload_instance = LogoutPayload.from_json(json) # print the JSON string representation of the object -print Logout.to_json() +print(LogoutPayload.to_json()) # convert the object into a dict -logout_dict = logout_instance.to_dict() -# create an instance of Logout from a dict -logout_form_dict = logout.from_dict(logout_dict) +logout_payload_dict = logout_payload_instance.to_dict() +# create an instance of LogoutPayload from a dict +logout_payload_form_dict = logout_payload.from_dict(logout_payload_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MetricItemFields.md b/docs/MetricItemFields.md new file mode 100644 index 0000000..1b488c8 --- /dev/null +++ b/docs/MetricItemFields.md @@ -0,0 +1,31 @@ +# MetricItemFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | **str** | | [optional] +**columns** | **List[str]** | | [optional] +**data** | **List[List[object]]** | | [optional] + +## Example + +```python +from hyperstack.models.metric_item_fields import MetricItemFields + +# TODO update the JSON string below +json = "{}" +# create an instance of MetricItemFields from a JSON string +metric_item_fields_instance = MetricItemFields.from_json(json) +# print the JSON string representation of the object +print(MetricItemFields.to_json()) + +# convert the object into a dict +metric_item_fields_dict = metric_item_fields_instance.to_dict() +# create an instance of MetricItemFields from a dict +metric_item_fields_form_dict = metric_item_fields.from_dict(metric_item_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MetricsFields.md b/docs/MetricsFields.md new file mode 100644 index 0000000..837b165 --- /dev/null +++ b/docs/MetricsFields.md @@ -0,0 +1,34 @@ +# MetricsFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu** | [**MetricItemFields**](MetricItemFields.md) | | [optional] +**memory_usages** | [**MetricItemFields**](MetricItemFields.md) | | [optional] +**network_in** | [**MetricItemFields**](MetricItemFields.md) | | [optional] +**network_out** | [**MetricItemFields**](MetricItemFields.md) | | [optional] +**disk_read** | [**MetricItemFields**](MetricItemFields.md) | | [optional] +**disk_write** | [**MetricItemFields**](MetricItemFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.metrics_fields import MetricsFields + +# TODO update the JSON string below +json = "{}" +# create an instance of MetricsFields from a JSON string +metrics_fields_instance = MetricsFields.from_json(json) +# print the JSON string representation of the object +print(MetricsFields.to_json()) + +# convert the object into a dict +metrics_fields_dict = metrics_fields_instance.to_dict() +# create an instance of MetricsFields from a dict +metrics_fields_form_dict = metrics_fields.from_dict(metrics_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewConfigurationsResponse.md b/docs/NewConfigurationsResponse.md index 6e71921..25d1f84 100644 --- a/docs/NewConfigurationsResponse.md +++ b/docs/NewConfigurationsResponse.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of NewConfigurationsResponse from a JSON string new_configurations_response_instance = NewConfigurationsResponse.from_json(json) # print the JSON string representation of the object -print NewConfigurationsResponse.to_json() +print(NewConfigurationsResponse.to_json()) # convert the object into a dict new_configurations_response_dict = new_configurations_response_instance.to_dict() diff --git a/docs/NewModelResponse.md b/docs/NewModelResponse.md index e78fa6b..78ba6b3 100644 --- a/docs/NewModelResponse.md +++ b/docs/NewModelResponse.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of NewModelResponse from a JSON string new_model_response_instance = NewModelResponse.from_json(json) # print the JSON string representation of the object -print NewModelResponse.to_json() +print(NewModelResponse.to_json()) # convert the object into a dict new_model_response_dict = new_model_response_instance.to_dict() diff --git a/docs/NewStockResponse.md b/docs/NewStockResponse.md index 25a9f6f..e1a4a7a 100644 --- a/docs/NewStockResponse.md +++ b/docs/NewStockResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of NewStockResponse from a JSON string new_stock_response_instance = NewStockResponse.from_json(json) # print the JSON string representation of the object -print NewStockResponse.to_json() +print(NewStockResponse.to_json()) # convert the object into a dict new_stock_response_dict = new_stock_response_instance.to_dict() diff --git a/docs/NewStockRetriveResponse.md b/docs/NewStockRetriveResponse.md index 654946a..4f97919 100644 --- a/docs/NewStockRetriveResponse.md +++ b/docs/NewStockRetriveResponse.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of NewStockRetriveResponse from a JSON string new_stock_retrive_response_instance = NewStockRetriveResponse.from_json(json) # print the JSON string representation of the object -print NewStockRetriveResponse.to_json() +print(NewStockRetriveResponse.to_json()) # convert the object into a dict new_stock_retrive_response_dict = new_stock_retrive_response_instance.to_dict() diff --git a/docs/NewStockUpdateResponseModel.md b/docs/NewStockUpdateResponseModel.md index 3cc7465..f679988 100644 --- a/docs/NewStockUpdateResponseModel.md +++ b/docs/NewStockUpdateResponseModel.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of NewStockUpdateResponseModel from a JSON string new_stock_update_response_model_instance = NewStockUpdateResponseModel.from_json(json) # print the JSON string representation of the object -print NewStockUpdateResponseModel.to_json() +print(NewStockUpdateResponseModel.to_json()) # convert the object into a dict new_stock_update_response_model_dict = new_stock_update_response_model_instance.to_dict() diff --git a/docs/NodeModel.md b/docs/NodeModel.md index 76b11aa..0bfc852 100644 --- a/docs/NodeModel.md +++ b/docs/NodeModel.md @@ -11,7 +11,10 @@ Name | Type | Description | Notes **status** | **str** | | [optional] **provision_date** | **datetime** | | [optional] **sunset_date** | **datetime** | | [optional] +**flavors** | **List[str]** | | [optional] +**projects** | **List[str]** | | [optional] **stocks** | [**List[NodeStocksPayload]**](NodeStocksPayload.md) | | [optional] +**organizations** | **List[int]** | | [optional] ## Example @@ -23,7 +26,7 @@ json = "{}" # create an instance of NodeModel from a JSON string node_model_instance = NodeModel.from_json(json) # print the JSON string representation of the object -print NodeModel.to_json() +print(NodeModel.to_json()) # convert the object into a dict node_model_dict = node_model_instance.to_dict() diff --git a/docs/NodePayloadModel.md b/docs/NodePayloadModel.md index 7952ec0..eae8b16 100644 --- a/docs/NodePayloadModel.md +++ b/docs/NodePayloadModel.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of NodePayloadModel from a JSON string node_payload_model_instance = NodePayloadModel.from_json(json) # print the JSON string representation of the object -print NodePayloadModel.to_json() +print(NodePayloadModel.to_json()) # convert the object into a dict node_payload_model_dict = node_payload_model_instance.to_dict() diff --git a/docs/NodePowerUsageModel.md b/docs/NodePowerUsageModel.md index b29761a..2bdb00c 100644 --- a/docs/NodePowerUsageModel.md +++ b/docs/NodePowerUsageModel.md @@ -11,7 +11,10 @@ Name | Type | Description | Notes **status** | **str** | | [optional] **provision_date** | **datetime** | | [optional] **sunset_date** | **datetime** | | [optional] +**flavors** | **List[str]** | | [optional] +**projects** | **List[str]** | | [optional] **stocks** | [**List[NodeStocksPayload]**](NodeStocksPayload.md) | | [optional] +**organizations** | **List[int]** | | [optional] **power_usages** | [**PowerUsageModel**](PowerUsageModel.md) | | [optional] ## Example @@ -24,7 +27,7 @@ json = "{}" # create an instance of NodePowerUsageModel from a JSON string node_power_usage_model_instance = NodePowerUsageModel.from_json(json) # print the JSON string representation of the object -print NodePowerUsageModel.to_json() +print(NodePowerUsageModel.to_json()) # convert the object into a dict node_power_usage_model_dict = node_power_usage_model_instance.to_dict() diff --git a/docs/NodeResponseModel.md b/docs/NodeResponseModel.md index 33432ee..5fa5691 100644 --- a/docs/NodeResponseModel.md +++ b/docs/NodeResponseModel.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of NodeResponseModel from a JSON string node_response_model_instance = NodeResponseModel.from_json(json) # print the JSON string representation of the object -print NodeResponseModel.to_json() +print(NodeResponseModel.to_json()) # convert the object into a dict node_response_model_dict = node_response_model_instance.to_dict() diff --git a/docs/NodeStockPayloadModel.md b/docs/NodeStockPayloadModel.md index 2686a7c..9ff1d0a 100644 --- a/docs/NodeStockPayloadModel.md +++ b/docs/NodeStockPayloadModel.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of NodeStockPayloadModel from a JSON string node_stock_payload_model_instance = NodeStockPayloadModel.from_json(json) # print the JSON string representation of the object -print NodeStockPayloadModel.to_json() +print(NodeStockPayloadModel.to_json()) # convert the object into a dict node_stock_payload_model_dict = node_stock_payload_model_instance.to_dict() diff --git a/docs/NodeStockResponseModel.md b/docs/NodeStockResponseModel.md index f767566..426cce4 100644 --- a/docs/NodeStockResponseModel.md +++ b/docs/NodeStockResponseModel.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of NodeStockResponseModel from a JSON string node_stock_response_model_instance = NodeStockResponseModel.from_json(json) # print the JSON string representation of the object -print NodeStockResponseModel.to_json() +print(NodeStockResponseModel.to_json()) # convert the object into a dict node_stock_response_model_dict = node_stock_response_model_instance.to_dict() diff --git a/docs/NodeStocksPayload.md b/docs/NodeStocksPayload.md index a75edc1..3ac0ac7 100644 --- a/docs/NodeStocksPayload.md +++ b/docs/NodeStocksPayload.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of NodeStocksPayload from a JSON string node_stocks_payload_instance = NodeStocksPayload.from_json(json) # print the JSON string representation of the object -print NodeStocksPayload.to_json() +print(NodeStocksPayload.to_json()) # convert the object into a dict node_stocks_payload_dict = node_stocks_payload_instance.to_dict() diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 2aaf5fa..b01382a 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -6,10 +6,11 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**get_organization_info**](OrganizationApi.md#get_organization_info) | **GET** /auth/organizations | Organization Info [**remove_a_member_from_organization**](OrganizationApi.md#remove_a_member_from_organization) | **POST** /auth/organizations/remove-member | Remove a member from organization +[**update_organization_info**](OrganizationApi.md#update_organization_info) | **PUT** /auth/organizations/update | Update organization info # **get_organization_info** -> OrganizationModel get_organization_info() +> GetOrganizationResponseModel get_organization_info() Organization Info @@ -20,7 +21,7 @@ Organization Info ```python import hyperstack -from hyperstack.models.organization_model import OrganizationModel +from hyperstack.models.get_organization_response_model import GetOrganizationResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -69,7 +70,7 @@ This endpoint does not need any parameter. ### Return type -[**OrganizationModel**](OrganizationModel.md) +[**GetOrganizationResponseModel**](GetOrganizationResponseModel.md) ### Authorization @@ -84,7 +85,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Successfully retrieved organizations info | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | @@ -92,7 +93,7 @@ This endpoint does not need any parameter. [[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_a_member_from_organization** -> RemoveMemberResponse remove_a_member_from_organization(payload) +> RemoveMemberFromOrganizationResponseModel remove_a_member_from_organization(payload) Remove a member from organization @@ -103,8 +104,8 @@ Remove a member from organization ```python import hyperstack -from hyperstack.models.remove_member_response import RemoveMemberResponse -from hyperstack.models.removemember import Removemember +from hyperstack.models.remove_member_from_organization_response_model import RemoveMemberFromOrganizationResponseModel +from hyperstack.models.remove_member_payload import RemoveMemberPayload from hyperstack.rest import ApiException from pprint import pprint @@ -135,7 +136,7 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.OrganizationApi(api_client) - payload = hyperstack.Removemember() # Removemember | + payload = hyperstack.RemoveMemberPayload() # RemoveMemberPayload | try: # Remove a member from organization @@ -153,11 +154,11 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **payload** | [**Removemember**](Removemember.md)| | + **payload** | [**RemoveMemberPayload**](RemoveMemberPayload.md)| | ### Return type -[**RemoveMemberResponse**](RemoveMemberResponse.md) +[**RemoveMemberFromOrganizationResponseModel**](RemoveMemberFromOrganizationResponseModel.md) ### Authorization @@ -172,7 +173,95 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The member was removed from your organization | - | +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[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_organization_info** +> UpdateOrganizationResponseModel update_organization_info(payload) + +Update organization info + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.update_organization_payload import UpdateOrganizationPayload +from hyperstack.models.update_organization_response_model import UpdateOrganizationResponseModel +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.OrganizationApi(api_client) + payload = hyperstack.UpdateOrganizationPayload() # UpdateOrganizationPayload | + + try: + # Update organization info + api_response = api_instance.update_organization_info(payload) + print("The response of OrganizationApi->update_organization_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling OrganizationApi->update_organization_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | [**UpdateOrganizationPayload**](UpdateOrganizationPayload.md)| | + +### Return type + +[**UpdateOrganizationResponseModel**](UpdateOrganizationResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/OrganizationFields.md b/docs/OrganizationFields.md new file mode 100644 index 0000000..af93a12 --- /dev/null +++ b/docs/OrganizationFields.md @@ -0,0 +1,38 @@ +# OrganizationFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | +**name** | **str** | | +**credit** | **int** | | [optional] +**threshold** | **int** | | [optional] +**total_instances** | **int** | | [optional] +**total_volumes** | **int** | | [optional] +**total_containers** | **int** | | [optional] +**total_clusters** | **int** | | [optional] +**users** | [**List[OrganizationUserResponseModel]**](OrganizationUserResponseModel.md) | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.organization_fields import OrganizationFields + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationFields from a JSON string +organization_fields_instance = OrganizationFields.from_json(json) +# print the JSON string representation of the object +print(OrganizationFields.to_json()) + +# convert the object into a dict +organization_fields_dict = organization_fields_instance.to_dict() +# create an instance of OrganizationFields from a dict +organization_fields_form_dict = organization_fields.from_dict(organization_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationInfoModel.md b/docs/OrganizationInfoModel.md deleted file mode 100644 index fc6a0d4..0000000 --- a/docs/OrganizationInfoModel.md +++ /dev/null @@ -1,32 +0,0 @@ -# OrganizationInfoModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**name** | **str** | | -**users** | [**List[OrganizationUserModel]**](OrganizationUserModel.md) | | [optional] -**created_at** | **datetime** | | [optional] - -## Example - -```python -from hyperstack.models.organization_info_model import OrganizationInfoModel - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationInfoModel from a JSON string -organization_info_model_instance = OrganizationInfoModel.from_json(json) -# print the JSON string representation of the object -print OrganizationInfoModel.to_json() - -# convert the object into a dict -organization_info_model_dict = organization_info_model_instance.to_dict() -# create an instance of OrganizationInfoModel from a dict -organization_info_model_form_dict = organization_info_model.from_dict(organization_info_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationModel.md b/docs/OrganizationModel.md deleted file mode 100644 index 3959c6b..0000000 --- a/docs/OrganizationModel.md +++ /dev/null @@ -1,31 +0,0 @@ -# OrganizationModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**organization** | [**OrganizationInfoModel**](OrganizationInfoModel.md) | | [optional] - -## Example - -```python -from hyperstack.models.organization_model import OrganizationModel - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationModel from a JSON string -organization_model_instance = OrganizationModel.from_json(json) -# print the JSON string representation of the object -print OrganizationModel.to_json() - -# convert the object into a dict -organization_model_dict = organization_model_instance.to_dict() -# create an instance of OrganizationModel from a dict -organization_model_form_dict = organization_model.from_dict(organization_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationObjectResponse.md b/docs/OrganizationObjectResponse.md index 9be1b07..906f125 100644 --- a/docs/OrganizationObjectResponse.md +++ b/docs/OrganizationObjectResponse.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of OrganizationObjectResponse from a JSON string organization_object_response_instance = OrganizationObjectResponse.from_json(json) # print the JSON string representation of the object -print OrganizationObjectResponse.to_json() +print(OrganizationObjectResponse.to_json()) # convert the object into a dict organization_object_response_dict = organization_object_response_instance.to_dict() diff --git a/docs/OrganizationResourceList.md b/docs/OrganizationResourceList.md deleted file mode 100644 index 65bb118..0000000 --- a/docs/OrganizationResourceList.md +++ /dev/null @@ -1,31 +0,0 @@ -# OrganizationResourceList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**organizations** | [**List[OrganizationResources]**](OrganizationResources.md) | | [optional] - -## Example - -```python -from hyperstack.models.organization_resource_list import OrganizationResourceList - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationResourceList from a JSON string -organization_resource_list_instance = OrganizationResourceList.from_json(json) -# print the JSON string representation of the object -print OrganizationResourceList.to_json() - -# convert the object into a dict -organization_resource_list_dict = organization_resource_list_instance.to_dict() -# create an instance of OrganizationResourceList from a dict -organization_resource_list_form_dict = organization_resource_list.from_dict(organization_resource_list_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationResourceResponse.md b/docs/OrganizationResourceResponse.md deleted file mode 100644 index 4642874..0000000 --- a/docs/OrganizationResourceResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# OrganizationResourceResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**organization** | [**OrganizationResources**](OrganizationResources.md) | | [optional] - -## Example - -```python -from hyperstack.models.organization_resource_response import OrganizationResourceResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationResourceResponse from a JSON string -organization_resource_response_instance = OrganizationResourceResponse.from_json(json) -# print the JSON string representation of the object -print OrganizationResourceResponse.to_json() - -# convert the object into a dict -organization_resource_response_dict = organization_resource_response_instance.to_dict() -# create an instance of OrganizationResourceResponse from a dict -organization_resource_response_form_dict = organization_resource_response.from_dict(organization_resource_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationResources.md b/docs/OrganizationResources.md deleted file mode 100644 index 3306996..0000000 --- a/docs/OrganizationResources.md +++ /dev/null @@ -1,30 +0,0 @@ -# OrganizationResources - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**organization_id** | **int** | | [optional] -**environments** | [**List[EnvrionmentResources]**](EnvrionmentResources.md) | | [optional] - -## Example - -```python -from hyperstack.models.organization_resources import OrganizationResources - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationResources from a JSON string -organization_resources_instance = OrganizationResources.from_json(json) -# print the JSON string representation of the object -print OrganizationResources.to_json() - -# convert the object into a dict -organization_resources_dict = organization_resources_instance.to_dict() -# create an instance of OrganizationResources from a dict -organization_resources_form_dict = organization_resources.from_dict(organization_resources_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationResponseModel.md b/docs/OrganizationResponseModel.md deleted file mode 100644 index 5adb4f7..0000000 --- a/docs/OrganizationResponseModel.md +++ /dev/null @@ -1,31 +0,0 @@ -# OrganizationResponseModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**organizations** | [**OrganizationInfoModel**](OrganizationInfoModel.md) | | [optional] - -## Example - -```python -from hyperstack.models.organization_response_model import OrganizationResponseModel - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationResponseModel from a JSON string -organization_response_model_instance = OrganizationResponseModel.from_json(json) -# print the JSON string representation of the object -print OrganizationResponseModel.to_json() - -# convert the object into a dict -organization_response_model_dict = organization_response_model_instance.to_dict() -# create an instance of OrganizationResponseModel from a dict -organization_response_model_form_dict = organization_response_model.from_dict(organization_response_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationUserModel.md b/docs/OrganizationUserModel.md deleted file mode 100644 index b4a3ae8..0000000 --- a/docs/OrganizationUserModel.md +++ /dev/null @@ -1,36 +0,0 @@ -# OrganizationUserModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**sub** | **str** | | [optional] -**email** | **str** | | [optional] -**username** | **str** | | [optional] -**name** | **str** | | [optional] -**role** | **str** | | [optional] -**rbac_roles** | [**List[RBACRoleFieldforOrganization]**](RBACRoleFieldforOrganization.md) | | [optional] -**joined_at** | **datetime** | | [optional] - -## Example - -```python -from hyperstack.models.organization_user_model import OrganizationUserModel - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationUserModel from a JSON string -organization_user_model_instance = OrganizationUserModel.from_json(json) -# print the JSON string representation of the object -print OrganizationUserModel.to_json() - -# convert the object into a dict -organization_user_model_dict = organization_user_model_instance.to_dict() -# create an instance of OrganizationUserModel from a dict -organization_user_model_form_dict = organization_user_model.from_dict(organization_user_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrganizationUserResponseModel.md b/docs/OrganizationUserResponseModel.md new file mode 100644 index 0000000..e62621a --- /dev/null +++ b/docs/OrganizationUserResponseModel.md @@ -0,0 +1,37 @@ +# OrganizationUserResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**sub** | **str** | | [optional] +**email** | **str** | | [optional] +**username** | **str** | | [optional] +**name** | **str** | | [optional] +**role** | **str** | | [optional] +**rbac_roles** | [**List[RbacRoleField]**](RbacRoleField.md) | | [optional] +**joined_at** | **datetime** | | [optional] +**last_login** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.organization_user_response_model import OrganizationUserResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of OrganizationUserResponseModel from a JSON string +organization_user_response_model_instance = OrganizationUserResponseModel.from_json(json) +# print the JSON string representation of the object +print(OrganizationUserResponseModel.to_json()) + +# convert the object into a dict +organization_user_response_model_dict = organization_user_response_model_instance.to_dict() +# create an instance of OrganizationUserResponseModel from a dict +organization_user_response_model_form_dict = organization_user_response_model.from_dict(organization_user_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationsResponseModel.md b/docs/OrganizationsResponseModel.md deleted file mode 100644 index dcb978b..0000000 --- a/docs/OrganizationsResponseModel.md +++ /dev/null @@ -1,31 +0,0 @@ -# OrganizationsResponseModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**organizations** | [**List[OrganizationInfoModel]**](OrganizationInfoModel.md) | | [optional] - -## Example - -```python -from hyperstack.models.organizations_response_model import OrganizationsResponseModel - -# TODO update the JSON string below -json = "{}" -# create an instance of OrganizationsResponseModel from a JSON string -organizations_response_model_instance = OrganizationsResponseModel.from_json(json) -# print the JSON string representation of the object -print OrganizationsResponseModel.to_json() - -# convert the object into a dict -organizations_response_model_dict = organizations_response_model_instance.to_dict() -# create an instance of OrganizationsResponseModel from a dict -organizations_response_model_form_dict = organizations_response_model.from_dict(organizations_response_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OverviewInfo.md b/docs/OverviewInfo.md index 4184dc8..1d18098 100644 --- a/docs/OverviewInfo.md +++ b/docs/OverviewInfo.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of OverviewInfo from a JSON string overview_info_instance = OverviewInfo.from_json(json) # print the JSON string representation of the object -print OverviewInfo.to_json() +print(OverviewInfo.to_json()) # convert the object into a dict overview_info_dict = overview_info_instance.to_dict() diff --git a/docs/PaymentDetailsFields.md b/docs/PaymentDetailsFields.md index 661f1b4..202ae1c 100644 --- a/docs/PaymentDetailsFields.md +++ b/docs/PaymentDetailsFields.md @@ -25,7 +25,7 @@ json = "{}" # create an instance of PaymentDetailsFields from a JSON string payment_details_fields_instance = PaymentDetailsFields.from_json(json) # print the JSON string representation of the object -print PaymentDetailsFields.to_json() +print(PaymentDetailsFields.to_json()) # convert the object into a dict payment_details_fields_dict = payment_details_fields_instance.to_dict() diff --git a/docs/PaymentDetailsResponse.md b/docs/PaymentDetailsResponse.md index 9304d4e..0fcc6bc 100644 --- a/docs/PaymentDetailsResponse.md +++ b/docs/PaymentDetailsResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of PaymentDetailsResponse from a JSON string payment_details_response_instance = PaymentDetailsResponse.from_json(json) # print the JSON string representation of the object -print PaymentDetailsResponse.to_json() +print(PaymentDetailsResponse.to_json()) # convert the object into a dict payment_details_response_dict = payment_details_response_instance.to_dict() diff --git a/docs/PaymentInitiateFields.md b/docs/PaymentInitiateFields.md index d3cf61f..57bae96 100644 --- a/docs/PaymentInitiateFields.md +++ b/docs/PaymentInitiateFields.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of PaymentInitiateFields from a JSON string payment_initiate_fields_instance = PaymentInitiateFields.from_json(json) # print the JSON string representation of the object -print PaymentInitiateFields.to_json() +print(PaymentInitiateFields.to_json()) # convert the object into a dict payment_initiate_fields_dict = payment_initiate_fields_instance.to_dict() diff --git a/docs/PaymentInitiatePayload.md b/docs/PaymentInitiatePayload.md index d1ca4d1..fbccd79 100644 --- a/docs/PaymentInitiatePayload.md +++ b/docs/PaymentInitiatePayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of PaymentInitiatePayload from a JSON string payment_initiate_payload_instance = PaymentInitiatePayload.from_json(json) # print the JSON string representation of the object -print PaymentInitiatePayload.to_json() +print(PaymentInitiatePayload.to_json()) # convert the object into a dict payment_initiate_payload_dict = payment_initiate_payload_instance.to_dict() diff --git a/docs/PaymentInitiateResponse.md b/docs/PaymentInitiateResponse.md index c64a5a1..3cb40c3 100644 --- a/docs/PaymentInitiateResponse.md +++ b/docs/PaymentInitiateResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of PaymentInitiateResponse from a JSON string payment_initiate_response_instance = PaymentInitiateResponse.from_json(json) # print the JSON string representation of the object -print PaymentInitiateResponse.to_json() +print(PaymentInitiateResponse.to_json()) # convert the object into a dict payment_initiate_response_dict = payment_initiate_response_instance.to_dict() diff --git a/docs/PermissionApi.md b/docs/PermissionApi.md index 5fbbc74..d8397ae 100644 --- a/docs/PermissionApi.md +++ b/docs/PermissionApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **list_permissions** -> Permissions list_permissions() +> GetPermissionsResponseModel list_permissions() List Permissions @@ -19,7 +19,7 @@ List Permissions ```python import hyperstack -from hyperstack.models.permissions import Permissions +from hyperstack.models.get_permissions_response_model import GetPermissionsResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -68,7 +68,7 @@ This endpoint does not need any parameter. ### Return type -[**Permissions**](Permissions.md) +[**GetPermissionsResponseModel**](GetPermissionsResponseModel.md) ### Authorization diff --git a/docs/PermissionFields.md b/docs/PermissionFields.md index 0823759..22de867 100644 --- a/docs/PermissionFields.md +++ b/docs/PermissionFields.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of PermissionFields from a JSON string permission_fields_instance = PermissionFields.from_json(json) # print the JSON string representation of the object -print PermissionFields.to_json() +print(PermissionFields.to_json()) # convert the object into a dict permission_fields_dict = permission_fields_instance.to_dict() diff --git a/docs/PermissionFieldsforUserPermission.md b/docs/PermissionFieldsforUserPermission.md deleted file mode 100644 index eff2651..0000000 --- a/docs/PermissionFieldsforUserPermission.md +++ /dev/null @@ -1,31 +0,0 @@ -# PermissionFieldsforUserPermission - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**resource** | **str** | | [optional] -**permission** | **str** | | [optional] - -## Example - -```python -from hyperstack.models.permission_fieldsfor_user_permission import PermissionFieldsforUserPermission - -# TODO update the JSON string below -json = "{}" -# create an instance of PermissionFieldsforUserPermission from a JSON string -permission_fieldsfor_user_permission_instance = PermissionFieldsforUserPermission.from_json(json) -# print the JSON string representation of the object -print PermissionFieldsforUserPermission.to_json() - -# convert the object into a dict -permission_fieldsfor_user_permission_dict = permission_fieldsfor_user_permission_instance.to_dict() -# create an instance of PermissionFieldsforUserPermission from a dict -permission_fieldsfor_user_permission_form_dict = permission_fieldsfor_user_permission.from_dict(permission_fieldsfor_user_permission_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PermissionPayload.md b/docs/PermissionPayload.md deleted file mode 100644 index dc3e18f..0000000 --- a/docs/PermissionPayload.md +++ /dev/null @@ -1,32 +0,0 @@ -# PermissionPayload - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**resource** | **str** | | -**permission** | **str** | | -**method** | **str** | | -**endpoint** | **str** | | - -## Example - -```python -from hyperstack.models.permission_payload import PermissionPayload - -# TODO update the JSON string below -json = "{}" -# create an instance of PermissionPayload from a JSON string -permission_payload_instance = PermissionPayload.from_json(json) -# print the JSON string representation of the object -print PermissionPayload.to_json() - -# convert the object into a dict -permission_payload_dict = permission_payload_instance.to_dict() -# create an instance of PermissionPayload from a dict -permission_payload_form_dict = permission_payload.from_dict(permission_payload_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PermissionResponse.md b/docs/PermissionResponse.md deleted file mode 100644 index c0e032f..0000000 --- a/docs/PermissionResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# PermissionResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**permission** | [**PermissionFields**](PermissionFields.md) | | [optional] - -## Example - -```python -from hyperstack.models.permission_response import PermissionResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of PermissionResponse from a JSON string -permission_response_instance = PermissionResponse.from_json(json) -# print the JSON string representation of the object -print PermissionResponse.to_json() - -# convert the object into a dict -permission_response_dict = permission_response_instance.to_dict() -# create an instance of PermissionResponse from a dict -permission_response_form_dict = permission_response.from_dict(permission_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PermissionsforUserPermission.md b/docs/PermissionsforUserPermission.md deleted file mode 100644 index 148d9ff..0000000 --- a/docs/PermissionsforUserPermission.md +++ /dev/null @@ -1,31 +0,0 @@ -# PermissionsforUserPermission - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**permissions** | [**List[PermissionFieldsforUserPermission]**](PermissionFieldsforUserPermission.md) | | [optional] - -## Example - -```python -from hyperstack.models.permissionsfor_user_permission import PermissionsforUserPermission - -# TODO update the JSON string below -json = "{}" -# create an instance of PermissionsforUserPermission from a JSON string -permissionsfor_user_permission_instance = PermissionsforUserPermission.from_json(json) -# print the JSON string representation of the object -print PermissionsforUserPermission.to_json() - -# convert the object into a dict -permissionsfor_user_permission_dict = permissionsfor_user_permission_instance.to_dict() -# create an instance of PermissionsforUserPermission from a dict -permissionsfor_user_permission_form_dict = permissionsfor_user_permission.from_dict(permissionsfor_user_permission_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyApi.md b/docs/PolicyApi.md index e656183..c2c80fe 100644 --- a/docs/PolicyApi.md +++ b/docs/PolicyApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **list_policies** -> Policies list_policies() +> GetPoliciesResponseModel list_policies() List Policies @@ -19,7 +19,7 @@ List Policies ```python import hyperstack -from hyperstack.models.policies import Policies +from hyperstack.models.get_policies_response_model import GetPoliciesResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -68,7 +68,7 @@ This endpoint does not need any parameter. ### Return type -[**Policies**](Policies.md) +[**GetPoliciesResponseModel**](GetPoliciesResponseModel.md) ### Authorization @@ -83,7 +83,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting policies success | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/PolicyFields.md b/docs/PolicyFields.md index 159274e..138aafb 100644 --- a/docs/PolicyFields.md +++ b/docs/PolicyFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of PolicyFields from a JSON string policy_fields_instance = PolicyFields.from_json(json) # print the JSON string representation of the object -print PolicyFields.to_json() +print(PolicyFields.to_json()) # convert the object into a dict policy_fields_dict = policy_fields_instance.to_dict() diff --git a/docs/PolicyPayload.md b/docs/PolicyPayload.md deleted file mode 100644 index d7dff99..0000000 --- a/docs/PolicyPayload.md +++ /dev/null @@ -1,32 +0,0 @@ -# PolicyPayload - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**description** | **str** | | -**is_public** | **bool** | | -**permissions** | **List[int]** | | - -## Example - -```python -from hyperstack.models.policy_payload import PolicyPayload - -# TODO update the JSON string below -json = "{}" -# create an instance of PolicyPayload from a JSON string -policy_payload_instance = PolicyPayload.from_json(json) -# print the JSON string representation of the object -print PolicyPayload.to_json() - -# convert the object into a dict -policy_payload_dict = policy_payload_instance.to_dict() -# create an instance of PolicyPayload from a dict -policy_payload_form_dict = policy_payload.from_dict(policy_payload_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PolicyPermissionFields.md b/docs/PolicyPermissionFields.md index adbf8c5..596f0ae 100644 --- a/docs/PolicyPermissionFields.md +++ b/docs/PolicyPermissionFields.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of PolicyPermissionFields from a JSON string policy_permission_fields_instance = PolicyPermissionFields.from_json(json) # print the JSON string representation of the object -print PolicyPermissionFields.to_json() +print(PolicyPermissionFields.to_json()) # convert the object into a dict policy_permission_fields_dict = policy_permission_fields_instance.to_dict() diff --git a/docs/PolicyResponse.md b/docs/PolicyResponse.md deleted file mode 100644 index c9d9dda..0000000 --- a/docs/PolicyResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# PolicyResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**policy** | [**PolicyFields**](PolicyFields.md) | | [optional] - -## Example - -```python -from hyperstack.models.policy_response import PolicyResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of PolicyResponse from a JSON string -policy_response_instance = PolicyResponse.from_json(json) -# print the JSON string representation of the object -print PolicyResponse.to_json() - -# convert the object into a dict -policy_response_dict = policy_response_instance.to_dict() -# create an instance of PolicyResponse from a dict -policy_response_form_dict = policy_response.from_dict(policy_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PowerUsageModel.md b/docs/PowerUsageModel.md index 204d3ad..af2d36a 100644 --- a/docs/PowerUsageModel.md +++ b/docs/PowerUsageModel.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of PowerUsageModel from a JSON string power_usage_model_instance = PowerUsageModel.from_json(json) # print the JSON string representation of the object -print PowerUsageModel.to_json() +print(PowerUsageModel.to_json()) # convert the object into a dict power_usage_model_dict = power_usage_model_instance.to_dict() diff --git a/docs/PricebookModel.md b/docs/PricebookModel.md index 0882516..9c5c4d7 100644 --- a/docs/PricebookModel.md +++ b/docs/PricebookModel.md @@ -23,7 +23,7 @@ json = "{}" # create an instance of PricebookModel from a JSON string pricebook_model_instance = PricebookModel.from_json(json) # print the JSON string representation of the object -print PricebookModel.to_json() +print(PricebookModel.to_json()) # convert the object into a dict pricebook_model_dict = pricebook_model_instance.to_dict() diff --git a/docs/PricebookResourceObjectResponse.md b/docs/PricebookResourceObjectResponse.md index ddf9662..41910cb 100644 --- a/docs/PricebookResourceObjectResponse.md +++ b/docs/PricebookResourceObjectResponse.md @@ -27,7 +27,7 @@ json = "{}" # create an instance of PricebookResourceObjectResponse from a JSON string pricebook_resource_object_response_instance = PricebookResourceObjectResponse.from_json(json) # print the JSON string representation of the object -print PricebookResourceObjectResponse.to_json() +print(PricebookResourceObjectResponse.to_json()) # convert the object into a dict pricebook_resource_object_response_dict = pricebook_resource_object_response_instance.to_dict() diff --git a/docs/ProfileApi.md b/docs/ProfileApi.md index cf5121c..01e569c 100644 --- a/docs/ProfileApi.md +++ b/docs/ProfileApi.md @@ -4,16 +4,18 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_profile**](ProfileApi.md#create_profile) | **POST** /core/profiles | Create a profile -[**delete_profile**](ProfileApi.md#delete_profile) | **DELETE** /core/profiles/{id} | Delete Profile -[**get_a_profile_detail**](ProfileApi.md#get_a_profile_detail) | **GET** /core/profiles/{id} | Get a Profile Detail -[**get_profile_list**](ProfileApi.md#get_profile_list) | **GET** /core/profiles | Get Profile List +[**create_profile**](ProfileApi.md#create_profile) | **POST** /core/profiles | Create profile +[**delete_profile**](ProfileApi.md#delete_profile) | **DELETE** /core/profiles/{id} | Delete profile +[**list_profiles**](ProfileApi.md#list_profiles) | **GET** /core/profiles | List profiles +[**retrieve_profile_details**](ProfileApi.md#retrieve_profile_details) | **GET** /core/profiles/{id} | Retrieve profile details # **create_profile** > CreateProfileResponse create_profile(payload) -Create a profile +Create profile + +Creates a provisioning profile to save the configuration of a virtual machine for future use. Include the profile name, description, and virtual machine configuration details in the request body. For more information about virtual machine profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). ### Example @@ -57,7 +59,7 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.CreateProfilePayload() # CreateProfilePayload | try: - # Create a profile + # Create profile api_response = api_instance.create_profile(payload) print("The response of ProfileApi->create_profile:\n") pprint(api_response) @@ -102,7 +104,9 @@ Name | Type | Description | Notes # **delete_profile** > ResponseModel delete_profile(id) -Delete Profile +Delete profile + +Permanently deletes a provisioning profile. Supply the profile ID in the path to delete the specified profile. ### Example @@ -145,7 +149,7 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete Profile + # Delete profile api_response = api_instance.delete_profile(id) print("The response of ProfileApi->delete_profile:\n") pprint(api_response) @@ -179,7 +183,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Profile deleted successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -187,10 +191,12 @@ Name | Type | Description | Notes [[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_a_profile_detail** -> CreateProfileResponse get_a_profile_detail(id) +# **list_profiles** +> ProfileListResponse list_profiles() -Get a Profile Detail +List profiles + +Returns a list of your existing provisioning profiles, providing virtual machine configuration details for each. For additional information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles#retrieve-a-list-of-profiles). ### Example @@ -199,7 +205,7 @@ Get a Profile Detail ```python import hyperstack -from hyperstack.models.create_profile_response import CreateProfileResponse +from hyperstack.models.profile_list_response import ProfileListResponse from hyperstack.rest import ApiException from pprint import pprint @@ -230,29 +236,25 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.ProfileApi(api_client) - id = 56 # int | try: - # Get a Profile Detail - api_response = api_instance.get_a_profile_detail(id) - print("The response of ProfileApi->get_a_profile_detail:\n") + # List profiles + api_response = api_instance.list_profiles() + print("The response of ProfileApi->list_profiles:\n") pprint(api_response) except Exception as e: - print("Exception when calling ProfileApi->get_a_profile_detail: %s\n" % e) + print("Exception when calling ProfileApi->list_profiles: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| | +This endpoint does not need any parameter. ### Return type -[**CreateProfileResponse**](CreateProfileResponse.md) +[**ProfileListResponse**](ProfileListResponse.md) ### Authorization @@ -267,18 +269,19 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting profile detail success. | - | +**200** | Getting profiles success. | - | **400** | Bad Request | - | **401** | Unauthorized | - | -**404** | Not Found | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_profile_list** -> ProfileListResponse get_profile_list() +# **retrieve_profile_details** +> CreateProfileResponse retrieve_profile_details(id) + +Retrieve profile details -Get Profile List +Retrieves details for an existing provisioning profile by supplying the profile ID in the request path. For more information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). ### Example @@ -287,7 +290,7 @@ Get Profile List ```python import hyperstack -from hyperstack.models.profile_list_response import ProfileListResponse +from hyperstack.models.create_profile_response import CreateProfileResponse from hyperstack.rest import ApiException from pprint import pprint @@ -318,25 +321,29 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.ProfileApi(api_client) + id = 56 # int | try: - # Get Profile List - api_response = api_instance.get_profile_list() - print("The response of ProfileApi->get_profile_list:\n") + # Retrieve profile details + api_response = api_instance.retrieve_profile_details(id) + print("The response of ProfileApi->retrieve_profile_details:\n") pprint(api_response) except Exception as e: - print("Exception when calling ProfileApi->get_profile_list: %s\n" % e) + print("Exception when calling ProfileApi->retrieve_profile_details: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | ### Return type -[**ProfileListResponse**](ProfileListResponse.md) +[**CreateProfileResponse**](CreateProfileResponse.md) ### Authorization @@ -351,9 +358,10 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting profiles success. | - | +**200** | Profile details retrieved successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**404** | Not Found | - | **500** | Internal Server Error | - | [[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/ProfileFields.md b/docs/ProfileFields.md index 4377fa0..7776061 100644 --- a/docs/ProfileFields.md +++ b/docs/ProfileFields.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of ProfileFields from a JSON string profile_fields_instance = ProfileFields.from_json(json) # print the JSON string representation of the object -print ProfileFields.to_json() +print(ProfileFields.to_json()) # convert the object into a dict profile_fields_dict = profile_fields_instance.to_dict() diff --git a/docs/ProfileListResponse.md b/docs/ProfileListResponse.md index db26527..dee03a1 100644 --- a/docs/ProfileListResponse.md +++ b/docs/ProfileListResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of ProfileListResponse from a JSON string profile_list_response_instance = ProfileListResponse.from_json(json) # print the JSON string representation of the object -print ProfileListResponse.to_json() +print(ProfileListResponse.to_json()) # convert the object into a dict profile_list_response_dict = profile_list_response_instance.to_dict() diff --git a/docs/ProfileObjectFields.md b/docs/ProfileObjectFields.md index 2e0ccd6..d3d420a 100644 --- a/docs/ProfileObjectFields.md +++ b/docs/ProfileObjectFields.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of ProfileObjectFields from a JSON string profile_object_fields_instance = ProfileObjectFields.from_json(json) # print the JSON string representation of the object -print ProfileObjectFields.to_json() +print(ProfileObjectFields.to_json()) # convert the object into a dict profile_object_fields_dict = profile_object_fields_instance.to_dict() diff --git a/docs/RBACRole.md b/docs/RBACRole.md deleted file mode 100644 index 35b05c0..0000000 --- a/docs/RBACRole.md +++ /dev/null @@ -1,31 +0,0 @@ -# RBACRole - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**role** | [**RBACRoleFields**](RBACRoleFields.md) | | [optional] - -## Example - -```python -from hyperstack.models.rbac_role import RBACRole - -# TODO update the JSON string below -json = "{}" -# create an instance of RBACRole from a JSON string -rbac_role_instance = RBACRole.from_json(json) -# print the JSON string representation of the object -print RBACRole.to_json() - -# convert the object into a dict -rbac_role_dict = rbac_role_instance.to_dict() -# create an instance of RBACRole from a dict -rbac_role_form_dict = rbac_role.from_dict(rbac_role_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RBACRoleFieldforOrganization.md b/docs/RBACRoleFieldforOrganization.md deleted file mode 100644 index 4cadacc..0000000 --- a/docs/RBACRoleFieldforOrganization.md +++ /dev/null @@ -1,29 +0,0 @@ -# RBACRoleFieldforOrganization - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | [optional] - -## Example - -```python -from hyperstack.models.rbac_role_fieldfor_organization import RBACRoleFieldforOrganization - -# TODO update the JSON string below -json = "{}" -# create an instance of RBACRoleFieldforOrganization from a JSON string -rbac_role_fieldfor_organization_instance = RBACRoleFieldforOrganization.from_json(json) -# print the JSON string representation of the object -print RBACRoleFieldforOrganization.to_json() - -# convert the object into a dict -rbac_role_fieldfor_organization_dict = rbac_role_fieldfor_organization_instance.to_dict() -# create an instance of RBACRoleFieldforOrganization from a dict -rbac_role_fieldfor_organization_form_dict = rbac_role_fieldfor_organization.from_dict(rbac_role_fieldfor_organization_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RBACRoleFields.md b/docs/RBACRoleFields.md index a621930..0a19c6e 100644 --- a/docs/RBACRoleFields.md +++ b/docs/RBACRoleFields.md @@ -1,4 +1,4 @@ -# RBACRoleFields +# RbacRoleFields ## Properties @@ -15,18 +15,18 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.rbac_role_fields import RBACRoleFields +from hyperstack.models.rbac_role_fields import RbacRoleFields # TODO update the JSON string below json = "{}" -# create an instance of RBACRoleFields from a JSON string -rbac_role_fields_instance = RBACRoleFields.from_json(json) +# create an instance of RbacRoleFields from a JSON string +rbac_role_fields_instance = RbacRoleFields.from_json(json) # print the JSON string representation of the object -print RBACRoleFields.to_json() +print(RbacRoleFields.to_json()) # convert the object into a dict rbac_role_fields_dict = rbac_role_fields_instance.to_dict() -# create an instance of RBACRoleFields from a dict +# create an instance of RbacRoleFields from a dict rbac_role_fields_form_dict = rbac_role_fields.from_dict(rbac_role_fields_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RBACRolePayload.md b/docs/RBACRolePayload.md deleted file mode 100644 index 255f7b0..0000000 --- a/docs/RBACRolePayload.md +++ /dev/null @@ -1,32 +0,0 @@ -# RBACRolePayload - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**description** | **str** | | -**policies** | **List[int]** | | [optional] -**permissions** | **List[int]** | | [optional] - -## Example - -```python -from hyperstack.models.rbac_role_payload import RBACRolePayload - -# TODO update the JSON string below -json = "{}" -# create an instance of RBACRolePayload from a JSON string -rbac_role_payload_instance = RBACRolePayload.from_json(json) -# print the JSON string representation of the object -print RBACRolePayload.to_json() - -# convert the object into a dict -rbac_role_payload_dict = rbac_role_payload_instance.to_dict() -# create an instance of RBACRolePayload from a dict -rbac_role_payload_form_dict = rbac_role_payload.from_dict(rbac_role_payload_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RBACRoles.md b/docs/RBACRoles.md deleted file mode 100644 index 62cf182..0000000 --- a/docs/RBACRoles.md +++ /dev/null @@ -1,31 +0,0 @@ -# RBACRoles - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**roles** | [**List[RBACRoleFields]**](RBACRoleFields.md) | | [optional] - -## Example - -```python -from hyperstack.models.rbac_roles import RBACRoles - -# TODO update the JSON string below -json = "{}" -# create an instance of RBACRoles from a JSON string -rbac_roles_instance = RBACRoles.from_json(json) -# print the JSON string representation of the object -print RBACRoles.to_json() - -# convert the object into a dict -rbac_roles_dict = rbac_roles_instance.to_dict() -# create an instance of RBACRoles from a dict -rbac_roles_form_dict = rbac_roles.from_dict(rbac_roles_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RbacRoleApi.md b/docs/RbacRoleApi.md index ebeed7c..f829e68 100644 --- a/docs/RbacRoleApi.md +++ b/docs/RbacRoleApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description # **create_rbac_role** -> RBACRole create_rbac_role(payload) +> RbacRoleDetailResponseModel create_rbac_role(payload) Create RBAC Role @@ -23,8 +23,8 @@ Create RBAC Role ```python import hyperstack -from hyperstack.models.rbac_role import RBACRole -from hyperstack.models.rbac_role_payload import RBACRolePayload +from hyperstack.models.create_update_rbac_role_payload import CreateUpdateRbacRolePayload +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -55,7 +55,7 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.RbacRoleApi(api_client) - payload = hyperstack.RBACRolePayload() # RBACRolePayload | + payload = hyperstack.CreateUpdateRbacRolePayload() # CreateUpdateRbacRolePayload | try: # Create RBAC Role @@ -73,11 +73,11 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **payload** | [**RBACRolePayload**](RBACRolePayload.md)| | + **payload** | [**CreateUpdateRbacRolePayload**](CreateUpdateRbacRolePayload.md)| | ### Return type -[**RBACRole**](RBACRole.md) +[**RbacRoleDetailResponseModel**](RbacRoleDetailResponseModel.md) ### Authorization @@ -92,7 +92,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Creating RBAC role success | - | +**201** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **409** | Conflict | - | @@ -101,7 +101,7 @@ Name | Type | Description | Notes [[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_a_rbac_role** -> ResponseModel delete_a_rbac_role(id) +> CommonResponseModel delete_a_rbac_role(id) Delete a RBAC Role @@ -112,7 +112,7 @@ Delete a RBAC Role ```python import hyperstack -from hyperstack.models.response_model import ResponseModel +from hyperstack.models.common_response_model import CommonResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -165,7 +165,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseModel**](ResponseModel.md) +[**CommonResponseModel**](CommonResponseModel.md) ### Authorization @@ -180,7 +180,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | RBAC Role deleted successfully | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -189,7 +189,7 @@ Name | Type | Description | Notes [[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_a_rbac_role_detail** -> RBACRole get_a_rbac_role_detail(id) +> RbacRoleDetailResponseModel get_a_rbac_role_detail(id) Get a RBAC Role Detail @@ -200,7 +200,7 @@ Get a RBAC Role Detail ```python import hyperstack -from hyperstack.models.rbac_role import RBACRole +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -253,7 +253,7 @@ Name | Type | Description | Notes ### Return type -[**RBACRole**](RBACRole.md) +[**RbacRoleDetailResponseModel**](RbacRoleDetailResponseModel.md) ### Authorization @@ -268,7 +268,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting RBAC role detail success | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -277,7 +277,7 @@ Name | Type | Description | Notes [[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_rbac_roles** -> RBACRoles list_rbac_roles() +> GetRbacRolesResponseModel list_rbac_roles() List RBAC Roles @@ -288,7 +288,7 @@ List RBAC Roles ```python import hyperstack -from hyperstack.models.rbac_roles import RBACRoles +from hyperstack.models.get_rbac_roles_response_model import GetRbacRolesResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -337,7 +337,7 @@ This endpoint does not need any parameter. ### Return type -[**RBACRoles**](RBACRoles.md) +[**GetRbacRolesResponseModel**](GetRbacRolesResponseModel.md) ### Authorization @@ -352,7 +352,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting RBAC roles success | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | @@ -360,7 +360,7 @@ This endpoint does not need any parameter. [[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_a_rbac_role** -> RBACRole update_a_rbac_role(id, payload) +> RbacRoleDetailResponseModel update_a_rbac_role(id, payload) Update a RBAC Role @@ -371,8 +371,8 @@ Update a RBAC Role ```python import hyperstack -from hyperstack.models.rbac_role import RBACRole -from hyperstack.models.rbac_role_payload import RBACRolePayload +from hyperstack.models.create_update_rbac_role_payload import CreateUpdateRbacRolePayload +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -404,7 +404,7 @@ with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.RbacRoleApi(api_client) id = 56 # int | - payload = hyperstack.RBACRolePayload() # RBACRolePayload | + payload = hyperstack.CreateUpdateRbacRolePayload() # CreateUpdateRbacRolePayload | try: # Update a RBAC Role @@ -423,11 +423,11 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **int**| | - **payload** | [**RBACRolePayload**](RBACRolePayload.md)| | + **payload** | [**CreateUpdateRbacRolePayload**](CreateUpdateRbacRolePayload.md)| | ### Return type -[**RBACRole**](RBACRole.md) +[**RbacRoleDetailResponseModel**](RbacRoleDetailResponseModel.md) ### Authorization @@ -442,7 +442,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | RBAC Role updated successfully | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/RbacRoleDetailResponseModel.md b/docs/RbacRoleDetailResponseModel.md new file mode 100644 index 0000000..04bbd11 --- /dev/null +++ b/docs/RbacRoleDetailResponseModel.md @@ -0,0 +1,31 @@ +# RbacRoleDetailResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**role** | [**RbacRoleFields**](RbacRoleFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of RbacRoleDetailResponseModel from a JSON string +rbac_role_detail_response_model_instance = RbacRoleDetailResponseModel.from_json(json) +# print the JSON string representation of the object +print(RbacRoleDetailResponseModel.to_json()) + +# convert the object into a dict +rbac_role_detail_response_model_dict = rbac_role_detail_response_model_instance.to_dict() +# create an instance of RbacRoleDetailResponseModel from a dict +rbac_role_detail_response_model_form_dict = rbac_role_detail_response_model.from_dict(rbac_role_detail_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RbacRoleField.md b/docs/RbacRoleField.md new file mode 100644 index 0000000..ec97472 --- /dev/null +++ b/docs/RbacRoleField.md @@ -0,0 +1,29 @@ +# RbacRoleField + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.rbac_role_field import RbacRoleField + +# TODO update the JSON string below +json = "{}" +# create an instance of RbacRoleField from a JSON string +rbac_role_field_instance = RbacRoleField.from_json(json) +# print the JSON string representation of the object +print(RbacRoleField.to_json()) + +# convert the object into a dict +rbac_role_field_dict = rbac_role_field_instance.to_dict() +# create an instance of RbacRoleField from a dict +rbac_role_field_form_dict = rbac_role_field.from_dict(rbac_role_field_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RefreshToken.md b/docs/RefreshTokenPayload.md similarity index 50% rename from docs/RefreshToken.md rename to docs/RefreshTokenPayload.md index 31edf28..8ead1f4 100644 --- a/docs/RefreshToken.md +++ b/docs/RefreshTokenPayload.md @@ -1,4 +1,4 @@ -# RefreshToken +# RefreshTokenPayload ## Properties @@ -11,19 +11,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.refresh_token import RefreshToken +from hyperstack.models.refresh_token_payload import RefreshTokenPayload # TODO update the JSON string below json = "{}" -# create an instance of RefreshToken from a JSON string -refresh_token_instance = RefreshToken.from_json(json) +# create an instance of RefreshTokenPayload from a JSON string +refresh_token_payload_instance = RefreshTokenPayload.from_json(json) # print the JSON string representation of the object -print RefreshToken.to_json() +print(RefreshTokenPayload.to_json()) # convert the object into a dict -refresh_token_dict = refresh_token_instance.to_dict() -# create an instance of RefreshToken from a dict -refresh_token_form_dict = refresh_token.from_dict(refresh_token_dict) +refresh_token_payload_dict = refresh_token_payload_instance.to_dict() +# create an instance of RefreshTokenPayload from a dict +refresh_token_payload_form_dict = refresh_token_payload.from_dict(refresh_token_payload_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RegionApi.md b/docs/RegionApi.md index 6a38943..9d91d24 100644 --- a/docs/RegionApi.md +++ b/docs/RegionApi.md @@ -4,13 +4,15 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getting_regions**](RegionApi.md#getting_regions) | **GET** /core/regions | Getting regions +[**list_regions**](RegionApi.md#list_regions) | **GET** /core/regions | List regions -# **getting_regions** -> Regions getting_regions() +# **list_regions** +> Regions list_regions() -Getting regions +List regions + +Lists the currently available regions, each representing a distinct geographic location housing a data center. For additional information on regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions). ### Example @@ -52,12 +54,12 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.RegionApi(api_client) try: - # Getting regions - api_response = api_instance.getting_regions() - print("The response of RegionApi->getting_regions:\n") + # List regions + api_response = api_instance.list_regions() + print("The response of RegionApi->list_regions:\n") pprint(api_response) except Exception as e: - print("Exception when calling RegionApi->getting_regions: %s\n" % e) + print("Exception when calling RegionApi->list_regions: %s\n" % e) ``` @@ -83,7 +85,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting regions successful. | - | +**200** | Successful retrieval of regions list. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/RegionFields.md b/docs/RegionFields.md index 8a71ce9..eab6840 100644 --- a/docs/RegionFields.md +++ b/docs/RegionFields.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of RegionFields from a JSON string region_fields_instance = RegionFields.from_json(json) # print the JSON string representation of the object -print RegionFields.to_json() +print(RegionFields.to_json()) # convert the object into a dict region_fields_dict = region_fields_instance.to_dict() diff --git a/docs/RegionPayload.md b/docs/RegionPayload.md index 85f505f..a576707 100644 --- a/docs/RegionPayload.md +++ b/docs/RegionPayload.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of RegionPayload from a JSON string region_payload_instance = RegionPayload.from_json(json) # print the JSON string representation of the object -print RegionPayload.to_json() +print(RegionPayload.to_json()) # convert the object into a dict region_payload_dict = region_payload_instance.to_dict() diff --git a/docs/RegionResponse.md b/docs/RegionResponse.md index 36e9268..bc71bc4 100644 --- a/docs/RegionResponse.md +++ b/docs/RegionResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of RegionResponse from a JSON string region_response_instance = RegionResponse.from_json(json) # print the JSON string representation of the object -print RegionResponse.to_json() +print(RegionResponse.to_json()) # convert the object into a dict region_response_dict = region_response_instance.to_dict() diff --git a/docs/Regions.md b/docs/Regions.md index 0ecfb91..608e1d3 100644 --- a/docs/Regions.md +++ b/docs/Regions.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Regions from a JSON string regions_instance = Regions.from_json(json) # print the JSON string representation of the object -print Regions.to_json() +print(Regions.to_json()) # convert the object into a dict regions_dict = regions_instance.to_dict() diff --git a/docs/RemoveMemberFromOrganizationResponseModel.md b/docs/RemoveMemberFromOrganizationResponseModel.md new file mode 100644 index 0000000..259181c --- /dev/null +++ b/docs/RemoveMemberFromOrganizationResponseModel.md @@ -0,0 +1,30 @@ +# RemoveMemberFromOrganizationResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.remove_member_from_organization_response_model import RemoveMemberFromOrganizationResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveMemberFromOrganizationResponseModel from a JSON string +remove_member_from_organization_response_model_instance = RemoveMemberFromOrganizationResponseModel.from_json(json) +# print the JSON string representation of the object +print(RemoveMemberFromOrganizationResponseModel.to_json()) + +# convert the object into a dict +remove_member_from_organization_response_model_dict = remove_member_from_organization_response_model_instance.to_dict() +# create an instance of RemoveMemberFromOrganizationResponseModel from a dict +remove_member_from_organization_response_model_form_dict = remove_member_from_organization_response_model.from_dict(remove_member_from_organization_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemoveMemberPayload.md b/docs/RemoveMemberPayload.md new file mode 100644 index 0000000..e0a60af --- /dev/null +++ b/docs/RemoveMemberPayload.md @@ -0,0 +1,29 @@ +# RemoveMemberPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | + +## Example + +```python +from hyperstack.models.remove_member_payload import RemoveMemberPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of RemoveMemberPayload from a JSON string +remove_member_payload_instance = RemoveMemberPayload.from_json(json) +# print the JSON string representation of the object +print(RemoveMemberPayload.to_json()) + +# convert the object into a dict +remove_member_payload_dict = remove_member_payload_instance.to_dict() +# create an instance of RemoveMemberPayload from a dict +remove_member_payload_form_dict = remove_member_payload.from_dict(remove_member_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RemoveMemberResponse.md b/docs/RemoveMemberResponse.md deleted file mode 100644 index 4f40225..0000000 --- a/docs/RemoveMemberResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# RemoveMemberResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] - -## Example - -```python -from hyperstack.models.remove_member_response import RemoveMemberResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of RemoveMemberResponse from a JSON string -remove_member_response_instance = RemoveMemberResponse.from_json(json) -# print the JSON string representation of the object -print RemoveMemberResponse.to_json() - -# convert the object into a dict -remove_member_response_dict = remove_member_response_instance.to_dict() -# create an instance of RemoveMemberResponse from a dict -remove_member_response_form_dict = remove_member_response.from_dict(remove_member_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Removemember.md b/docs/Removemember.md deleted file mode 100644 index 3e3f551..0000000 --- a/docs/Removemember.md +++ /dev/null @@ -1,29 +0,0 @@ -# Removemember - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | - -## Example - -```python -from hyperstack.models.removemember import Removemember - -# TODO update the JSON string below -json = "{}" -# create an instance of Removemember from a JSON string -removemember_instance = Removemember.from_json(json) -# print the JSON string representation of the object -print Removemember.to_json() - -# convert the object into a dict -removemember_dict = removemember_instance.to_dict() -# create an instance of Removemember from a dict -removemember_form_dict = removemember.from_dict(removemember_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RequestConsole.md b/docs/RequestConsole.md index 62bef63..a5c6618 100644 --- a/docs/RequestConsole.md +++ b/docs/RequestConsole.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of RequestConsole from a JSON string request_console_instance = RequestConsole.from_json(json) # print the JSON string representation of the object -print RequestConsole.to_json() +print(RequestConsole.to_json()) # convert the object into a dict request_console_dict = request_console_instance.to_dict() diff --git a/docs/RequestLoginDataResponse.md b/docs/RequestLoginDataResponse.md deleted file mode 100644 index 94fa0c8..0000000 --- a/docs/RequestLoginDataResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# RequestLoginDataResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorization_url** | **str** | | [optional] -**session_id** | **str** | | [optional] - -## Example - -```python -from hyperstack.models.request_login_data_response import RequestLoginDataResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of RequestLoginDataResponse from a JSON string -request_login_data_response_instance = RequestLoginDataResponse.from_json(json) -# print the JSON string representation of the object -print RequestLoginDataResponse.to_json() - -# convert the object into a dict -request_login_data_response_dict = request_login_data_response_instance.to_dict() -# create an instance of RequestLoginDataResponse from a dict -request_login_data_response_form_dict = request_login_data_response.from_dict(request_login_data_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RequestLoginResponse.md b/docs/RequestLoginResponse.md deleted file mode 100644 index d429298..0000000 --- a/docs/RequestLoginResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# RequestLoginResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**data** | [**RequestLoginDataResponse**](RequestLoginDataResponse.md) | | [optional] - -## Example - -```python -from hyperstack.models.request_login_response import RequestLoginResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of RequestLoginResponse from a JSON string -request_login_response_instance = RequestLoginResponse.from_json(json) -# print the JSON string representation of the object -print RequestLoginResponse.to_json() - -# convert the object into a dict -request_login_response_dict = request_login_response_instance.to_dict() -# create an instance of RequestLoginResponse from a dict -request_login_response_form_dict = request_login_response.from_dict(request_login_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ResourcePayload.md b/docs/ResourcePayload.md index 29ee542..f42d6cb 100644 --- a/docs/ResourcePayload.md +++ b/docs/ResourcePayload.md @@ -6,7 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **resource_id** | **int** | | -**discount_percent** | **float** | | +**discount_percent** | **float** | | [optional] +**discount_type** | **str** | | +**discount_amount** | **float** | | [optional] +**resource_count** | **int** | | [optional] ## Example @@ -18,7 +21,7 @@ json = "{}" # create an instance of ResourcePayload from a JSON string resource_payload_instance = ResourcePayload.from_json(json) # print the JSON string representation of the object -print ResourcePayload.to_json() +print(ResourcePayload.to_json()) # convert the object into a dict resource_payload_dict = resource_payload_instance.to_dict() diff --git a/docs/ResponseModel.md b/docs/ResponseModel.md index b688d42..6e73464 100644 --- a/docs/ResponseModel.md +++ b/docs/ResponseModel.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of ResponseModel from a JSON string response_model_instance = ResponseModel.from_json(json) # print the JSON string representation of the object -print ResponseModel.to_json() +print(ResponseModel.to_json()) # convert the object into a dict response_model_dict = response_model_instance.to_dict() diff --git a/docs/RolePermissionFields.md b/docs/RolePermissionFields.md index 2a04f9b..6c0095f 100644 --- a/docs/RolePermissionFields.md +++ b/docs/RolePermissionFields.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of RolePermissionFields from a JSON string role_permission_fields_instance = RolePermissionFields.from_json(json) # print the JSON string representation of the object -print RolePermissionFields.to_json() +print(RolePermissionFields.to_json()) # convert the object into a dict role_permission_fields_dict = role_permission_fields_instance.to_dict() diff --git a/docs/RolePolicyFields.md b/docs/RolePolicyFields.md index 89e4b72..d4a44c1 100644 --- a/docs/RolePolicyFields.md +++ b/docs/RolePolicyFields.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of RolePolicyFields from a JSON string role_policy_fields_instance = RolePolicyFields.from_json(json) # print the JSON string representation of the object -print RolePolicyFields.to_json() +print(RolePolicyFields.to_json()) # convert the object into a dict role_policy_fields_dict = role_policy_fields_instance.to_dict() diff --git a/docs/SecurityGroupRule.md b/docs/SecurityGroupRule.md index 2434347..7ce4344 100644 --- a/docs/SecurityGroupRule.md +++ b/docs/SecurityGroupRule.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of SecurityGroupRule from a JSON string security_group_rule_instance = SecurityGroupRule.from_json(json) # print the JSON string representation of the object -print SecurityGroupRule.to_json() +print(SecurityGroupRule.to_json()) # convert the object into a dict security_group_rule_dict = security_group_rule_instance.to_dict() diff --git a/docs/SecurityGroupRuleFields.md b/docs/SecurityGroupRuleFields.md index 53ebd88..50762d8 100644 --- a/docs/SecurityGroupRuleFields.md +++ b/docs/SecurityGroupRuleFields.md @@ -25,7 +25,7 @@ json = "{}" # create an instance of SecurityGroupRuleFields from a JSON string security_group_rule_fields_instance = SecurityGroupRuleFields.from_json(json) # print the JSON string representation of the object -print SecurityGroupRuleFields.to_json() +print(SecurityGroupRuleFields.to_json()) # convert the object into a dict security_group_rule_fields_dict = security_group_rule_fields_instance.to_dict() diff --git a/docs/SecurityRulesApi.md b/docs/SecurityRulesApi.md index 6a35d20..47f0a31 100644 --- a/docs/SecurityRulesApi.md +++ b/docs/SecurityRulesApi.md @@ -4,13 +4,15 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**retrieve_security_rule_protocols**](SecurityRulesApi.md#retrieve_security_rule_protocols) | **GET** /core/sg-rules-protocols | Retrieve Security Rule Protocols +[**list_firewall_rule_protocols**](SecurityRulesApi.md#list_firewall_rule_protocols) | **GET** /core/sg-rules-protocols | List firewall rule protocols -# **retrieve_security_rule_protocols** -> SecurityRulesProtocolFields retrieve_security_rule_protocols() +# **list_firewall_rule_protocols** +> SecurityRulesProtocolFields list_firewall_rule_protocols() -Retrieve Security Rule Protocols +List firewall rule protocols + +Returns a list of all available protocols that can be used in the creation of firewall rules for your virtual machines. ### Example @@ -52,12 +54,12 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.SecurityRulesApi(api_client) try: - # Retrieve Security Rule Protocols - api_response = api_instance.retrieve_security_rule_protocols() - print("The response of SecurityRulesApi->retrieve_security_rule_protocols:\n") + # List firewall rule protocols + api_response = api_instance.list_firewall_rule_protocols() + print("The response of SecurityRulesApi->list_firewall_rule_protocols:\n") pprint(api_response) except Exception as e: - print("Exception when calling SecurityRulesApi->retrieve_security_rule_protocols: %s\n" % e) + print("Exception when calling SecurityRulesApi->list_firewall_rule_protocols: %s\n" % e) ``` @@ -83,7 +85,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting security rule protocols successful | - | +**200** | Protocols list successfully retrieved. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/SecurityRulesFieldsforInstance.md b/docs/SecurityRulesFieldsforInstance.md index 64b50e2..4161fe7 100644 --- a/docs/SecurityRulesFieldsforInstance.md +++ b/docs/SecurityRulesFieldsforInstance.md @@ -25,7 +25,7 @@ json = "{}" # create an instance of SecurityRulesFieldsforInstance from a JSON string security_rules_fieldsfor_instance_instance = SecurityRulesFieldsforInstance.from_json(json) # print the JSON string representation of the object -print SecurityRulesFieldsforInstance.to_json() +print(SecurityRulesFieldsforInstance.to_json()) # convert the object into a dict security_rules_fieldsfor_instance_dict = security_rules_fieldsfor_instance_instance.to_dict() diff --git a/docs/SecurityRulesProtocolFields.md b/docs/SecurityRulesProtocolFields.md index 78c67d2..8bef9cd 100644 --- a/docs/SecurityRulesProtocolFields.md +++ b/docs/SecurityRulesProtocolFields.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of SecurityRulesProtocolFields from a JSON string security_rules_protocol_fields_instance = SecurityRulesProtocolFields.from_json(json) # print the JSON string representation of the object -print SecurityRulesProtocolFields.to_json() +print(SecurityRulesProtocolFields.to_json()) # convert the object into a dict security_rules_protocol_fields_dict = security_rules_protocol_fields_instance.to_dict() diff --git a/docs/SetDefaultsPayload.md b/docs/SetDefaultsPayload.md new file mode 100644 index 0000000..c0c639f --- /dev/null +++ b/docs/SetDefaultsPayload.md @@ -0,0 +1,30 @@ +# SetDefaultsPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**flavors** | **List[int]** | | +**images** | **List[int]** | | + +## Example + +```python +from hyperstack.models.set_defaults_payload import SetDefaultsPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of SetDefaultsPayload from a JSON string +set_defaults_payload_instance = SetDefaultsPayload.from_json(json) +# print the JSON string representation of the object +print(SetDefaultsPayload.to_json()) + +# convert the object into a dict +set_defaults_payload_dict = set_defaults_payload_instance.to_dict() +# create an instance of SetDefaultsPayload from a dict +set_defaults_payload_form_dict = set_defaults_payload.from_dict(set_defaults_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SingleVisibilityUserResponse.md b/docs/SingleVisibilityUserResponse.md index 1cd1a75..b871291 100644 --- a/docs/SingleVisibilityUserResponse.md +++ b/docs/SingleVisibilityUserResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of SingleVisibilityUserResponse from a JSON string single_visibility_user_response_instance = SingleVisibilityUserResponse.from_json(json) # print the JSON string representation of the object -print SingleVisibilityUserResponse.to_json() +print(SingleVisibilityUserResponse.to_json()) # convert the object into a dict single_visibility_user_response_dict = single_visibility_user_response_instance.to_dict() diff --git a/docs/StartDeployment.md b/docs/StartDeployment.md index 497295f..6228988 100644 --- a/docs/StartDeployment.md +++ b/docs/StartDeployment.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of StartDeployment from a JSON string start_deployment_instance = StartDeployment.from_json(json) # print the JSON string representation of the object -print StartDeployment.to_json() +print(StartDeployment.to_json()) # convert the object into a dict start_deployment_dict = start_deployment_instance.to_dict() diff --git a/docs/StartDeploymentPayload.md b/docs/StartDeploymentPayload.md index 0b3a6fd..581ec4d 100644 --- a/docs/StartDeploymentPayload.md +++ b/docs/StartDeploymentPayload.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of StartDeploymentPayload from a JSON string start_deployment_payload_instance = StartDeploymentPayload.from_json(json) # print the JSON string representation of the object -print StartDeploymentPayload.to_json() +print(StartDeploymentPayload.to_json()) # convert the object into a dict start_deployment_payload_dict = start_deployment_payload_instance.to_dict() diff --git a/docs/StockApi.md b/docs/StockApi.md index 6547de6..6e51373 100644 --- a/docs/StockApi.md +++ b/docs/StockApi.md @@ -4,14 +4,16 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**retrieve_stocks**](StockApi.md#retrieve_stocks) | **GET** /core/stocks | +[**retrieve_gpu_stocks**](StockApi.md#retrieve_gpu_stocks) | **GET** /core/stocks | -# **retrieve_stocks** -> NewStockRetriveResponse retrieve_stocks() +# **retrieve_gpu_stocks** +> NewStockRetriveResponse retrieve_gpu_stocks() +Returns information on current and upcoming GPU availability, organized by region and GPU model. For additional information on GPU stocks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/gpu-stock-information). + ### Example * Api Key Authentication (apiKey): @@ -52,11 +54,11 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.StockApi(api_client) try: - api_response = api_instance.retrieve_stocks() - print("The response of StockApi->retrieve_stocks:\n") + api_response = api_instance.retrieve_gpu_stocks() + print("The response of StockApi->retrieve_gpu_stocks:\n") pprint(api_response) except Exception as e: - print("Exception when calling StockApi->retrieve_stocks: %s\n" % e) + print("Exception when calling StockApi->retrieve_gpu_stocks: %s\n" % e) ``` @@ -82,7 +84,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Stocks Retrived Successfully. | - | +**200** | GPU stocks retrieved successfully. | - | **401** | Unauthorized | - | **404** | Stocks Not Found | - | **500** | Internal Server Error | - | diff --git a/docs/StockVisibilityUserListResponse.md b/docs/StockVisibilityUserListResponse.md index 72c05f7..086dbe1 100644 --- a/docs/StockVisibilityUserListResponse.md +++ b/docs/StockVisibilityUserListResponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of StockVisibilityUserListResponse from a JSON string stock_visibility_user_list_response_instance = StockVisibilityUserListResponse.from_json(json) # print the JSON string representation of the object -print StockVisibilityUserListResponse.to_json() +print(StockVisibilityUserListResponse.to_json()) # convert the object into a dict stock_visibility_user_list_response_dict = stock_visibility_user_list_response_instance.to_dict() diff --git a/docs/StockVisibilityUserPayload.md b/docs/StockVisibilityUserPayload.md index 97af9ba..9e10780 100644 --- a/docs/StockVisibilityUserPayload.md +++ b/docs/StockVisibilityUserPayload.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user_ids** | **List[int]** | | [optional] +**user_ids** | **List[int]** | | ## Example @@ -17,7 +17,7 @@ json = "{}" # create an instance of StockVisibilityUserPayload from a JSON string stock_visibility_user_payload_instance = StockVisibilityUserPayload.from_json(json) # print the JSON string representation of the object -print StockVisibilityUserPayload.to_json() +print(StockVisibilityUserPayload.to_json()) # convert the object into a dict stock_visibility_user_payload_dict = stock_visibility_user_payload_instance.to_dict() diff --git a/docs/SuccessResponseModel.md b/docs/SuccessResponseModel.md index b5d3c68..3f414d8 100644 --- a/docs/SuccessResponseModel.md +++ b/docs/SuccessResponseModel.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of SuccessResponseModel from a JSON string success_response_model_instance = SuccessResponseModel.from_json(json) # print the JSON string representation of the object -print SuccessResponseModel.to_json() +print(SuccessResponseModel.to_json()) # convert the object into a dict success_response_model_dict = success_response_model_instance.to_dict() diff --git a/docs/Template.md b/docs/Template.md index 33a598c..c3afc4d 100644 --- a/docs/Template.md +++ b/docs/Template.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Template from a JSON string template_instance = Template.from_json(json) # print the JSON string representation of the object -print Template.to_json() +print(Template.to_json()) # convert the object into a dict template_dict = template_instance.to_dict() diff --git a/docs/TemplateApi.md b/docs/TemplateApi.md index abb61f0..44a7ddf 100644 --- a/docs/TemplateApi.md +++ b/docs/TemplateApi.md @@ -4,17 +4,19 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_template**](TemplateApi.md#create_template) | **POST** /core/marketplace/templates | Create Template -[**delete_a_template**](TemplateApi.md#delete_a_template) | **DELETE** /core/marketplace/templates/{id} | Delete a Template -[**details_of_a_template_by_id**](TemplateApi.md#details_of_a_template_by_id) | **GET** /core/marketplace/templates/{id} | Details of a Template by ID -[**list_templates**](TemplateApi.md#list_templates) | **GET** /core/marketplace/templates | List Templates -[**update_template**](TemplateApi.md#update_template) | **PUT** /core/marketplace/templates/{id} | Update Template +[**create_template**](TemplateApi.md#create_template) | **POST** /core/marketplace/templates | Create template +[**delete_template**](TemplateApi.md#delete_template) | **DELETE** /core/marketplace/templates/{id} | Delete template +[**list_templates**](TemplateApi.md#list_templates) | **GET** /core/marketplace/templates | List templates +[**retrieve_template_details**](TemplateApi.md#retrieve_template_details) | **GET** /core/marketplace/templates/{id} | Retrieve template details +[**update_template**](TemplateApi.md#update_template) | **PUT** /core/marketplace/templates/{id} | Update template # **create_template** > Template create_template(name, description, is_public, content) -Create Template +Create template + +Creates a resource template for deployment. ### Example @@ -60,7 +62,7 @@ with hyperstack.ApiClient(configuration) as api_client: content = None # bytearray | YAML file is required try: - # Create Template + # Create template api_response = api_instance.create_template(name, description, is_public, content) print("The response of TemplateApi->create_template:\n") pprint(api_response) @@ -104,10 +106,12 @@ Name | Type | Description | Notes [[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_a_template** -> ResponseModel delete_a_template(id) +# **delete_template** +> ResponseModel delete_template(id) + +Delete template -Delete a Template +Permanently deletes a template. Supply the template ID in the path to delete the specified template. ### Example @@ -150,12 +154,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete a Template - api_response = api_instance.delete_a_template(id) - print("The response of TemplateApi->delete_a_template:\n") + # Delete template + api_response = api_instance.delete_template(id) + print("The response of TemplateApi->delete_template:\n") pprint(api_response) except Exception as e: - print("Exception when calling TemplateApi->delete_a_template: %s\n" % e) + print("Exception when calling TemplateApi->delete_template: %s\n" % e) ``` @@ -184,7 +188,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Template deleted successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -192,10 +196,12 @@ Name | Type | Description | Notes [[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) -# **details_of_a_template_by_id** -> Template details_of_a_template_by_id(id) +# **list_templates** +> Templates list_templates(visibility=visibility) + +List templates -Details of a Template by ID +Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#view-a-list-of-templates). ### Example @@ -204,7 +210,7 @@ Details of a Template by ID ```python import hyperstack -from hyperstack.models.template import Template +from hyperstack.models.templates import Templates from hyperstack.rest import ApiException from pprint import pprint @@ -235,15 +241,15 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.TemplateApi(api_client) - id = 56 # int | + visibility = None # object | Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility. (optional) try: - # Details of a Template by ID - api_response = api_instance.details_of_a_template_by_id(id) - print("The response of TemplateApi->details_of_a_template_by_id:\n") + # List templates + api_response = api_instance.list_templates(visibility=visibility) + print("The response of TemplateApi->list_templates:\n") pprint(api_response) except Exception as e: - print("Exception when calling TemplateApi->details_of_a_template_by_id: %s\n" % e) + print("Exception when calling TemplateApi->list_templates: %s\n" % e) ``` @@ -253,11 +259,11 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| | + **visibility** | [**object**](.md)| Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility. | [optional] ### Return type -[**Template**](Template.md) +[**Templates**](Templates.md) ### Authorization @@ -272,18 +278,20 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting template detail success | - | +**200** | Templates list successfully retrieved. | - | **400** | Bad Request | - | **401** | Unauthorized | - | -**404** | Not Found | - | +**406** | Not Acceptable | - | **500** | Internal Server Error | - | [[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_templates** -> Templates list_templates(visibility=visibility) +# **retrieve_template_details** +> Template retrieve_template_details(id) -List Templates +Retrieve template details + +Retrieves the resource configuration details for a specified template. Provide the template ID in the path to retrieve details for the specified template. For additional information on template configuration details, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#retrieve-the-details-for-a-template). ### Example @@ -292,7 +300,7 @@ List Templates ```python import hyperstack -from hyperstack.models.templates import Templates +from hyperstack.models.template import Template from hyperstack.rest import ApiException from pprint import pprint @@ -323,15 +331,15 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.TemplateApi(api_client) - visibility = None # object | visibility: public/private (optional) + id = 56 # int | try: - # List Templates - api_response = api_instance.list_templates(visibility=visibility) - print("The response of TemplateApi->list_templates:\n") + # Retrieve template details + api_response = api_instance.retrieve_template_details(id) + print("The response of TemplateApi->retrieve_template_details:\n") pprint(api_response) except Exception as e: - print("Exception when calling TemplateApi->list_templates: %s\n" % e) + print("Exception when calling TemplateApi->retrieve_template_details: %s\n" % e) ``` @@ -341,11 +349,11 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **visibility** | [**object**](.md)| visibility: public/private | [optional] + **id** | **int**| | ### Return type -[**Templates**](Templates.md) +[**Template**](Template.md) ### Authorization @@ -360,10 +368,10 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting templates success | - | +**200** | Template details retrieved successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | -**406** | Not Acceptable | - | +**404** | Not Found | - | **500** | Internal Server Error | - | [[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) @@ -371,7 +379,9 @@ Name | Type | Description | Notes # **update_template** > Template update_template(id, payload) -Update Template +Update template + +Updates the details of a template. Modify the template name, description and/or `is_public` status to change the public/private visibility of the template. ### Example @@ -416,7 +426,7 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.UpdateTemplate() # UpdateTemplate | try: - # Update Template + # Update template api_response = api_instance.update_template(id, payload) print("The response of TemplateApi->update_template:\n") pprint(api_response) @@ -451,7 +461,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Template updated successfully | - | +**200** | Template updated successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/TemplateFields.md b/docs/TemplateFields.md index b872e9d..53a2f2b 100644 --- a/docs/TemplateFields.md +++ b/docs/TemplateFields.md @@ -22,7 +22,7 @@ json = "{}" # create an instance of TemplateFields from a JSON string template_fields_instance = TemplateFields.from_json(json) # print the JSON string representation of the object -print TemplateFields.to_json() +print(TemplateFields.to_json()) # convert the object into a dict template_fields_dict = template_fields_instance.to_dict() diff --git a/docs/Templates.md b/docs/Templates.md index e06fa70..8997d07 100644 --- a/docs/Templates.md +++ b/docs/Templates.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Templates from a JSON string templates_instance = Templates.from_json(json) # print the JSON string representation of the object -print Templates.to_json() +print(Templates.to_json()) # convert the object into a dict templates_dict = templates_instance.to_dict() diff --git a/docs/TokenFields.md b/docs/TokenFields.md index 3fe080c..0cdbadc 100644 --- a/docs/TokenFields.md +++ b/docs/TokenFields.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of TokenFields from a JSON string token_fields_instance = TokenFields.from_json(json) # print the JSON string representation of the object -print TokenFields.to_json() +print(TokenFields.to_json()) # convert the object into a dict token_fields_dict = token_fields_instance.to_dict() diff --git a/docs/UpdateContractPayload.md b/docs/UpdateContractPayload.md new file mode 100644 index 0000000..d9f9f7b --- /dev/null +++ b/docs/UpdateContractPayload.md @@ -0,0 +1,33 @@ +# UpdateContractPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | | [optional] +**discount_resources** | [**List[ResourcePayload]**](ResourcePayload.md) | | +**start_date** | **datetime** | | [optional] +**end_date** | **datetime** | | [optional] +**expiration_policy** | **int** | | + +## Example + +```python +from hyperstack.models.update_contract_payload import UpdateContractPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateContractPayload from a JSON string +update_contract_payload_instance = UpdateContractPayload.from_json(json) +# print the JSON string representation of the object +print(UpdateContractPayload.to_json()) + +# convert the object into a dict +update_contract_payload_dict = update_contract_payload_instance.to_dict() +# create an instance of UpdateContractPayload from a dict +update_contract_payload_form_dict = update_contract_payload.from_dict(update_contract_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateDiscountsPayload.md b/docs/UpdateDiscountsPayload.md index 68cdf2b..a72ea06 100644 --- a/docs/UpdateDiscountsPayload.md +++ b/docs/UpdateDiscountsPayload.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of UpdateDiscountsPayload from a JSON string update_discounts_payload_instance = UpdateDiscountsPayload.from_json(json) # print the JSON string representation of the object -print UpdateDiscountsPayload.to_json() +print(UpdateDiscountsPayload.to_json()) # convert the object into a dict update_discounts_payload_dict = update_discounts_payload_instance.to_dict() diff --git a/docs/UpdateDiscountsStatusPayload.md b/docs/UpdateDiscountsStatusPayload.md index 54fa9ea..d73f6d8 100644 --- a/docs/UpdateDiscountsStatusPayload.md +++ b/docs/UpdateDiscountsStatusPayload.md @@ -17,7 +17,7 @@ json = "{}" # create an instance of UpdateDiscountsStatusPayload from a JSON string update_discounts_status_payload_instance = UpdateDiscountsStatusPayload.from_json(json) # print the JSON string representation of the object -print UpdateDiscountsStatusPayload.to_json() +print(UpdateDiscountsStatusPayload.to_json()) # convert the object into a dict update_discounts_status_payload_dict = update_discounts_status_payload_instance.to_dict() diff --git a/docs/UpdateEnvironment.md b/docs/UpdateEnvironment.md index 9da0546..02d293d 100644 --- a/docs/UpdateEnvironment.md +++ b/docs/UpdateEnvironment.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | +**name** | **str** | The new name of the environment. | ## Example @@ -17,7 +17,7 @@ json = "{}" # create an instance of UpdateEnvironment from a JSON string update_environment_instance = UpdateEnvironment.from_json(json) # print the JSON string representation of the object -print UpdateEnvironment.to_json() +print(UpdateEnvironment.to_json()) # convert the object into a dict update_environment_dict = update_environment_instance.to_dict() diff --git a/docs/UpdateGPU.md b/docs/UpdateGPU.md index 48d93b5..e2b4035 100644 --- a/docs/UpdateGPU.md +++ b/docs/UpdateGPU.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] **regions** | **List[str]** | | [optional] -**example_metadata** | **str** | | [optional] +**example_metadata** | **str** | A valid JSON string. | [optional] ## Example @@ -19,7 +19,7 @@ json = "{}" # create an instance of UpdateGPU from a JSON string update_gpu_instance = UpdateGPU.from_json(json) # print the JSON string representation of the object -print UpdateGPU.to_json() +print(UpdateGPU.to_json()) # convert the object into a dict update_gpu_dict = update_gpu_instance.to_dict() diff --git a/docs/UpdateKeypairName.md b/docs/UpdateKeypairName.md index bd4af53..135e6b8 100644 --- a/docs/UpdateKeypairName.md +++ b/docs/UpdateKeypairName.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | +**name** | **str** | The new key pair name. | ## Example @@ -17,7 +17,7 @@ json = "{}" # create an instance of UpdateKeypairName from a JSON string update_keypair_name_instance = UpdateKeypairName.from_json(json) # print the JSON string representation of the object -print UpdateKeypairName.to_json() +print(UpdateKeypairName.to_json()) # convert the object into a dict update_keypair_name_dict = update_keypair_name_instance.to_dict() diff --git a/docs/UpdateKeypairnameresponse.md b/docs/UpdateKeypairnameresponse.md index 2fdad9f..2b0cb0a 100644 --- a/docs/UpdateKeypairnameresponse.md +++ b/docs/UpdateKeypairnameresponse.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of UpdateKeypairnameresponse from a JSON string update_keypairnameresponse_instance = UpdateKeypairnameresponse.from_json(json) # print the JSON string representation of the object -print UpdateKeypairnameresponse.to_json() +print(UpdateKeypairnameresponse.to_json()) # convert the object into a dict update_keypairnameresponse_dict = update_keypairnameresponse_instance.to_dict() diff --git a/docs/UpdateOrganizationPayload.md b/docs/UpdateOrganizationPayload.md new file mode 100644 index 0000000..7cde0b1 --- /dev/null +++ b/docs/UpdateOrganizationPayload.md @@ -0,0 +1,29 @@ +# UpdateOrganizationPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | + +## Example + +```python +from hyperstack.models.update_organization_payload import UpdateOrganizationPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateOrganizationPayload from a JSON string +update_organization_payload_instance = UpdateOrganizationPayload.from_json(json) +# print the JSON string representation of the object +print(UpdateOrganizationPayload.to_json()) + +# convert the object into a dict +update_organization_payload_dict = update_organization_payload_instance.to_dict() +# create an instance of UpdateOrganizationPayload from a dict +update_organization_payload_form_dict = update_organization_payload.from_dict(update_organization_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateOrganizationResponseModel.md b/docs/UpdateOrganizationResponseModel.md new file mode 100644 index 0000000..448adb3 --- /dev/null +++ b/docs/UpdateOrganizationResponseModel.md @@ -0,0 +1,30 @@ +# UpdateOrganizationResponseModel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.update_organization_response_model import UpdateOrganizationResponseModel + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateOrganizationResponseModel from a JSON string +update_organization_response_model_instance = UpdateOrganizationResponseModel.from_json(json) +# print the JSON string representation of the object +print(UpdateOrganizationResponseModel.to_json()) + +# convert the object into a dict +update_organization_response_model_dict = update_organization_response_model_instance.to_dict() +# create an instance of UpdateOrganizationResponseModel from a dict +update_organization_response_model_form_dict = update_organization_response_model.from_dict(update_organization_response_model_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateTemplate.md b/docs/UpdateTemplate.md index 9d41f46..44a1260 100644 --- a/docs/UpdateTemplate.md +++ b/docs/UpdateTemplate.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of UpdateTemplate from a JSON string update_template_instance = UpdateTemplate.from_json(json) # print the JSON string representation of the object -print UpdateTemplate.to_json() +print(UpdateTemplate.to_json()) # convert the object into a dict update_template_dict = update_template_instance.to_dict() diff --git a/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..663895c --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,276 @@ +# hyperstack.UserApi + +All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user**](UserApi.md#get_user) | **GET** /billing/user/info | GET: Fetch User Info +[**post_user**](UserApi.md#post_user) | **POST** /billing/user/info | POST: Insert user info +[**update_user_info**](UserApi.md#update_user_info) | **PUT** /billing/user/info | PUT: Update user info + + +# **get_user** +> UsersInfoListResponse get_user() + +GET: Fetch User Info + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.users_info_list_response import UsersInfoListResponse +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.UserApi(api_client) + + try: + # GET: Fetch User Info + api_response = api_instance.get_user() + print("The response of UserApi->get_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserApi->get_user: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UsersInfoListResponse**](UsersInfoListResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **post_user** +> AddUserInfoSuccessResponseModel post_user(payload) + +POST: Insert user info + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.add_user_info_success_response_model import AddUserInfoSuccessResponseModel +from hyperstack.models.userinfopostpayload import Userinfopostpayload +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.UserApi(api_client) + payload = hyperstack.Userinfopostpayload() # Userinfopostpayload | + + try: + # POST: Insert user info + api_response = api_instance.post_user(payload) + print("The response of UserApi->post_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserApi->post_user: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | [**Userinfopostpayload**](Userinfopostpayload.md)| | + +### Return type + +[**AddUserInfoSuccessResponseModel**](AddUserInfoSuccessResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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_user_info** +> AddUserInfoSuccessResponseModel update_user_info(payload) + +PUT: Update user info + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.add_user_info_success_response_model import AddUserInfoSuccessResponseModel +from hyperstack.models.userinfopostpayload import Userinfopostpayload +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.UserApi(api_client) + payload = hyperstack.Userinfopostpayload() # Userinfopostpayload | + + try: + # PUT: Update user info + api_response = api_instance.update_user_info(payload) + print("The response of UserApi->update_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserApi->update_user_info: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | [**Userinfopostpayload**](Userinfopostpayload.md)| | + +### Return type + +[**AddUserInfoSuccessResponseModel**](AddUserInfoSuccessResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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/UserDefaultChoiceForAdminFields.md b/docs/UserDefaultChoiceForAdminFields.md new file mode 100644 index 0000000..5d62fa3 --- /dev/null +++ b/docs/UserDefaultChoiceForAdminFields.md @@ -0,0 +1,32 @@ +# UserDefaultChoiceForAdminFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**region_name** | **str** | | [optional] +**flavor_id** | **int** | | [optional] +**image_id** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.user_default_choice_for_admin_fields import UserDefaultChoiceForAdminFields + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDefaultChoiceForAdminFields from a JSON string +user_default_choice_for_admin_fields_instance = UserDefaultChoiceForAdminFields.from_json(json) +# print the JSON string representation of the object +print(UserDefaultChoiceForAdminFields.to_json()) + +# convert the object into a dict +user_default_choice_for_admin_fields_dict = user_default_choice_for_admin_fields_instance.to_dict() +# create an instance of UserDefaultChoiceForAdminFields from a dict +user_default_choice_for_admin_fields_form_dict = user_default_choice_for_admin_fields.from_dict(user_default_choice_for_admin_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserDefaultChoiceForUserFields.md b/docs/UserDefaultChoiceForUserFields.md new file mode 100644 index 0000000..01742c6 --- /dev/null +++ b/docs/UserDefaultChoiceForUserFields.md @@ -0,0 +1,33 @@ +# UserDefaultChoiceForUserFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**region_id** | **int** | | [optional] +**environment_id** | **int** | | [optional] +**keypair_id** | **int** | | [optional] +**flavor_id** | **int** | | [optional] +**image_id** | **int** | | [optional] + +## Example + +```python +from hyperstack.models.user_default_choice_for_user_fields import UserDefaultChoiceForUserFields + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDefaultChoiceForUserFields from a JSON string +user_default_choice_for_user_fields_instance = UserDefaultChoiceForUserFields.from_json(json) +# print the JSON string representation of the object +print(UserDefaultChoiceForUserFields.to_json()) + +# convert the object into a dict +user_default_choice_for_user_fields_dict = user_default_choice_for_user_fields_instance.to_dict() +# create an instance of UserDefaultChoiceForUserFields from a dict +user_default_choice_for_user_fields_form_dict = user_default_choice_for_user_fields.from_dict(user_default_choice_for_user_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserDefaultChoicesForAdminResponse.md b/docs/UserDefaultChoicesForAdminResponse.md new file mode 100644 index 0000000..4f31978 --- /dev/null +++ b/docs/UserDefaultChoicesForAdminResponse.md @@ -0,0 +1,31 @@ +# UserDefaultChoicesForAdminResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**user_default_choices** | [**List[UserDefaultChoiceForAdminFields]**](UserDefaultChoiceForAdminFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.user_default_choices_for_admin_response import UserDefaultChoicesForAdminResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDefaultChoicesForAdminResponse from a JSON string +user_default_choices_for_admin_response_instance = UserDefaultChoicesForAdminResponse.from_json(json) +# print the JSON string representation of the object +print(UserDefaultChoicesForAdminResponse.to_json()) + +# convert the object into a dict +user_default_choices_for_admin_response_dict = user_default_choices_for_admin_response_instance.to_dict() +# create an instance of UserDefaultChoicesForAdminResponse from a dict +user_default_choices_for_admin_response_form_dict = user_default_choices_for_admin_response.from_dict(user_default_choices_for_admin_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserDefaultChoicesForUserResponse.md b/docs/UserDefaultChoicesForUserResponse.md new file mode 100644 index 0000000..498e29f --- /dev/null +++ b/docs/UserDefaultChoicesForUserResponse.md @@ -0,0 +1,31 @@ +# UserDefaultChoicesForUserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**user_default_choices** | [**List[UserDefaultChoiceForUserFields]**](UserDefaultChoiceForUserFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserDefaultChoicesForUserResponse from a JSON string +user_default_choices_for_user_response_instance = UserDefaultChoicesForUserResponse.from_json(json) +# print the JSON string representation of the object +print(UserDefaultChoicesForUserResponse.to_json()) + +# convert the object into a dict +user_default_choices_for_user_response_dict = user_default_choices_for_user_response_instance.to_dict() +# create an instance of UserDefaultChoicesForUserResponse from a dict +user_default_choices_for_user_response_form_dict = user_default_choices_for_user_response.from_dict(user_default_choices_for_user_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserDetailChoiceApi.md b/docs/UserDetailChoiceApi.md new file mode 100644 index 0000000..2299ebd --- /dev/null +++ b/docs/UserDetailChoiceApi.md @@ -0,0 +1,93 @@ +# hyperstack.UserDetailChoiceApi + +All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**retrieve_default_flavors_and_images_for_user**](UserDetailChoiceApi.md#retrieve_default_flavors_and_images_for_user) | **GET** /core/user/resources/defaults | Retrieve default flavors and images for user + + +# **retrieve_default_flavors_and_images_for_user** +> UserDefaultChoicesForUserResponse retrieve_default_flavors_and_images_for_user() + +Retrieve default flavors and images for user + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.UserDetailChoiceApi(api_client) + + try: + # Retrieve default flavors and images for user + api_response = api_instance.retrieve_default_flavors_and_images_for_user() + print("The response of UserDetailChoiceApi->retrieve_default_flavors_and_images_for_user:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling UserDetailChoiceApi->retrieve_default_flavors_and_images_for_user: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UserDefaultChoicesForUserResponse**](UserDefaultChoicesForUserResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**405** | Method Not Allowed | - | +**500** | Internal Server Error | - | + +[[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/UserInfoResponse.md b/docs/UserInfoResponse.md deleted file mode 100644 index 596c9eb..0000000 --- a/docs/UserInfoResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# UserInfoResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | | [optional] -**message** | **str** | | [optional] -**user** | [**UserFields**](UserFields.md) | | [optional] - -## Example - -```python -from hyperstack.models.user_info_response import UserInfoResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of UserInfoResponse from a JSON string -user_info_response_instance = UserInfoResponse.from_json(json) -# print the JSON string representation of the object -print UserInfoResponse.to_json() - -# convert the object into a dict -user_info_response_dict = user_info_response_instance.to_dict() -# create an instance of UserInfoResponse from a dict -user_info_response_form_dict = user_info_response.from_dict(user_info_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UserPermissionApi.md b/docs/UserPermissionApi.md index b09e933..eae9875 100644 --- a/docs/UserPermissionApi.md +++ b/docs/UserPermissionApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **list_current_user_permissions** -> PermissionsforUserPermission list_current_user_permissions() +> GetUserPermissionsResponseModel list_current_user_permissions() List Current User Permissions @@ -20,7 +20,7 @@ List Current User Permissions ```python import hyperstack -from hyperstack.models.permissionsfor_user_permission import PermissionsforUserPermission +from hyperstack.models.get_user_permissions_response_model import GetUserPermissionsResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -69,7 +69,7 @@ This endpoint does not need any parameter. ### Return type -[**PermissionsforUserPermission**](PermissionsforUserPermission.md) +[**GetUserPermissionsResponseModel**](GetUserPermissionsResponseModel.md) ### Authorization @@ -84,7 +84,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting my permissions successfully | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | @@ -92,7 +92,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_user_permissions** -> PermissionsforUserPermission list_user_permissions(id) +> GetUserPermissionsResponseModel list_user_permissions(id) List User Permissions @@ -103,7 +103,7 @@ List User Permissions ```python import hyperstack -from hyperstack.models.permissionsfor_user_permission import PermissionsforUserPermission +from hyperstack.models.get_user_permissions_response_model import GetUserPermissionsResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -156,7 +156,7 @@ Name | Type | Description | Notes ### Return type -[**PermissionsforUserPermission**](PermissionsforUserPermission.md) +[**GetUserPermissionsResponseModel**](GetUserPermissionsResponseModel.md) ### Authorization @@ -171,7 +171,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting user permissions successfully | - | +**200** | Success | - | **400** | Bad Request | - | **401** | Unauthorized | - | **405** | Method Not Allowed | - | diff --git a/docs/UserPermissionFields.md b/docs/UserPermissionFields.md new file mode 100644 index 0000000..c1e9c0b --- /dev/null +++ b/docs/UserPermissionFields.md @@ -0,0 +1,31 @@ +# UserPermissionFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**resource** | **str** | | [optional] +**permission** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.user_permission_fields import UserPermissionFields + +# TODO update the JSON string below +json = "{}" +# create an instance of UserPermissionFields from a JSON string +user_permission_fields_instance = UserPermissionFields.from_json(json) +# print the JSON string representation of the object +print(UserPermissionFields.to_json()) + +# convert the object into a dict +user_permission_fields_dict = user_permission_fields_instance.to_dict() +# create an instance of UserPermissionFields from a dict +user_permission_fields_form_dict = user_permission_fields.from_dict(user_permission_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UserTransferPayload.md b/docs/UserTransferPayload.md new file mode 100644 index 0000000..38bd2e6 --- /dev/null +++ b/docs/UserTransferPayload.md @@ -0,0 +1,30 @@ +# UserTransferPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**org_id** | **int** | | +**role** | **str** | | + +## Example + +```python +from hyperstack.models.user_transfer_payload import UserTransferPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of UserTransferPayload from a JSON string +user_transfer_payload_instance = UserTransferPayload.from_json(json) +# print the JSON string representation of the object +print(UserTransferPayload.to_json()) + +# convert the object into a dict +user_transfer_payload_dict = user_transfer_payload_instance.to_dict() +# create an instance of UserTransferPayload from a dict +user_transfer_payload_form_dict = user_transfer_payload.from_dict(user_transfer_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Userinfopostpayload.md b/docs/Userinfopostpayload.md new file mode 100644 index 0000000..390472e --- /dev/null +++ b/docs/Userinfopostpayload.md @@ -0,0 +1,39 @@ +# Userinfopostpayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business** | **bool** | | +**name** | **str** | | [optional] +**email** | **str** | | [optional] +**company_name** | **str** | | [optional] +**vat_number** | **str** | | [optional] +**phone** | **str** | | [optional] +**billing_address1** | **str** | | [optional] +**billing_address2** | **str** | | [optional] +**zip_code** | **str** | | +**country** | **str** | | +**state** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.userinfopostpayload import Userinfopostpayload + +# TODO update the JSON string below +json = "{}" +# create an instance of Userinfopostpayload from a JSON string +userinfopostpayload_instance = Userinfopostpayload.from_json(json) +# print the JSON string representation of the object +print(Userinfopostpayload.to_json()) + +# convert the object into a dict +userinfopostpayload_dict = userinfopostpayload_instance.to_dict() +# create an instance of Userinfopostpayload from a dict +userinfopostpayload_form_dict = userinfopostpayload.from_dict(userinfopostpayload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsersInfoFields.md b/docs/UsersInfoFields.md new file mode 100644 index 0000000..a60b192 --- /dev/null +++ b/docs/UsersInfoFields.md @@ -0,0 +1,42 @@ +# UsersInfoFields + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**organization_id** | **int** | | [optional] +**name** | **str** | | [optional] +**email** | **str** | | [optional] +**business** | **bool** | | [optional] +**company_name** | **str** | | [optional] +**vat_number** | **str** | | [optional] +**phone** | **str** | | [optional] +**billing_address1** | **str** | | [optional] +**billing_address2** | **str** | | [optional] +**zip_code** | **str** | | [optional] +**country** | **str** | | [optional] +**state** | **str** | | [optional] +**created_at** | **datetime** | | [optional] + +## Example + +```python +from hyperstack.models.users_info_fields import UsersInfoFields + +# TODO update the JSON string below +json = "{}" +# create an instance of UsersInfoFields from a JSON string +users_info_fields_instance = UsersInfoFields.from_json(json) +# print the JSON string representation of the object +print(UsersInfoFields.to_json()) + +# convert the object into a dict +users_info_fields_dict = users_info_fields_instance.to_dict() +# create an instance of UsersInfoFields from a dict +users_info_fields_form_dict = users_info_fields.from_dict(users_info_fields_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsersInfoListResponse.md b/docs/UsersInfoListResponse.md new file mode 100644 index 0000000..c0d9ee5 --- /dev/null +++ b/docs/UsersInfoListResponse.md @@ -0,0 +1,31 @@ +# UsersInfoListResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | | [optional] +**message** | **str** | | [optional] +**users_info** | [**UsersInfoFields**](UsersInfoFields.md) | | [optional] + +## Example + +```python +from hyperstack.models.users_info_list_response import UsersInfoListResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UsersInfoListResponse from a JSON string +users_info_list_response_instance = UsersInfoListResponse.from_json(json) +# print the JSON string representation of the object +print(UsersInfoListResponse.to_json()) + +# convert the object into a dict +users_info_list_response_dict = users_info_list_response_instance.to_dict() +# create an instance of UsersInfoListResponse from a dict +users_info_list_response_form_dict = users_info_list_response.from_dict(users_info_list_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VNCURL.md b/docs/VNCURL.md index 509a6e3..15dde50 100644 --- a/docs/VNCURL.md +++ b/docs/VNCURL.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of VNCURL from a JSON string vncurl_instance = VNCURL.from_json(json) # print the JSON string representation of the object -print VNCURL.to_json() +print(VNCURL.to_json()) # convert the object into a dict vncurl_dict = vncurl_instance.to_dict() diff --git a/docs/VNCURLFields.md b/docs/VNCURLFields.md index 94d6f40..baf5faa 100644 --- a/docs/VNCURLFields.md +++ b/docs/VNCURLFields.md @@ -18,7 +18,7 @@ json = "{}" # create an instance of VNCURLFields from a JSON string vncurl_fields_instance = VNCURLFields.from_json(json) # print the JSON string representation of the object -print VNCURLFields.to_json() +print(VNCURLFields.to_json()) # convert the object into a dict vncurl_fields_dict = vncurl_fields_instance.to_dict() diff --git a/docs/VerifyApiKeyPayload.md b/docs/VerifyApiKeyPayload.md new file mode 100644 index 0000000..6f2e752 --- /dev/null +++ b/docs/VerifyApiKeyPayload.md @@ -0,0 +1,29 @@ +# VerifyApiKeyPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_key** | **str** | | [optional] + +## Example + +```python +from hyperstack.models.verify_api_key_payload import VerifyApiKeyPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of VerifyApiKeyPayload from a JSON string +verify_api_key_payload_instance = VerifyApiKeyPayload.from_json(json) +# print the JSON string representation of the object +print(VerifyApiKeyPayload.to_json()) + +# convert the object into a dict +verify_api_key_payload_dict = verify_api_key_payload_instance.to_dict() +# create an instance of VerifyApiKeyPayload from a dict +verify_api_key_payload_form_dict = verify_api_key_payload.from_dict(verify_api_key_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApiKeyVerifyResponse.md b/docs/VerifyApiKeyResponseModel.md similarity index 50% rename from docs/ApiKeyVerifyResponse.md rename to docs/VerifyApiKeyResponseModel.md index 3927478..7c2d4c8 100644 --- a/docs/ApiKeyVerifyResponse.md +++ b/docs/VerifyApiKeyResponseModel.md @@ -1,4 +1,4 @@ -# ApiKeyVerifyResponse +# VerifyApiKeyResponseModel ## Properties @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from hyperstack.models.api_key_verify_response import ApiKeyVerifyResponse +from hyperstack.models.verify_api_key_response_model import VerifyApiKeyResponseModel # TODO update the JSON string below json = "{}" -# create an instance of ApiKeyVerifyResponse from a JSON string -api_key_verify_response_instance = ApiKeyVerifyResponse.from_json(json) +# create an instance of VerifyApiKeyResponseModel from a JSON string +verify_api_key_response_model_instance = VerifyApiKeyResponseModel.from_json(json) # print the JSON string representation of the object -print ApiKeyVerifyResponse.to_json() +print(VerifyApiKeyResponseModel.to_json()) # convert the object into a dict -api_key_verify_response_dict = api_key_verify_response_instance.to_dict() -# create an instance of ApiKeyVerifyResponse from a dict -api_key_verify_response_form_dict = api_key_verify_response.from_dict(api_key_verify_response_dict) +verify_api_key_response_model_dict = verify_api_key_response_model_instance.to_dict() +# create an instance of VerifyApiKeyResponseModel from a dict +verify_api_key_response_model_form_dict = verify_api_key_response_model.from_dict(verify_api_key_response_model_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/VirtualMachineApi.md b/docs/VirtualMachineApi.md index 594b602..7d67fde 100644 --- a/docs/VirtualMachineApi.md +++ b/docs/VirtualMachineApi.md @@ -4,25 +4,30 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**add_security_rule**](VirtualMachineApi.md#add_security_rule) | **POST** /core/virtual-machines/{id}/sg-rules | Add Security Rule -[**create_instances**](VirtualMachineApi.md#create_instances) | **POST** /core/virtual-machines | Create Instances -[**delete_a_security_rule**](VirtualMachineApi.md#delete_a_security_rule) | **DELETE** /core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id} | Delete a security group rule -[**delete_an_instance**](VirtualMachineApi.md#delete_an_instance) | **DELETE** /core/virtual-machines/{id} | Delete an instance -[**get_an_instance_details**](VirtualMachineApi.md#get_an_instance_details) | **GET** /core/virtual-machines/{id} | Get an instance details -[**hard_reboot_instance**](VirtualMachineApi.md#hard_reboot_instance) | **GET** /core/virtual-machines/{id}/hard-reboot | Hard Reboot Instance -[**hibernate_instance**](VirtualMachineApi.md#hibernate_instance) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate | Hibernate Instance -[**list_instances**](VirtualMachineApi.md#list_instances) | **GET** /core/virtual-machines | List Instances -[**resize_virtual_machine**](VirtualMachineApi.md#resize_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/resize | Resize Virtual Machine -[**restore_instance_from_hibernation**](VirtualMachineApi.md#restore_instance_from_hibernation) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate-restore | Restore Instance from Hibernation -[**retrieved_metrics_successfully**](VirtualMachineApi.md#retrieved_metrics_successfully) | **GET** /core/virtual-machines/{virtual_machine_id}/metrics | Get instance metrics -[**start_instance**](VirtualMachineApi.md#start_instance) | **GET** /core/virtual-machines/{id}/start | Start Instance -[**stop_instance**](VirtualMachineApi.md#stop_instance) | **GET** /core/virtual-machines/{id}/stop | Stop Instance - - -# **add_security_rule** -> SecurityGroupRule add_security_rule(id, payload) - -Add Security Rule +[**add_firewall_rule_to_virtual_machine**](VirtualMachineApi.md#add_firewall_rule_to_virtual_machine) | **POST** /core/virtual-machines/{id}/sg-rules | Add firewall rule to virtual machine +[**attach_firewalls_to_a_vm**](VirtualMachineApi.md#attach_firewalls_to_a_vm) | **POST** /core/virtual-machines/{vm_id}/attach-firewalls | Attach Firewalls to a VM +[**create_virtual_machine**](VirtualMachineApi.md#create_virtual_machine) | **POST** /core/virtual-machines | Create virtual machine +[**delete_firewall_rule_from_virtual_machine**](VirtualMachineApi.md#delete_firewall_rule_from_virtual_machine) | **DELETE** /core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id} | Delete firewall rule from virtual machine +[**delete_virtual_machine**](VirtualMachineApi.md#delete_virtual_machine) | **DELETE** /core/virtual-machines/{id} | Delete virtual machine +[**edit_labels_of_an_existing_vm**](VirtualMachineApi.md#edit_labels_of_an_existing_vm) | **PUT** /core/virtual-machines/{virtual_machine_id}/label | Edit labels of an existing VM +[**hard_reboot_virtual_machine**](VirtualMachineApi.md#hard_reboot_virtual_machine) | **GET** /core/virtual-machines/{id}/hard-reboot | Hard reboot virtual machine +[**hibernate_virtual_machine**](VirtualMachineApi.md#hibernate_virtual_machine) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate | Hibernate virtual machine +[**list_virtual_machines**](VirtualMachineApi.md#list_virtual_machines) | **GET** /core/virtual-machines | List all virtual machines +[**resize_virtual_machine**](VirtualMachineApi.md#resize_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/resize | Resize virtual machine +[**restore_virtual_machine_from_hibernation**](VirtualMachineApi.md#restore_virtual_machine_from_hibernation) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate-restore | Restore virtual machine from hibernation +[**retrieve_virtual_machine_details**](VirtualMachineApi.md#retrieve_virtual_machine_details) | **GET** /core/virtual-machines/{id} | Retrieve virtual machine details +[**retrieve_virtual_machine_performance_metrics**](VirtualMachineApi.md#retrieve_virtual_machine_performance_metrics) | **GET** /core/virtual-machines/{virtual_machine_id}/metrics | Retrieve virtual machine performance metrics +[**retrieve_virtual_machines_associated_with_a_contract**](VirtualMachineApi.md#retrieve_virtual_machines_associated_with_a_contract) | **GET** /core/virtual-machines/contract/{contract_id}/virtual-machines | Retrieve virtual machines associated with a contract +[**start_virtual_machine**](VirtualMachineApi.md#start_virtual_machine) | **GET** /core/virtual-machines/{id}/start | Start virtual machine +[**stop_virtual_machine**](VirtualMachineApi.md#stop_virtual_machine) | **GET** /core/virtual-machines/{id}/stop | Stop virtual machine + + +# **add_firewall_rule_to_virtual_machine** +> SecurityGroupRule add_firewall_rule_to_virtual_machine(id, payload) + +Add firewall rule to virtual machine + +Creates a firewall rule and associates it with a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/security-rules). ### Example @@ -67,12 +72,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.CreateSecurityRulePayload() # CreateSecurityRulePayload | try: - # Add Security Rule - api_response = api_instance.add_security_rule(id, payload) - print("The response of VirtualMachineApi->add_security_rule:\n") + # Add firewall rule to virtual machine + api_response = api_instance.add_firewall_rule_to_virtual_machine(id, payload) + print("The response of VirtualMachineApi->add_firewall_rule_to_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->add_security_rule: %s\n" % e) + print("Exception when calling VirtualMachineApi->add_firewall_rule_to_virtual_machine: %s\n" % e) ``` @@ -102,7 +107,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Security Rule created successfully | - | +**200** | The firewall rule has been successfully added to the virtual machine. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -111,10 +116,105 @@ Name | Type | Description | Notes [[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_instances** -> Instances create_instances(payload) +# **attach_firewalls_to_a_vm** +> ResponseModel attach_firewalls_to_a_vm(vm_id, payload) -Create Instances +Attach Firewalls to a VM + +Attach Firewalls to a VM + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.attach_firewalls_to_vm_payload import AttachFirewallsToVMPayload +from hyperstack.models.response_model import ResponseModel +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.VirtualMachineApi(api_client) + vm_id = 56 # int | + payload = hyperstack.AttachFirewallsToVMPayload() # AttachFirewallsToVMPayload | + + try: + # Attach Firewalls to a VM + api_response = api_instance.attach_firewalls_to_a_vm(vm_id, payload) + print("The response of VirtualMachineApi->attach_firewalls_to_a_vm:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VirtualMachineApi->attach_firewalls_to_a_vm: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **vm_id** | **int**| | + **payload** | [**AttachFirewallsToVMPayload**](AttachFirewallsToVMPayload.md)| | + +### Return type + +[**ResponseModel**](ResponseModel.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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_virtual_machine** +> Instances create_virtual_machine(payload) + +Create virtual machine + +Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features). ### Example @@ -158,12 +258,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.CreateInstancesPayload() # CreateInstancesPayload | try: - # Create Instances - api_response = api_instance.create_instances(payload) - print("The response of VirtualMachineApi->create_instances:\n") + # Create virtual machine + api_response = api_instance.create_virtual_machine(payload) + print("The response of VirtualMachineApi->create_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->create_instances: %s\n" % e) + print("Exception when calling VirtualMachineApi->create_virtual_machine: %s\n" % e) ``` @@ -192,7 +292,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Instances are created successfully | - | +**200** | Virtual machine(s) created successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -202,10 +302,12 @@ Name | Type | Description | Notes [[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_a_security_rule** -> ResponseModel delete_a_security_rule(virtual_machine_id, sg_rule_id) +# **delete_firewall_rule_from_virtual_machine** +> ResponseModel delete_firewall_rule_from_virtual_machine(virtual_machine_id, sg_rule_id) -Delete a security group rule +Delete firewall rule from virtual machine + +Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine. ### Example @@ -249,12 +351,12 @@ with hyperstack.ApiClient(configuration) as api_client: sg_rule_id = 56 # int | try: - # Delete a security group rule - api_response = api_instance.delete_a_security_rule(virtual_machine_id, sg_rule_id) - print("The response of VirtualMachineApi->delete_a_security_rule:\n") + # Delete firewall rule from virtual machine + api_response = api_instance.delete_firewall_rule_from_virtual_machine(virtual_machine_id, sg_rule_id) + print("The response of VirtualMachineApi->delete_firewall_rule_from_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->delete_a_security_rule: %s\n" % e) + print("Exception when calling VirtualMachineApi->delete_firewall_rule_from_virtual_machine: %s\n" % e) ``` @@ -284,7 +386,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | The firewall rule has been successfully removed from the virtual machine. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -292,10 +394,12 @@ Name | Type | Description | Notes [[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_an_instance** -> ResponseModel delete_an_instance(id) +# **delete_virtual_machine** +> ResponseModel delete_virtual_machine(id) -Delete an instance +Delete virtual machine + +Permanently deletes a virtual machine. Supply the virtual machine ID in the path to delete the specified virtual machine. ### Example @@ -338,12 +442,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete an instance - api_response = api_instance.delete_an_instance(id) - print("The response of VirtualMachineApi->delete_an_instance:\n") + # Delete virtual machine + api_response = api_instance.delete_virtual_machine(id) + print("The response of VirtualMachineApi->delete_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->delete_an_instance: %s\n" % e) + print("Exception when calling VirtualMachineApi->delete_virtual_machine: %s\n" % e) ``` @@ -372,18 +476,19 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Virtual machine deleted successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | +**409** | Conflict | - | **500** | Internal Server Error | - | [[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_an_instance_details** -> Instance get_an_instance_details(id) +# **edit_labels_of_an_existing_vm** +> ResponseModel edit_labels_of_an_existing_vm(virtual_machine_id, payload) -Get an instance details +Edit labels of an existing VM ### Example @@ -392,7 +497,8 @@ Get an instance details ```python import hyperstack -from hyperstack.models.instance import Instance +from hyperstack.models.editlabelofanexisting_vm_payload import EditlabelofanexistingVMPayload +from hyperstack.models.response_model import ResponseModel from hyperstack.rest import ApiException from pprint import pprint @@ -423,15 +529,16 @@ configuration.api_key['accessToken'] = os.environ["API_KEY"] with hyperstack.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = hyperstack.VirtualMachineApi(api_client) - id = 56 # int | + virtual_machine_id = 56 # int | + payload = hyperstack.EditlabelofanexistingVMPayload() # EditlabelofanexistingVMPayload | try: - # Get an instance details - api_response = api_instance.get_an_instance_details(id) - print("The response of VirtualMachineApi->get_an_instance_details:\n") + # Edit labels of an existing VM + api_response = api_instance.edit_labels_of_an_existing_vm(virtual_machine_id, payload) + print("The response of VirtualMachineApi->edit_labels_of_an_existing_vm:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->get_an_instance_details: %s\n" % e) + print("Exception when calling VirtualMachineApi->edit_labels_of_an_existing_vm: %s\n" % e) ``` @@ -441,11 +548,12 @@ with hyperstack.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| | + **virtual_machine_id** | **int**| | + **payload** | [**EditlabelofanexistingVMPayload**](EditlabelofanexistingVMPayload.md)| | ### Return type -[**Instance**](Instance.md) +[**ResponseModel**](ResponseModel.md) ### Authorization @@ -453,25 +561,28 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting instance detail successful | - | +**200** | Labels edited successfully | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | +**409** | Conflict | - | **500** | Internal Server Error | - | [[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) -# **hard_reboot_instance** -> ResponseModel hard_reboot_instance(id) +# **hard_reboot_virtual_machine** +> ResponseModel hard_reboot_virtual_machine(id) + +Hard reboot virtual machine -Hard Reboot Instance +Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine. ### Example @@ -514,12 +625,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Hard Reboot Instance - api_response = api_instance.hard_reboot_instance(id) - print("The response of VirtualMachineApi->hard_reboot_instance:\n") + # Hard reboot virtual machine + api_response = api_instance.hard_reboot_virtual_machine(id) + print("The response of VirtualMachineApi->hard_reboot_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->hard_reboot_instance: %s\n" % e) + print("Exception when calling VirtualMachineApi->hard_reboot_virtual_machine: %s\n" % e) ``` @@ -548,7 +659,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Hard reboot process has been successfully initiated. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -556,10 +667,12 @@ Name | Type | Description | Notes [[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) -# **hibernate_instance** -> ResponseModel hibernate_instance(virtual_machine_id) +# **hibernate_virtual_machine** +> ResponseModel hibernate_virtual_machine(virtual_machine_id) + +Hibernate virtual machine -Hibernate Instance +Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated. ### Example @@ -602,12 +715,12 @@ with hyperstack.ApiClient(configuration) as api_client: virtual_machine_id = 56 # int | try: - # Hibernate Instance - api_response = api_instance.hibernate_instance(virtual_machine_id) - print("The response of VirtualMachineApi->hibernate_instance:\n") + # Hibernate virtual machine + api_response = api_instance.hibernate_virtual_machine(virtual_machine_id) + print("The response of VirtualMachineApi->hibernate_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->hibernate_instance: %s\n" % e) + print("Exception when calling VirtualMachineApi->hibernate_virtual_machine: %s\n" % e) ``` @@ -636,7 +749,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Hibernation request for the virtual machine was successful. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -644,10 +757,12 @@ Name | Type | Description | Notes [[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_instances** -> Instances list_instances() +# **list_virtual_machines** +> Instances list_virtual_machines() + +List all virtual machines -List Instances +Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first. ### Example @@ -689,12 +804,12 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.VirtualMachineApi(api_client) try: - # List Instances - api_response = api_instance.list_instances() - print("The response of VirtualMachineApi->list_instances:\n") + # List all virtual machines + api_response = api_instance.list_virtual_machines() + print("The response of VirtualMachineApi->list_virtual_machines:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->list_instances: %s\n" % e) + print("Exception when calling VirtualMachineApi->list_virtual_machines: %s\n" % e) ``` @@ -720,7 +835,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting instances successful | - | +**200** | Successful retrieval of virtual machine list. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | @@ -730,7 +845,9 @@ This endpoint does not need any parameter. # **resize_virtual_machine** > ResponseModel resize_virtual_machine(virtual_machine_id, payload) -Resize Virtual Machine +Resize virtual machine + +Updates the configuration specifications for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine). ### Example @@ -775,7 +892,7 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.InstanceResizePayload() # InstanceResizePayload | try: - # Resize Virtual Machine + # Resize virtual machine api_response = api_instance.resize_virtual_machine(virtual_machine_id, payload) print("The response of VirtualMachineApi->resize_virtual_machine:\n") pprint(api_response) @@ -810,7 +927,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | The resizing of the virtual machine configuration was successful. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -819,10 +936,12 @@ Name | Type | Description | Notes [[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) -# **restore_instance_from_hibernation** -> ResponseModel restore_instance_from_hibernation(virtual_machine_id) +# **restore_virtual_machine_from_hibernation** +> ResponseModel restore_virtual_machine_from_hibernation(virtual_machine_id) + +Restore virtual machine from hibernation -Restore Instance from Hibernation +Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation. ### Example @@ -865,12 +984,12 @@ with hyperstack.ApiClient(configuration) as api_client: virtual_machine_id = 56 # int | try: - # Restore Instance from Hibernation - api_response = api_instance.restore_instance_from_hibernation(virtual_machine_id) - print("The response of VirtualMachineApi->restore_instance_from_hibernation:\n") + # Restore virtual machine from hibernation + api_response = api_instance.restore_virtual_machine_from_hibernation(virtual_machine_id) + print("The response of VirtualMachineApi->restore_virtual_machine_from_hibernation:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->restore_instance_from_hibernation: %s\n" % e) + print("Exception when calling VirtualMachineApi->restore_virtual_machine_from_hibernation: %s\n" % e) ``` @@ -899,7 +1018,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | The request to restore the virtual machine from hibernation was successful. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -907,10 +1026,12 @@ Name | Type | Description | Notes [[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) -# **retrieved_metrics_successfully** -> ResponseModel retrieved_metrics_successfully(virtual_machine_id, duration=duration) +# **retrieve_virtual_machine_details** +> Instance retrieve_virtual_machine_details(id) + +Retrieve virtual machine details -Get instance metrics +Retrieves the details of an existing virtual machine. Supply the virtual machine ID in the path, and Infrahub will return the corresponding Virtual Machine object. ### Example @@ -919,7 +1040,97 @@ Get instance metrics ```python import hyperstack -from hyperstack.models.response_model import ResponseModel +from hyperstack.models.instance import Instance +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.VirtualMachineApi(api_client) + id = 56 # int | + + try: + # Retrieve virtual machine details + api_response = api_instance.retrieve_virtual_machine_details(id) + print("The response of VirtualMachineApi->retrieve_virtual_machine_details:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VirtualMachineApi->retrieve_virtual_machine_details: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| | + +### Return type + +[**Instance**](Instance.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Virtual machine details retrieved successfully. | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**404** | Not Found | - | +**500** | Internal Server Error | - | + +[[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) + +# **retrieve_virtual_machine_performance_metrics** +> MetricsFields retrieve_virtual_machine_performance_metrics(virtual_machine_id, duration=duration) + +Retrieve virtual machine performance metrics + +Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics). + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.metrics_fields import MetricsFields from hyperstack.rest import ApiException from pprint import pprint @@ -954,12 +1165,12 @@ with hyperstack.ApiClient(configuration) as api_client: duration = 'duration_example' # str | (optional) try: - # Get instance metrics - api_response = api_instance.retrieved_metrics_successfully(virtual_machine_id, duration=duration) - print("The response of VirtualMachineApi->retrieved_metrics_successfully:\n") + # Retrieve virtual machine performance metrics + api_response = api_instance.retrieve_virtual_machine_performance_metrics(virtual_machine_id, duration=duration) + print("The response of VirtualMachineApi->retrieve_virtual_machine_performance_metrics:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->retrieved_metrics_successfully: %s\n" % e) + print("Exception when calling VirtualMachineApi->retrieve_virtual_machine_performance_metrics: %s\n" % e) ``` @@ -974,7 +1185,7 @@ Name | Type | Description | Notes ### Return type -[**ResponseModel**](ResponseModel.md) +[**MetricsFields**](MetricsFields.md) ### Authorization @@ -989,7 +1200,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Virtual machine performance metrics have been successfully retrieved. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -998,10 +1209,99 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **start_instance** -> ResponseModel start_instance(id) +# **retrieve_virtual_machines_associated_with_a_contract** +> ContractInstancesResponse retrieve_virtual_machines_associated_with_a_contract(contract_id) -Start Instance +Retrieve virtual machines associated with a contract + +### Example + +* Api Key Authentication (apiKey): +* Api Key Authentication (accessToken): + +```python +import hyperstack +from hyperstack.models.contract_instances_response import ContractInstancesResponse +from hyperstack.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = hyperstack.Configuration( + host = "https://infrahub-api.nexgencloud.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: apiKey +configuration.api_key['apiKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['apiKey'] = 'Bearer' + +# Configure API key authorization: accessToken +configuration.api_key['accessToken'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['accessToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with hyperstack.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = hyperstack.VirtualMachineApi(api_client) + contract_id = 56 # int | + + try: + # Retrieve virtual machines associated with a contract + api_response = api_instance.retrieve_virtual_machines_associated_with_a_contract(contract_id) + print("The response of VirtualMachineApi->retrieve_virtual_machines_associated_with_a_contract:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VirtualMachineApi->retrieve_virtual_machines_associated_with_a_contract: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contract_id** | **int**| | + +### Return type + +[**ContractInstancesResponse**](ContractInstancesResponse.md) + +### Authorization + +[apiKey](../README.md#apiKey), [accessToken](../README.md#accessToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **start_virtual_machine** +> ResponseModel start_virtual_machine(id) + +Start virtual machine + +Initiates the startup of a virtual machine. Supply the virtual machine ID in the path to initiate the starting of the specified virtual machine. ### Example @@ -1044,12 +1344,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Start Instance - api_response = api_instance.start_instance(id) - print("The response of VirtualMachineApi->start_instance:\n") + # Start virtual machine + api_response = api_instance.start_virtual_machine(id) + print("The response of VirtualMachineApi->start_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->start_instance: %s\n" % e) + print("Exception when calling VirtualMachineApi->start_virtual_machine: %s\n" % e) ``` @@ -1078,7 +1378,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Virtual machine started successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -1086,10 +1386,12 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **stop_instance** -> ResponseModel stop_instance(id) +# **stop_virtual_machine** +> ResponseModel stop_virtual_machine(id) -Stop Instance +Stop virtual machine + +Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine. ### Example @@ -1132,12 +1434,12 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Stop Instance - api_response = api_instance.stop_instance(id) - print("The response of VirtualMachineApi->stop_instance:\n") + # Stop virtual machine + api_response = api_instance.stop_virtual_machine(id) + print("The response of VirtualMachineApi->stop_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineApi->stop_instance: %s\n" % e) + print("Exception when calling VirtualMachineApi->stop_virtual_machine: %s\n" % e) ``` @@ -1166,7 +1468,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Virtual machine shut down successfully. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/VirtualMachineEventsApi.md b/docs/VirtualMachineEventsApi.md index bd51839..6fe7202 100644 --- a/docs/VirtualMachineEventsApi.md +++ b/docs/VirtualMachineEventsApi.md @@ -4,13 +4,15 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**fetch_all_of_the_instance_events**](VirtualMachineEventsApi.md#fetch_all_of_the_instance_events) | **GET** /core/virtual-machines/{virtual_machine_id}/events | Fetch all of the instance events +[**list_virtual_machine_events**](VirtualMachineEventsApi.md#list_virtual_machine_events) | **GET** /core/virtual-machines/{virtual_machine_id}/events | List virtual machine events -# **fetch_all_of_the_instance_events** -> InstanceEvents fetch_all_of_the_instance_events(virtual_machine_id) +# **list_virtual_machine_events** +> InstanceEvents list_virtual_machine_events(virtual_machine_id) -Fetch all of the instance events +List virtual machine events + +Retrieves a list of all events in a virtual machine's history, which records actions performed on the specified virtual machine. Include the virtual machine ID in the path to retrieve the history of events. For more details on virtual machine events history, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#events-history). ### Example @@ -53,12 +55,12 @@ with hyperstack.ApiClient(configuration) as api_client: virtual_machine_id = 'virtual_machine_id_example' # str | try: - # Fetch all of the instance events - api_response = api_instance.fetch_all_of_the_instance_events(virtual_machine_id) - print("The response of VirtualMachineEventsApi->fetch_all_of_the_instance_events:\n") + # List virtual machine events + api_response = api_instance.list_virtual_machine_events(virtual_machine_id) + print("The response of VirtualMachineEventsApi->list_virtual_machine_events:\n") pprint(api_response) except Exception as e: - print("Exception when calling VirtualMachineEventsApi->fetch_all_of_the_instance_events: %s\n" % e) + print("Exception when calling VirtualMachineEventsApi->list_virtual_machine_events: %s\n" % e) ``` @@ -87,7 +89,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting instance events success | - | +**200** | Virtual machines event list successfully retrieved. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/Volume.md b/docs/Volume.md index 23f00c6..edc10bf 100644 --- a/docs/Volume.md +++ b/docs/Volume.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Volume from a JSON string volume_instance = Volume.from_json(json) # print the JSON string representation of the object -print Volume.to_json() +print(Volume.to_json()) # convert the object into a dict volume_dict = volume_instance.to_dict() diff --git a/docs/VolumeApi.md b/docs/VolumeApi.md index 162ae6e..2dc3e41 100644 --- a/docs/VolumeApi.md +++ b/docs/VolumeApi.md @@ -4,16 +4,18 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_volume**](VolumeApi.md#create_volume) | **POST** /core/volumes | Create Volume -[**delete_volume**](VolumeApi.md#delete_volume) | **DELETE** /core/volumes/{id} | Delete Volume -[**get_volume_types**](VolumeApi.md#get_volume_types) | **GET** /core/volume-types | GET Volume Types -[**list_volumes**](VolumeApi.md#list_volumes) | **GET** /core/volumes | List Volumes +[**create_volume**](VolumeApi.md#create_volume) | **POST** /core/volumes | Create volume +[**delete_volume**](VolumeApi.md#delete_volume) | **DELETE** /core/volumes/{id} | Delete volume +[**list_volume_types**](VolumeApi.md#list_volume_types) | **GET** /core/volume-types | List volume types +[**list_volumes**](VolumeApi.md#list_volumes) | **GET** /core/volumes | List volumes # **create_volume** > Volume create_volume(payload) -Create Volume +Create volume + +Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). ### Example @@ -57,7 +59,7 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.CreateVolumePayload() # CreateVolumePayload | try: - # Create Volume + # Create volume api_response = api_instance.create_volume(payload) print("The response of VolumeApi->create_volume:\n") pprint(api_response) @@ -91,7 +93,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Volume created successfully | - | +**200** | Volume successfully created. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -104,7 +106,9 @@ Name | Type | Description | Notes # **delete_volume** > ResponseModel delete_volume(id) -Delete Volume +Delete volume + +Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted. ### Example @@ -147,7 +151,7 @@ with hyperstack.ApiClient(configuration) as api_client: id = 56 # int | try: - # Delete Volume + # Delete volume api_response = api_instance.delete_volume(id) print("The response of VolumeApi->delete_volume:\n") pprint(api_response) @@ -181,7 +185,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Success | - | +**200** | Volume successfully deleted. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -189,10 +193,12 @@ Name | Type | Description | Notes [[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_volume_types** -> VolumeTypes get_volume_types() +# **list_volume_types** +> VolumeTypes list_volume_types() -GET Volume Types +List volume types + +Retrieves a list of available volume types that can be used in the creation of a new volume. ### Example @@ -234,12 +240,12 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.VolumeApi(api_client) try: - # GET Volume Types - api_response = api_instance.get_volume_types() - print("The response of VolumeApi->get_volume_types:\n") + # List volume types + api_response = api_instance.list_volume_types() + print("The response of VolumeApi->list_volume_types:\n") pprint(api_response) except Exception as e: - print("Exception when calling VolumeApi->get_volume_types: %s\n" % e) + print("Exception when calling VolumeApi->list_volume_types: %s\n" % e) ``` @@ -265,7 +271,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Retrieved Volume Types. | - | +**200** | Successful retrieval of volume types list | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | @@ -275,7 +281,9 @@ This endpoint does not need any parameter. # **list_volumes** > Volumes list_volumes() -List Volumes +List volumes + +Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). ### Example @@ -317,7 +325,7 @@ with hyperstack.ApiClient(configuration) as api_client: api_instance = hyperstack.VolumeApi(api_client) try: - # List Volumes + # List volumes api_response = api_instance.list_volumes() print("The response of VolumeApi->list_volumes:\n") pprint(api_response) @@ -348,7 +356,7 @@ This endpoint does not need any parameter. | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Getting volumes successful | - | +**200** | Successful retrieval of volumes list. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **500** | Internal Server Error | - | diff --git a/docs/VolumeAttachmentApi.md b/docs/VolumeAttachmentApi.md index 8c11057..a72cc2f 100644 --- a/docs/VolumeAttachmentApi.md +++ b/docs/VolumeAttachmentApi.md @@ -4,14 +4,16 @@ All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**attach_volumes**](VolumeAttachmentApi.md#attach_volumes) | **POST** /core/virtual-machines/{virtual_machine_id}/attach-volumes | Attach Volumes -[**detach_volumes**](VolumeAttachmentApi.md#detach_volumes) | **POST** /core/virtual-machines/{virtual_machine_id}/detach-volumes | Detach Volumes +[**attach_volumes_to_virtual_machine**](VolumeAttachmentApi.md#attach_volumes_to_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/attach-volumes | Attach volumes to virtual machine +[**detach_volumes_from_virtual_machine**](VolumeAttachmentApi.md#detach_volumes_from_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/detach-volumes | Detach volumes from virtual machine -# **attach_volumes** -> AttachVolumes attach_volumes(virtual_machine_id, payload) +# **attach_volumes_to_virtual_machine** +> AttachVolumes attach_volumes_to_virtual_machine(virtual_machine_id, payload) -Attach Volumes +Attach volumes to virtual machine + +Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1). ### Example @@ -56,12 +58,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.AttachVolumesPayload() # AttachVolumesPayload | try: - # Attach Volumes - api_response = api_instance.attach_volumes(virtual_machine_id, payload) - print("The response of VolumeAttachmentApi->attach_volumes:\n") + # Attach volumes to virtual machine + api_response = api_instance.attach_volumes_to_virtual_machine(virtual_machine_id, payload) + print("The response of VolumeAttachmentApi->attach_volumes_to_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VolumeAttachmentApi->attach_volumes: %s\n" % e) + print("Exception when calling VolumeAttachmentApi->attach_volumes_to_virtual_machine: %s\n" % e) ``` @@ -91,7 +93,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Volumes attaching now. | - | +**200** | Volumes have been successfully attached to the virtual machine. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | @@ -100,10 +102,12 @@ Name | Type | Description | Notes [[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_volumes** -> DetachVolumes detach_volumes(virtual_machine_id, payload) +# **detach_volumes_from_virtual_machine** +> DetachVolumes detach_volumes_from_virtual_machine(virtual_machine_id, payload) + +Detach volumes from virtual machine -Detach Volumes +Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine. ### Example @@ -148,12 +152,12 @@ with hyperstack.ApiClient(configuration) as api_client: payload = hyperstack.DetachVolumesPayload() # DetachVolumesPayload | try: - # Detach Volumes - api_response = api_instance.detach_volumes(virtual_machine_id, payload) - print("The response of VolumeAttachmentApi->detach_volumes:\n") + # Detach volumes from virtual machine + api_response = api_instance.detach_volumes_from_virtual_machine(virtual_machine_id, payload) + print("The response of VolumeAttachmentApi->detach_volumes_from_virtual_machine:\n") pprint(api_response) except Exception as e: - print("Exception when calling VolumeAttachmentApi->detach_volumes: %s\n" % e) + print("Exception when calling VolumeAttachmentApi->detach_volumes_from_virtual_machine: %s\n" % e) ``` @@ -183,7 +187,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | Volumes detaching now. | - | +**200** | Volumes have been successfully detached from the virtual machine. | - | **400** | Bad Request | - | **401** | Unauthorized | - | **404** | Not Found | - | diff --git a/docs/VolumeAttachmentFields.md b/docs/VolumeAttachmentFields.md index 117a382..a0d6266 100644 --- a/docs/VolumeAttachmentFields.md +++ b/docs/VolumeAttachmentFields.md @@ -20,7 +20,7 @@ json = "{}" # create an instance of VolumeAttachmentFields from a JSON string volume_attachment_fields_instance = VolumeAttachmentFields.from_json(json) # print the JSON string representation of the object -print VolumeAttachmentFields.to_json() +print(VolumeAttachmentFields.to_json()) # convert the object into a dict volume_attachment_fields_dict = volume_attachment_fields_instance.to_dict() diff --git a/docs/VolumeFields.md b/docs/VolumeFields.md index 141776c..d6911ff 100644 --- a/docs/VolumeFields.md +++ b/docs/VolumeFields.md @@ -28,7 +28,7 @@ json = "{}" # create an instance of VolumeFields from a JSON string volume_fields_instance = VolumeFields.from_json(json) # print the JSON string representation of the object -print VolumeFields.to_json() +print(VolumeFields.to_json()) # convert the object into a dict volume_fields_dict = volume_fields_instance.to_dict() diff --git a/docs/VolumeFieldsforInstance.md b/docs/VolumeFieldsforInstance.md index 6fabdbb..c55a6b6 100644 --- a/docs/VolumeFieldsforInstance.md +++ b/docs/VolumeFieldsforInstance.md @@ -21,7 +21,7 @@ json = "{}" # create an instance of VolumeFieldsforInstance from a JSON string volume_fieldsfor_instance_instance = VolumeFieldsforInstance.from_json(json) # print the JSON string representation of the object -print VolumeFieldsforInstance.to_json() +print(VolumeFieldsforInstance.to_json()) # convert the object into a dict volume_fieldsfor_instance_dict = volume_fieldsfor_instance_instance.to_dict() diff --git a/docs/VolumeOverviewFields.md b/docs/VolumeOverviewFields.md index 2240f23..a479727 100644 --- a/docs/VolumeOverviewFields.md +++ b/docs/VolumeOverviewFields.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of VolumeOverviewFields from a JSON string volume_overview_fields_instance = VolumeOverviewFields.from_json(json) # print the JSON string representation of the object -print VolumeOverviewFields.to_json() +print(VolumeOverviewFields.to_json()) # convert the object into a dict volume_overview_fields_dict = volume_overview_fields_instance.to_dict() diff --git a/docs/VolumeTypes.md b/docs/VolumeTypes.md index 49bd588..a9e1489 100644 --- a/docs/VolumeTypes.md +++ b/docs/VolumeTypes.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of VolumeTypes from a JSON string volume_types_instance = VolumeTypes.from_json(json) # print the JSON string representation of the object -print VolumeTypes.to_json() +print(VolumeTypes.to_json()) # convert the object into a dict volume_types_dict = volume_types_instance.to_dict() diff --git a/docs/Volumes.md b/docs/Volumes.md index ee15a62..71053e2 100644 --- a/docs/Volumes.md +++ b/docs/Volumes.md @@ -19,7 +19,7 @@ json = "{}" # create an instance of Volumes from a JSON string volumes_instance = Volumes.from_json(json) # print the JSON string representation of the object -print Volumes.to_json() +print(Volumes.to_json()) # convert the object into a dict volumes_dict = volumes_instance.to_dict() diff --git a/hyperstack/__init__.py b/hyperstack/__init__.py index 9630b82..68b38d5 100644 --- a/hyperstack/__init__.py +++ b/hyperstack/__init__.py @@ -14,9 +14,10 @@ """ # noqa: E501 -__version__ = "3.0.1" +__version__ = "1.1.0" # import apis into sdk package +from hyperstack.api.customer_contract_api import CustomerContractApi from hyperstack.api.pricebook_api import PricebookApi from hyperstack.api.alive_api import AliveApi from hyperstack.api.api_key_api import ApiKeyApi @@ -29,6 +30,8 @@ from hyperstack.api.dashboard_api import DashboardApi from hyperstack.api.deployment_api import DeploymentApi from hyperstack.api.environment_api import EnvironmentApi +from hyperstack.api.firewall_attachment_api import FirewallAttachmentApi +from hyperstack.api.firewalls_api import FirewallsApi from hyperstack.api.flavor_api import FlavorApi from hyperstack.api.floating_ip_api import FloatingIpApi from hyperstack.api.gpu_api import GpuApi @@ -45,6 +48,8 @@ from hyperstack.api.security_rules_api import SecurityRulesApi from hyperstack.api.stock_api import StockApi from hyperstack.api.template_api import TemplateApi +from hyperstack.api.user_api import UserApi +from hyperstack.api.user_detail_choice_api import UserDetailChoiceApi from hyperstack.api.user_permission_api import UserPermissionApi from hyperstack.api.virtual_machine_api import VirtualMachineApi from hyperstack.api.virtual_machine_events_api import VirtualMachineEventsApi @@ -64,64 +69,139 @@ from hyperstack.exceptions import ApiException # import models into sdk package -from hyperstack.models.api_key import APIKey -from hyperstack.models.api_key_fields import APIKeyFields -from hyperstack.models.api_key_payload import APIKeyPayload -from hyperstack.models.api_keygeneration import APIKeygeneration +from hyperstack.models.add_update_flavor_organization_payload import AddUpdateFlavorOrganizationPayload +from hyperstack.models.add_user_info_success_response_model import AddUserInfoSuccessResponseModel +from hyperstack.models.admin_add_update_image_organization_payload import AdminAddUpdateImageOrganizationPayload +from hyperstack.models.admin_bootstrap_environment_payload import AdminBootstrapEnvironmentPayload +from hyperstack.models.admin_cluster_resource import AdminClusterResource +from hyperstack.models.admin_container_resource import AdminContainerResource +from hyperstack.models.admin_contract_event_fields import AdminContractEventFields +from hyperstack.models.admin_contract_fields import AdminContractFields +from hyperstack.models.admin_count_resources_organization import AdminCountResourcesOrganization +from hyperstack.models.admin_count_resources_organizations import AdminCountResourcesOrganizations +from hyperstack.models.admin_create_contract_response_model import AdminCreateContractResponseModel +from hyperstack.models.admin_envrionment_resources import AdminEnvrionmentResources +from hyperstack.models.admin_flavor_detail_fields import AdminFlavorDetailFields +from hyperstack.models.admin_flavor_detail_node_fields import AdminFlavorDetailNodeFields +from hyperstack.models.admin_flavor_resource import AdminFlavorResource +from hyperstack.models.admin_flavor_resources_list import AdminFlavorResourcesList +from hyperstack.models.admin_get_contract_detail_fields import AdminGetContractDetailFields +from hyperstack.models.admin_get_version_response import AdminGetVersionResponse +from hyperstack.models.admin_hibernation_restoration_payload_model import AdminHibernationRestorationPayloadModel +from hyperstack.models.admin_image_admin_fields import AdminImageAdminFields +from hyperstack.models.admin_image_admin_response import AdminImageAdminResponse +from hyperstack.models.admin_image_admin_response_image import AdminImageAdminResponseImage +from hyperstack.models.admin_image_list_admin_response import AdminImageListAdminResponse +from hyperstack.models.admin_instance_resources import AdminInstanceResources +from hyperstack.models.admin_node_resource import AdminNodeResource +from hyperstack.models.admin_organization_resource_list import AdminOrganizationResourceList +from hyperstack.models.admin_organization_resource_response import AdminOrganizationResourceResponse +from hyperstack.models.admin_organization_resources import AdminOrganizationResources +from hyperstack.models.admin_organization_response_model import AdminOrganizationResponseModel +from hyperstack.models.admin_organization_summary_fields import AdminOrganizationSummaryFields +from hyperstack.models.admin_organizations_response_model import AdminOrganizationsResponseModel +from hyperstack.models.admin_organizations_summary_response_model import AdminOrganizationsSummaryResponseModel +from hyperstack.models.admin_user_fields import AdminUserFields +from hyperstack.models.admin_user_response_model import AdminUserResponseModel +from hyperstack.models.admin_users_response_model import AdminUsersResponseModel +from hyperstack.models.admin_version_response_model import AdminVersionResponseModel +from hyperstack.models.admin_volume_resource import AdminVolumeResource from hyperstack.models.adminaddorganizationpayload import Adminaddorganizationpayload from hyperstack.models.admincreditpostpayload import Admincreditpostpayload +from hyperstack.models.adminpaymenthistoryfields import Adminpaymenthistoryfields +from hyperstack.models.adminpaymenthistoryresponse import Adminpaymenthistoryresponse from hyperstack.models.adminrechargehistoryfields import Adminrechargehistoryfields from hyperstack.models.adminrechargehistoryresponse import Adminrechargehistoryresponse from hyperstack.models.adminthresholdpostpayload import Adminthresholdpostpayload +from hyperstack.models.api_key_fields import ApiKeyFields from hyperstack.models.api_key_verify_fields import ApiKeyVerifyFields -from hyperstack.models.api_key_verify_response import ApiKeyVerifyResponse -from hyperstack.models.assign_rbac_role_payload import AssignRBACRolePayload +from hyperstack.models.assign_rbac_role_payload import AssignRbacRolePayload from hyperstack.models.attach_callback_payload import AttachCallbackPayload from hyperstack.models.attach_callback_response import AttachCallbackResponse +from hyperstack.models.attach_firewall_with_vm import AttachFirewallWithVM +from hyperstack.models.attach_firewalls_to_vm_payload import AttachFirewallsToVMPayload from hyperstack.models.attach_volume_fields import AttachVolumeFields from hyperstack.models.attach_volumes import AttachVolumes from hyperstack.models.attach_volumes_payload import AttachVolumesPayload +from hyperstack.models.auth_get_token_response_model import AuthGetTokenResponseModel +from hyperstack.models.auth_request_login_fields import AuthRequestLoginFields +from hyperstack.models.auth_request_login_response_model import AuthRequestLoginResponseModel +from hyperstack.models.auth_user_fields import AuthUserFields +from hyperstack.models.auth_user_info_response_model import AuthUserInfoResponseModel from hyperstack.models.billing_response import BillingResponse +from hyperstack.models.billingimmuneresources import Billingimmuneresources +from hyperstack.models.billingimmuneresourcesresponse import Billingimmuneresourcesresponse from hyperstack.models.billingmetricesfields import Billingmetricesfields from hyperstack.models.billingmetricesresponse import Billingmetricesresponse -from hyperstack.models.cluster_resource import ClusterResource +from hyperstack.models.common_response_model import CommonResponseModel from hyperstack.models.compliance_fields import ComplianceFields from hyperstack.models.compliance_model_fields import ComplianceModelFields from hyperstack.models.compliance_payload import CompliancePayload from hyperstack.models.compliance_response import ComplianceResponse from hyperstack.models.container_overview_fields import ContainerOverviewFields -from hyperstack.models.container_resource import ContainerResource +from hyperstack.models.contract_instance_fields import ContractInstanceFields +from hyperstack.models.contract_instances_response import ContractInstancesResponse +from hyperstack.models.create_contarct_fields import CreateContarctFields +from hyperstack.models.create_contract_payload import CreateContractPayload from hyperstack.models.create_discount_response import CreateDiscountResponse from hyperstack.models.create_discounts_payload import CreateDiscountsPayload from hyperstack.models.create_environment import CreateEnvironment +from hyperstack.models.create_firewall_payload import CreateFirewallPayload +from hyperstack.models.create_firewall_rule_payload import CreateFirewallRulePayload from hyperstack.models.create_gpu import CreateGPU from hyperstack.models.create_instances_payload import CreateInstancesPayload from hyperstack.models.create_profile_payload import CreateProfilePayload from hyperstack.models.create_profile_response import CreateProfileResponse from hyperstack.models.create_security_rule_payload import CreateSecurityRulePayload from hyperstack.models.create_update_compliance_response import CreateUpdateComplianceResponse +from hyperstack.models.create_update_permission_payload import CreateUpdatePermissionPayload +from hyperstack.models.create_update_permission_response_model import CreateUpdatePermissionResponseModel +from hyperstack.models.create_update_policy_payload import CreateUpdatePolicyPayload +from hyperstack.models.create_update_policy_response_model import CreateUpdatePolicyResponseModel +from hyperstack.models.create_update_rbac_role_payload import CreateUpdateRbacRolePayload from hyperstack.models.create_volume_payload import CreateVolumePayload +from hyperstack.models.customer_contract_detail_response_model import CustomerContractDetailResponseModel +from hyperstack.models.customer_contract_fields import CustomerContractFields +from hyperstack.models.customer_fields import CustomerFields +from hyperstack.models.customer_payload import CustomerPayload from hyperstack.models.dashboard_info_response import DashboardInfoResponse from hyperstack.models.deployment_fields import DeploymentFields from hyperstack.models.deployment_fieldsforstartdeployments import DeploymentFieldsforstartdeployments from hyperstack.models.deployments import Deployments from hyperstack.models.detach_volumes import DetachVolumes from hyperstack.models.detach_volumes_payload import DetachVolumesPayload -from hyperstack.models.discount_detail_response import DiscountDetailResponse +from hyperstack.models.discount_entity_model import DiscountEntityModel +from hyperstack.models.discount_fields import DiscountFields +from hyperstack.models.discount_plan_fields import DiscountPlanFields from hyperstack.models.discount_resource_fields import DiscountResourceFields +from hyperstack.models.editlabelofanexisting_vm_payload import EditlabelofanexistingVMPayload from hyperstack.models.environment import Environment from hyperstack.models.environment_fields import EnvironmentFields from hyperstack.models.environment_fieldsfor_volume import EnvironmentFieldsforVolume from hyperstack.models.environments import Environments -from hyperstack.models.envrionment_resources import EnvrionmentResources from hyperstack.models.error_response_model import ErrorResponseModel +from hyperstack.models.excludebillingpostpayload import Excludebillingpostpayload +from hyperstack.models.excludebillingpostresponse import Excludebillingpostresponse +from hyperstack.models.firewall_attachment_model import FirewallAttachmentModel +from hyperstack.models.firewall_attachment_vm_model import FirewallAttachmentVMModel +from hyperstack.models.firewall_detail_fields import FirewallDetailFields +from hyperstack.models.firewall_detail_response import FirewallDetailResponse +from hyperstack.models.firewall_environment_fields import FirewallEnvironmentFields +from hyperstack.models.firewall_fields import FirewallFields +from hyperstack.models.firewall_response import FirewallResponse +from hyperstack.models.firewall_rule import FirewallRule +from hyperstack.models.firewalls_list_response import FirewallsListResponse +from hyperstack.models.flavor_admin_response import FlavorAdminResponse +from hyperstack.models.flavor_admin_response_flavors import FlavorAdminResponseFlavors +from hyperstack.models.flavor_detail_response import FlavorDetailResponse from hyperstack.models.flavor_fields import FlavorFields from hyperstack.models.flavor_item_get_response import FlavorItemGetResponse from hyperstack.models.flavor_list_response import FlavorListResponse from hyperstack.models.flavor_object_fields import FlavorObjectFields from hyperstack.models.flavor_payload import FlavorPayload -from hyperstack.models.flavor_resource import FlavorResource from hyperstack.models.flavor_response import FlavorResponse +from hyperstack.models.flavor_vm_fields import FlavorVMFields +from hyperstack.models.flavor_vms_response import FlavorVMsResponse from hyperstack.models.future_node_model import FutureNodeModel from hyperstack.models.future_node_response_model import FutureNodeResponseModel from hyperstack.models.future_node_stock_model import FutureNodeStockModel @@ -131,9 +211,25 @@ from hyperstack.models.gpu_fields import GPUFields from hyperstack.models.gpu_list import GPUList from hyperstack.models.gpu_region_fields import GPURegionFields +from hyperstack.models.generate_api_key_response_model import GenerateApiKeyResponseModel from hyperstack.models.get_all_discount_for_all_organization_response import GetAllDiscountForAllOrganizationResponse -from hyperstack.models.get_token import GetToken -from hyperstack.models.get_token_response import GetTokenResponse +from hyperstack.models.get_all_discounts_fields import GetAllDiscountsFields +from hyperstack.models.get_api_key_response_model import GetApiKeyResponseModel +from hyperstack.models.get_contract_detail_response_model import GetContractDetailResponseModel +from hyperstack.models.get_contract_events_response_model import GetContractEventsResponseModel +from hyperstack.models.get_contracts_list_response_model import GetContractsListResponseModel +from hyperstack.models.get_customer_contracts_list_response_model import GetCustomerContractsListResponseModel +from hyperstack.models.get_discount_detail_response import GetDiscountDetailResponse +from hyperstack.models.get_discount_response import GetDiscountResponse +from hyperstack.models.get_entity_discount_detail_response import GetEntityDiscountDetailResponse +from hyperstack.models.get_invites_response_model import GetInvitesResponseModel +from hyperstack.models.get_organization_response_model import GetOrganizationResponseModel +from hyperstack.models.get_permissions_response_model import GetPermissionsResponseModel +from hyperstack.models.get_policies_response_model import GetPoliciesResponseModel +from hyperstack.models.get_rbac_roles_response_model import GetRbacRolesResponseModel +from hyperstack.models.get_token_payload import GetTokenPayload +from hyperstack.models.get_user_permissions_response_model import GetUserPermissionsResponseModel +from hyperstack.models.get_version_response import GetVersionResponse from hyperstack.models.getcreditandthresholdinfo import Getcreditandthresholdinfo from hyperstack.models.getcreditandthresholdinfoinresponse import Getcreditandthresholdinfoinresponse from hyperstack.models.image_fields import ImageFields @@ -145,17 +241,21 @@ from hyperstack.models.infrahub_resource_object_response import InfrahubResourceObjectResponse from hyperstack.models.insert_discount_plan_fields import InsertDiscountPlanFields from hyperstack.models.instance import Instance +from hyperstack.models.instance_admin import InstanceAdmin from hyperstack.models.instance_admin_fields import InstanceAdminFields from hyperstack.models.instance_environment_fields import InstanceEnvironmentFields from hyperstack.models.instance_events import InstanceEvents from hyperstack.models.instance_events_fields import InstanceEventsFields +from hyperstack.models.instance_fields import InstanceFields from hyperstack.models.instance_flavor_fields import InstanceFlavorFields from hyperstack.models.instance_image_fields import InstanceImageFields from hyperstack.models.instance_keypair_fields import InstanceKeypairFields from hyperstack.models.instance_overview_fields import InstanceOverviewFields from hyperstack.models.instance_resize_payload import InstanceResizePayload -from hyperstack.models.instance_resources import InstanceResources from hyperstack.models.instances import Instances +from hyperstack.models.instances_admin import InstancesAdmin +from hyperstack.models.instances_summary_admin import InstancesSummaryAdmin +from hyperstack.models.instances_summary_fields import InstancesSummaryFields from hyperstack.models.internal_environment_fields import InternalEnvironmentFields from hyperstack.models.internal_instance_fields import InternalInstanceFields from hyperstack.models.internal_instance_flavor_fields import InternalInstanceFlavorFields @@ -166,16 +266,18 @@ from hyperstack.models.internal_volume_attachment_fields import InternalVolumeAttachmentFields from hyperstack.models.internal_volume_fields import InternalVolumeFields from hyperstack.models.internal_volumes_response import InternalVolumesResponse -from hyperstack.models.invite import Invite from hyperstack.models.invite_fields import InviteFields -from hyperstack.models.invite_user import InviteUser -from hyperstack.models.invites import Invites +from hyperstack.models.invite_user_payload import InviteUserPayload +from hyperstack.models.invite_user_response_model import InviteUserResponseModel from hyperstack.models.keypair_fields import KeypairFields from hyperstack.models.keypairs import Keypairs +from hyperstack.models.lable_resonse import LableResonse from hyperstack.models.lastdaycostfields import Lastdaycostfields from hyperstack.models.lastdaycostresponse import Lastdaycostresponse from hyperstack.models.logo_get_response import LogoGetResponse -from hyperstack.models.logout import Logout +from hyperstack.models.logout_payload import LogoutPayload +from hyperstack.models.metric_item_fields import MetricItemFields +from hyperstack.models.metrics_fields import MetricsFields from hyperstack.models.new_configurations_response import NewConfigurationsResponse from hyperstack.models.new_model_response import NewModelResponse from hyperstack.models.new_stock_response import NewStockResponse @@ -188,15 +290,9 @@ from hyperstack.models.node_stock_payload_model import NodeStockPayloadModel from hyperstack.models.node_stock_response_model import NodeStockResponseModel from hyperstack.models.node_stocks_payload import NodeStocksPayload -from hyperstack.models.organization_info_model import OrganizationInfoModel -from hyperstack.models.organization_model import OrganizationModel +from hyperstack.models.organization_fields import OrganizationFields from hyperstack.models.organization_object_response import OrganizationObjectResponse -from hyperstack.models.organization_resource_list import OrganizationResourceList -from hyperstack.models.organization_resource_response import OrganizationResourceResponse -from hyperstack.models.organization_resources import OrganizationResources -from hyperstack.models.organization_response_model import OrganizationResponseModel -from hyperstack.models.organization_user_model import OrganizationUserModel -from hyperstack.models.organizations_response_model import OrganizationsResponseModel +from hyperstack.models.organization_user_response_model import OrganizationUserResponseModel from hyperstack.models.overview_info import OverviewInfo from hyperstack.models.payment_details_fields import PaymentDetailsFields from hyperstack.models.payment_details_response import PaymentDetailsResponse @@ -204,37 +300,25 @@ from hyperstack.models.payment_initiate_payload import PaymentInitiatePayload from hyperstack.models.payment_initiate_response import PaymentInitiateResponse from hyperstack.models.permission_fields import PermissionFields -from hyperstack.models.permission_fieldsfor_user_permission import PermissionFieldsforUserPermission -from hyperstack.models.permission_payload import PermissionPayload -from hyperstack.models.permission_response import PermissionResponse -from hyperstack.models.permissions import Permissions -from hyperstack.models.permissionsfor_user_permission import PermissionsforUserPermission -from hyperstack.models.policies import Policies from hyperstack.models.policy_fields import PolicyFields -from hyperstack.models.policy_payload import PolicyPayload from hyperstack.models.policy_permission_fields import PolicyPermissionFields -from hyperstack.models.policy_response import PolicyResponse from hyperstack.models.power_usage_model import PowerUsageModel from hyperstack.models.pricebook_model import PricebookModel from hyperstack.models.pricebook_resource_object_response import PricebookResourceObjectResponse from hyperstack.models.profile_fields import ProfileFields from hyperstack.models.profile_list_response import ProfileListResponse from hyperstack.models.profile_object_fields import ProfileObjectFields -from hyperstack.models.rbac_role import RBACRole -from hyperstack.models.rbac_role_fieldfor_organization import RBACRoleFieldforOrganization -from hyperstack.models.rbac_role_fields import RBACRoleFields -from hyperstack.models.rbac_role_payload import RBACRolePayload -from hyperstack.models.rbac_roles import RBACRoles -from hyperstack.models.refresh_token import RefreshToken +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel +from hyperstack.models.rbac_role_field import RbacRoleField +from hyperstack.models.rbac_role_fields import RbacRoleFields +from hyperstack.models.refresh_token_payload import RefreshTokenPayload from hyperstack.models.region_fields import RegionFields from hyperstack.models.region_payload import RegionPayload from hyperstack.models.region_response import RegionResponse from hyperstack.models.regions import Regions -from hyperstack.models.remove_member_response import RemoveMemberResponse -from hyperstack.models.removemember import Removemember +from hyperstack.models.remove_member_from_organization_response_model import RemoveMemberFromOrganizationResponseModel +from hyperstack.models.remove_member_payload import RemoveMemberPayload from hyperstack.models.request_console import RequestConsole -from hyperstack.models.request_login_data_response import RequestLoginDataResponse -from hyperstack.models.request_login_response import RequestLoginResponse from hyperstack.models.resource_payload import ResourcePayload from hyperstack.models.response_model import ResponseModel from hyperstack.models.role_permission_fields import RolePermissionFields @@ -243,6 +327,7 @@ from hyperstack.models.security_group_rule_fields import SecurityGroupRuleFields from hyperstack.models.security_rules_fieldsfor_instance import SecurityRulesFieldsforInstance from hyperstack.models.security_rules_protocol_fields import SecurityRulesProtocolFields +from hyperstack.models.set_defaults_payload import SetDefaultsPayload from hyperstack.models.single_visibility_user_response import SingleVisibilityUserResponse from hyperstack.models.start_deployment import StartDeployment from hyperstack.models.start_deployment_payload import StartDeploymentPayload @@ -253,22 +338,33 @@ from hyperstack.models.template_fields import TemplateFields from hyperstack.models.templates import Templates from hyperstack.models.token_fields import TokenFields +from hyperstack.models.update_contract_payload import UpdateContractPayload from hyperstack.models.update_discounts_payload import UpdateDiscountsPayload from hyperstack.models.update_discounts_status_payload import UpdateDiscountsStatusPayload from hyperstack.models.update_environment import UpdateEnvironment from hyperstack.models.update_gpu import UpdateGPU from hyperstack.models.update_keypair_name import UpdateKeypairName from hyperstack.models.update_keypairnameresponse import UpdateKeypairnameresponse +from hyperstack.models.update_organization_payload import UpdateOrganizationPayload +from hyperstack.models.update_organization_response_model import UpdateOrganizationResponseModel from hyperstack.models.update_template import UpdateTemplate -from hyperstack.models.user_fields import UserFields -from hyperstack.models.user_info_response import UserInfoResponse +from hyperstack.models.user_default_choice_for_admin_fields import UserDefaultChoiceForAdminFields +from hyperstack.models.user_default_choice_for_user_fields import UserDefaultChoiceForUserFields +from hyperstack.models.user_default_choices_for_admin_response import UserDefaultChoicesForAdminResponse +from hyperstack.models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse +from hyperstack.models.user_permission_fields import UserPermissionFields +from hyperstack.models.user_transfer_payload import UserTransferPayload +from hyperstack.models.userinfopostpayload import Userinfopostpayload +from hyperstack.models.users_info_fields import UsersInfoFields +from hyperstack.models.users_info_list_response import UsersInfoListResponse from hyperstack.models.vncurl import VNCURL from hyperstack.models.vncurl_fields import VNCURLFields +from hyperstack.models.verify_api_key_payload import VerifyApiKeyPayload +from hyperstack.models.verify_api_key_response_model import VerifyApiKeyResponseModel from hyperstack.models.volume import Volume from hyperstack.models.volume_attachment_fields import VolumeAttachmentFields from hyperstack.models.volume_fields import VolumeFields from hyperstack.models.volume_fieldsfor_instance import VolumeFieldsforInstance from hyperstack.models.volume_overview_fields import VolumeOverviewFields -from hyperstack.models.volume_resource import VolumeResource from hyperstack.models.volume_types import VolumeTypes from hyperstack.models.volumes import Volumes diff --git a/hyperstack/api/__init__.py b/hyperstack/api/__init__.py index d323977..2e34cd7 100644 --- a/hyperstack/api/__init__.py +++ b/hyperstack/api/__init__.py @@ -1,6 +1,7 @@ # flake8: noqa # import apis into api package +from hyperstack.api.customer_contract_api import CustomerContractApi from hyperstack.api.pricebook_api import PricebookApi from hyperstack.api.alive_api import AliveApi from hyperstack.api.api_key_api import ApiKeyApi @@ -13,6 +14,8 @@ from hyperstack.api.dashboard_api import DashboardApi from hyperstack.api.deployment_api import DeploymentApi from hyperstack.api.environment_api import EnvironmentApi +from hyperstack.api.firewall_attachment_api import FirewallAttachmentApi +from hyperstack.api.firewalls_api import FirewallsApi from hyperstack.api.flavor_api import FlavorApi from hyperstack.api.floating_ip_api import FloatingIpApi from hyperstack.api.gpu_api import GpuApi @@ -29,6 +32,8 @@ from hyperstack.api.security_rules_api import SecurityRulesApi from hyperstack.api.stock_api import StockApi from hyperstack.api.template_api import TemplateApi +from hyperstack.api.user_api import UserApi +from hyperstack.api.user_detail_choice_api import UserDetailChoiceApi from hyperstack.api.user_permission_api import UserPermissionApi from hyperstack.api.virtual_machine_api import VirtualMachineApi from hyperstack.api.virtual_machine_events_api import VirtualMachineEventsApi diff --git a/hyperstack/api/api_key_api.py b/hyperstack/api/api_key_api.py index f9d8c6a..3140a85 100644 --- a/hyperstack/api/api_key_api.py +++ b/hyperstack/api/api_key_api.py @@ -16,8 +16,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from hyperstack.models.api_key import APIKey -from hyperstack.models.api_keygeneration import APIKeygeneration +from hyperstack.models.generate_api_key_response_model import GenerateApiKeyResponseModel +from hyperstack.models.get_api_key_response_model import GetApiKeyResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -52,7 +52,7 @@ def generate_api_key( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> APIKeygeneration: + ) -> GenerateApiKeyResponseModel: """Generate API Key @@ -86,7 +86,7 @@ def generate_api_key( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "APIKeygeneration", + '200': "GenerateApiKeyResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -117,7 +117,7 @@ def generate_api_key_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[APIKeygeneration]: + ) -> ApiResponse[GenerateApiKeyResponseModel]: """Generate API Key @@ -151,7 +151,7 @@ def generate_api_key_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "APIKeygeneration", + '200': "GenerateApiKeyResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -216,7 +216,7 @@ def generate_api_key_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "APIKeygeneration", + '200': "GenerateApiKeyResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -301,7 +301,7 @@ def get_api_key( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> APIKey: + ) -> GetApiKeyResponseModel: """Get API Key @@ -335,7 +335,7 @@ def get_api_key( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "APIKey", + '200': "GetApiKeyResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -366,7 +366,7 @@ def get_api_key_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[APIKey]: + ) -> ApiResponse[GetApiKeyResponseModel]: """Get API Key @@ -400,7 +400,7 @@ def get_api_key_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "APIKey", + '200': "GetApiKeyResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -465,7 +465,7 @@ def get_api_key_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "APIKey", + '200': "GetApiKeyResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, diff --git a/hyperstack/api/assigning_member_role_api.py b/hyperstack/api/assigning_member_role_api.py index 775d0cb..4474450 100644 --- a/hyperstack/api/assigning_member_role_api.py +++ b/hyperstack/api/assigning_member_role_api.py @@ -17,9 +17,9 @@ from typing_extensions import Annotated from pydantic import StrictInt -from hyperstack.models.assign_rbac_role_payload import AssignRBACRolePayload -from hyperstack.models.rbac_role import RBACRole -from hyperstack.models.response_model import ResponseModel +from hyperstack.models.assign_rbac_role_payload import AssignRbacRolePayload +from hyperstack.models.common_response_model import CommonResponseModel +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -43,7 +43,7 @@ def __init__(self, api_client=None) -> None: def assign_rbac_roles( self, user_id: StrictInt, - payload: AssignRBACRolePayload, + payload: AssignRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -56,14 +56,14 @@ def assign_rbac_roles( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RBACRole: + ) -> RbacRoleDetailResponseModel: """Assign RBAC Roles :param user_id: (required) :type user_id: int :param payload: (required) - :type payload: AssignRBACRolePayload + :type payload: AssignRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -96,7 +96,7 @@ def assign_rbac_roles( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -117,7 +117,7 @@ def assign_rbac_roles( def assign_rbac_roles_with_http_info( self, user_id: StrictInt, - payload: AssignRBACRolePayload, + payload: AssignRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -130,14 +130,14 @@ def assign_rbac_roles_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RBACRole]: + ) -> ApiResponse[RbacRoleDetailResponseModel]: """Assign RBAC Roles :param user_id: (required) :type user_id: int :param payload: (required) - :type payload: AssignRBACRolePayload + :type payload: AssignRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -170,7 +170,7 @@ def assign_rbac_roles_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -191,7 +191,7 @@ def assign_rbac_roles_with_http_info( def assign_rbac_roles_without_preload_content( self, user_id: StrictInt, - payload: AssignRBACRolePayload, + payload: AssignRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -211,7 +211,7 @@ def assign_rbac_roles_without_preload_content( :param user_id: (required) :type user_id: int :param payload: (required) - :type payload: AssignRBACRolePayload + :type payload: AssignRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -244,7 +244,7 @@ def assign_rbac_roles_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -351,7 +351,7 @@ def remove_role_from_a_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResponseModel: + ) -> CommonResponseModel: """Remove role from a user @@ -388,7 +388,7 @@ def remove_role_from_a_user( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -421,7 +421,7 @@ def remove_role_from_a_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResponseModel]: + ) -> ApiResponse[CommonResponseModel]: """Remove role from a user @@ -458,7 +458,7 @@ def remove_role_from_a_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -528,7 +528,7 @@ def remove_role_from_a_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", diff --git a/hyperstack/api/auth_api.py b/hyperstack/api/auth_api.py index 45f113f..5447f92 100644 --- a/hyperstack/api/auth_api.py +++ b/hyperstack/api/auth_api.py @@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from hyperstack.models.user_info_response import UserInfoResponse +from hyperstack.models.auth_user_info_response_model import AuthUserInfoResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -51,7 +51,7 @@ def auth_user_information( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserInfoResponse: + ) -> AuthUserInfoResponseModel: """Get me information @@ -85,7 +85,7 @@ def auth_user_information( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserInfoResponse", + '200': "AuthUserInfoResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -116,7 +116,7 @@ def auth_user_information_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserInfoResponse]: + ) -> ApiResponse[AuthUserInfoResponseModel]: """Get me information @@ -150,7 +150,7 @@ def auth_user_information_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserInfoResponse", + '200': "AuthUserInfoResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -215,7 +215,7 @@ def auth_user_information_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserInfoResponse", + '200': "AuthUserInfoResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, diff --git a/hyperstack/api/callbacks_api.py b/hyperstack/api/callbacks_api.py index 8c6c8d9..0b8edca 100644 --- a/hyperstack/api/callbacks_api.py +++ b/hyperstack/api/callbacks_api.py @@ -40,7 +40,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def attach_a_callback_to_a_volume( + def attach_callback_to_virtual_machine( self, id: StrictInt, payload: AttachCallbackPayload, @@ -57,8 +57,9 @@ def attach_a_callback_to_a_volume( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AttachCallbackResponse: - """Attach a callback to a volume + """Attach callback to virtual machine + Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine). :param id: (required) :type id: int @@ -86,7 +87,7 @@ def attach_a_callback_to_a_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_a_callback_to_a_volume_serialize( + _param = self._attach_callback_to_virtual_machine_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -114,7 +115,7 @@ def attach_a_callback_to_a_volume( @validate_call - def attach_a_callback_to_a_volume_with_http_info( + def attach_callback_to_virtual_machine_with_http_info( self, id: StrictInt, payload: AttachCallbackPayload, @@ -131,8 +132,9 @@ def attach_a_callback_to_a_volume_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[AttachCallbackResponse]: - """Attach a callback to a volume + """Attach callback to virtual machine + Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine). :param id: (required) :type id: int @@ -160,7 +162,7 @@ def attach_a_callback_to_a_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_a_callback_to_a_volume_serialize( + _param = self._attach_callback_to_virtual_machine_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -188,7 +190,7 @@ def attach_a_callback_to_a_volume_with_http_info( @validate_call - def attach_a_callback_to_a_volume_without_preload_content( + def attach_callback_to_virtual_machine_without_preload_content( self, id: StrictInt, payload: AttachCallbackPayload, @@ -205,8 +207,9 @@ def attach_a_callback_to_a_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Attach a callback to a volume + """Attach callback to virtual machine + Creates a callback URL for a specified virtual machine, enabling the posting of action events executed on the virtual machine to the specified URL. Provide the callback URL in the request body and the ID of the virtual machine to which it is being attached in the path. For more details on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks#attach-a-callback-url-to-an-existing-virtual-machine). :param id: (required) :type id: int @@ -234,7 +237,7 @@ def attach_a_callback_to_a_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_a_callback_to_a_volume_serialize( + _param = self._attach_callback_to_virtual_machine_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -257,7 +260,7 @@ def attach_a_callback_to_a_volume_without_preload_content( return response_data.response - def _attach_a_callback_to_a_volume_serialize( + def _attach_callback_to_virtual_machine_serialize( self, id, payload, @@ -319,7 +322,7 @@ def _attach_a_callback_to_a_volume_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/core/volumes/{id}/attach-callback', + resource_path='/core/virtual-machines/{id}/attach-callback', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -336,7 +339,7 @@ def _attach_a_callback_to_a_volume_serialize( @validate_call - def attach_a_callback_to_an_instance( + def attach_callback_to_volume( self, id: StrictInt, payload: AttachCallbackPayload, @@ -353,8 +356,9 @@ def attach_a_callback_to_an_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AttachCallbackResponse: - """Attach a callback to an instance + """Attach callback to volume + Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -382,7 +386,7 @@ def attach_a_callback_to_an_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_a_callback_to_an_instance_serialize( + _param = self._attach_callback_to_volume_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -410,7 +414,7 @@ def attach_a_callback_to_an_instance( @validate_call - def attach_a_callback_to_an_instance_with_http_info( + def attach_callback_to_volume_with_http_info( self, id: StrictInt, payload: AttachCallbackPayload, @@ -427,8 +431,9 @@ def attach_a_callback_to_an_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[AttachCallbackResponse]: - """Attach a callback to an instance + """Attach callback to volume + Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -456,7 +461,7 @@ def attach_a_callback_to_an_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_a_callback_to_an_instance_serialize( + _param = self._attach_callback_to_volume_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -484,7 +489,7 @@ def attach_a_callback_to_an_instance_with_http_info( @validate_call - def attach_a_callback_to_an_instance_without_preload_content( + def attach_callback_to_volume_without_preload_content( self, id: StrictInt, payload: AttachCallbackPayload, @@ -501,8 +506,9 @@ def attach_a_callback_to_an_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Attach a callback to an instance + """Attach callback to volume + Creates a callback URL for a specified volume, enabling the posting of action events executed on the volume to the specified URL. Provide the callback URL in the request body and the ID of the volume to which it is being attached in the path. For more details on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -530,7 +536,7 @@ def attach_a_callback_to_an_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_a_callback_to_an_instance_serialize( + _param = self._attach_callback_to_volume_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -553,7 +559,7 @@ def attach_a_callback_to_an_instance_without_preload_content( return response_data.response - def _attach_a_callback_to_an_instance_serialize( + def _attach_callback_to_volume_serialize( self, id, payload, @@ -615,7 +621,7 @@ def _attach_a_callback_to_an_instance_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/core/virtual-machines/{id}/attach-callback', + resource_path='/core/volumes/{id}/attach-callback', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -632,7 +638,7 @@ def _attach_a_callback_to_an_instance_serialize( @validate_call - def delete_a_callback_url_for_an_instance( + def delete_virtual_machine_callback( self, id: StrictInt, _request_timeout: Union[ @@ -648,8 +654,9 @@ def delete_a_callback_url_for_an_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete a callback URL for an instance + """Delete virtual machine callback + Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -675,7 +682,7 @@ def delete_a_callback_url_for_an_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_callback_url_for_an_instance_serialize( + _param = self._delete_virtual_machine_callback_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -702,7 +709,7 @@ def delete_a_callback_url_for_an_instance( @validate_call - def delete_a_callback_url_for_an_instance_with_http_info( + def delete_virtual_machine_callback_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -718,8 +725,9 @@ def delete_a_callback_url_for_an_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete a callback URL for an instance + """Delete virtual machine callback + Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -745,7 +753,7 @@ def delete_a_callback_url_for_an_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_callback_url_for_an_instance_serialize( + _param = self._delete_virtual_machine_callback_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -772,7 +780,7 @@ def delete_a_callback_url_for_an_instance_with_http_info( @validate_call - def delete_a_callback_url_for_an_instance_without_preload_content( + def delete_virtual_machine_callback_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -788,8 +796,9 @@ def delete_a_callback_url_for_an_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a callback URL for an instance + """Delete virtual machine callback + Permanently deletes the callback URL associated with a specified virtual machine by providing the virtual machine ID in the request path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -815,7 +824,7 @@ def delete_a_callback_url_for_an_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_callback_url_for_an_instance_serialize( + _param = self._delete_virtual_machine_callback_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -837,7 +846,7 @@ def delete_a_callback_url_for_an_instance_without_preload_content( return response_data.response - def _delete_a_callback_url_for_an_instance_serialize( + def _delete_virtual_machine_callback_serialize( self, id, _request_auth, @@ -900,7 +909,7 @@ def _delete_a_callback_url_for_an_instance_serialize( @validate_call - def delete_callback_url_for_a_volume( + def delete_volume_callback( self, id: StrictInt, _request_timeout: Union[ @@ -916,8 +925,9 @@ def delete_callback_url_for_a_volume( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete callback URL for a volume + """Delete volume callback + Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -943,7 +953,7 @@ def delete_callback_url_for_a_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_callback_url_for_a_volume_serialize( + _param = self._delete_volume_callback_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -970,7 +980,7 @@ def delete_callback_url_for_a_volume( @validate_call - def delete_callback_url_for_a_volume_with_http_info( + def delete_volume_callback_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -986,8 +996,9 @@ def delete_callback_url_for_a_volume_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete callback URL for a volume + """Delete volume callback + Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1013,7 +1024,7 @@ def delete_callback_url_for_a_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_callback_url_for_a_volume_serialize( + _param = self._delete_volume_callback_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1040,7 +1051,7 @@ def delete_callback_url_for_a_volume_with_http_info( @validate_call - def delete_callback_url_for_a_volume_without_preload_content( + def delete_volume_callback_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -1056,8 +1067,9 @@ def delete_callback_url_for_a_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete callback URL for a volume + """Delete volume callback + Permanently deletes the callback URL associated with a specified volume by providing the volume ID in the request path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1083,7 +1095,7 @@ def delete_callback_url_for_a_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_callback_url_for_a_volume_serialize( + _param = self._delete_volume_callback_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1105,7 +1117,7 @@ def delete_callback_url_for_a_volume_without_preload_content( return response_data.response - def _delete_callback_url_for_a_volume_serialize( + def _delete_volume_callback_serialize( self, id, _request_auth, @@ -1168,7 +1180,7 @@ def _delete_callback_url_for_a_volume_serialize( @validate_call - def update_a_callback_url( + def update_virtual_machine_callback( self, id: StrictInt, payload: AttachCallbackPayload, @@ -1185,8 +1197,9 @@ def update_a_callback_url( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AttachCallbackResponse: - """Update a callback URL + """Update virtual machine callback + Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1214,7 +1227,7 @@ def update_a_callback_url( :return: Returns the result object. """ # noqa: E501 - _param = self._update_a_callback_url_serialize( + _param = self._update_virtual_machine_callback_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1242,7 +1255,7 @@ def update_a_callback_url( @validate_call - def update_a_callback_url_with_http_info( + def update_virtual_machine_callback_with_http_info( self, id: StrictInt, payload: AttachCallbackPayload, @@ -1259,8 +1272,9 @@ def update_a_callback_url_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[AttachCallbackResponse]: - """Update a callback URL + """Update virtual machine callback + Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1288,7 +1302,7 @@ def update_a_callback_url_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_a_callback_url_serialize( + _param = self._update_virtual_machine_callback_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1316,7 +1330,7 @@ def update_a_callback_url_with_http_info( @validate_call - def update_a_callback_url_without_preload_content( + def update_virtual_machine_callback_without_preload_content( self, id: StrictInt, payload: AttachCallbackPayload, @@ -1333,8 +1347,9 @@ def update_a_callback_url_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update a callback URL + """Update virtual machine callback + Updates the callback URL for a specified virtual machine. Provide the new callback URL in the request body, along with the ID of the associated virtual machine in the path. For additional information on virtual machine callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1362,7 +1377,7 @@ def update_a_callback_url_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_a_callback_url_serialize( + _param = self._update_virtual_machine_callback_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1385,7 +1400,7 @@ def update_a_callback_url_without_preload_content( return response_data.response - def _update_a_callback_url_serialize( + def _update_virtual_machine_callback_serialize( self, id, payload, @@ -1464,7 +1479,7 @@ def _update_a_callback_url_serialize( @validate_call - def update_callback_url_for_volume( + def update_volume_callback( self, id: StrictInt, payload: AttachCallbackPayload, @@ -1481,8 +1496,9 @@ def update_callback_url_for_volume( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AttachCallbackResponse: - """Update callback URL for volume + """Update volume callback + Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1510,7 +1526,7 @@ def update_callback_url_for_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._update_callback_url_for_volume_serialize( + _param = self._update_volume_callback_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1538,7 +1554,7 @@ def update_callback_url_for_volume( @validate_call - def update_callback_url_for_volume_with_http_info( + def update_volume_callback_with_http_info( self, id: StrictInt, payload: AttachCallbackPayload, @@ -1555,8 +1571,9 @@ def update_callback_url_for_volume_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[AttachCallbackResponse]: - """Update callback URL for volume + """Update volume callback + Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1584,7 +1601,7 @@ def update_callback_url_for_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_callback_url_for_volume_serialize( + _param = self._update_volume_callback_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1612,7 +1629,7 @@ def update_callback_url_for_volume_with_http_info( @validate_call - def update_callback_url_for_volume_without_preload_content( + def update_volume_callback_without_preload_content( self, id: StrictInt, payload: AttachCallbackPayload, @@ -1629,8 +1646,9 @@ def update_callback_url_for_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update callback URL for volume + """Update volume callback + Updates the callback URL for a specified volume. Provide the new callback URL in the request body, along with the ID of the associated volume in the path. For additional information on volume callback URLs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks). :param id: (required) :type id: int @@ -1658,7 +1676,7 @@ def update_callback_url_for_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_callback_url_for_volume_serialize( + _param = self._update_volume_callback_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1681,7 +1699,7 @@ def update_callback_url_for_volume_without_preload_content( return response_data.response - def _update_callback_url_for_volume_serialize( + def _update_volume_callback_serialize( self, id, payload, diff --git a/hyperstack/api/compliance_api.py b/hyperstack/api/compliance_api.py index 94775cb..83587c7 100644 --- a/hyperstack/api/compliance_api.py +++ b/hyperstack/api/compliance_api.py @@ -59,7 +59,7 @@ def create_compliance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateUpdateComplianceResponse: - """Create Compliance + """Create compliance :param payload: (required) @@ -131,7 +131,7 @@ def create_compliance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateUpdateComplianceResponse]: - """Create Compliance + """Create compliance :param payload: (required) @@ -203,7 +203,7 @@ def create_compliance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Compliance + """Create compliance :param payload: (required) @@ -598,7 +598,7 @@ def _delete_a_compliance_serialize( @validate_call - def get_compliance_list( + def retrieve_compliance( self, gpu: Annotated[Optional[Any], Field(description="This is for gpu model")] = None, _request_timeout: Union[ @@ -614,8 +614,9 @@ def get_compliance_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ComplianceResponse: - """Get Compliance List + """Retrieve GPU compliance + Returns a list of compliance objects each corresponding to available GPU models. These compliance objects contain minimum and maximum values for RAM in GB, number of vCPUs, and system disk capacity in GB. Use the optional `gpu` model parameter in the query string to filter responses by GPU model. For additional details on GPU compliance, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#adhering-to-gpu-compliance). :param gpu: This is for gpu model :type gpu: object @@ -641,7 +642,7 @@ def get_compliance_list( :return: Returns the result object. """ # noqa: E501 - _param = self._get_compliance_list_serialize( + _param = self._retrieve_compliance_serialize( gpu=gpu, _request_auth=_request_auth, _content_type=_content_type, @@ -669,7 +670,7 @@ def get_compliance_list( @validate_call - def get_compliance_list_with_http_info( + def retrieve_compliance_with_http_info( self, gpu: Annotated[Optional[Any], Field(description="This is for gpu model")] = None, _request_timeout: Union[ @@ -685,8 +686,9 @@ def get_compliance_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ComplianceResponse]: - """Get Compliance List + """Retrieve GPU compliance + Returns a list of compliance objects each corresponding to available GPU models. These compliance objects contain minimum and maximum values for RAM in GB, number of vCPUs, and system disk capacity in GB. Use the optional `gpu` model parameter in the query string to filter responses by GPU model. For additional details on GPU compliance, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#adhering-to-gpu-compliance). :param gpu: This is for gpu model :type gpu: object @@ -712,7 +714,7 @@ def get_compliance_list_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_compliance_list_serialize( + _param = self._retrieve_compliance_serialize( gpu=gpu, _request_auth=_request_auth, _content_type=_content_type, @@ -740,7 +742,7 @@ def get_compliance_list_with_http_info( @validate_call - def get_compliance_list_without_preload_content( + def retrieve_compliance_without_preload_content( self, gpu: Annotated[Optional[Any], Field(description="This is for gpu model")] = None, _request_timeout: Union[ @@ -756,8 +758,9 @@ def get_compliance_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Compliance List + """Retrieve GPU compliance + Returns a list of compliance objects each corresponding to available GPU models. These compliance objects contain minimum and maximum values for RAM in GB, number of vCPUs, and system disk capacity in GB. Use the optional `gpu` model parameter in the query string to filter responses by GPU model. For additional details on GPU compliance, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#adhering-to-gpu-compliance). :param gpu: This is for gpu model :type gpu: object @@ -783,7 +786,7 @@ def get_compliance_list_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_compliance_list_serialize( + _param = self._retrieve_compliance_serialize( gpu=gpu, _request_auth=_request_auth, _content_type=_content_type, @@ -806,7 +809,7 @@ def get_compliance_list_without_preload_content( return response_data.response - def _get_compliance_list_serialize( + def _retrieve_compliance_serialize( self, gpu, _request_auth, diff --git a/hyperstack/api/customer_contract_api.py b/hyperstack/api/customer_contract_api.py new file mode 100644 index 0000000..3a2be7f --- /dev/null +++ b/hyperstack/api/customer_contract_api.py @@ -0,0 +1,597 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt +from typing import Optional +from hyperstack.models.customer_contract_detail_response_model import CustomerContractDetailResponseModel +from hyperstack.models.get_customer_contracts_list_response_model import GetCustomerContractsListResponseModel + +from hyperstack.api_client import ApiClient, RequestSerialized +from hyperstack.api_response import ApiResponse +from hyperstack.rest import RESTResponseType + + +class CustomerContractApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def details_of_contract_by_id_for_customer( + self, + contract_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CustomerContractDetailResponseModel: + """Details of Contract by ID for Customer + + + :param contract_id: (required) + :type contract_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._details_of_contract_by_id_for_customer_serialize( + contract_id=contract_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomerContractDetailResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def details_of_contract_by_id_for_customer_with_http_info( + self, + contract_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CustomerContractDetailResponseModel]: + """Details of Contract by ID for Customer + + + :param contract_id: (required) + :type contract_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._details_of_contract_by_id_for_customer_serialize( + contract_id=contract_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomerContractDetailResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def details_of_contract_by_id_for_customer_without_preload_content( + self, + contract_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Details of Contract by ID for Customer + + + :param contract_id: (required) + :type contract_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._details_of_contract_by_id_for_customer_serialize( + contract_id=contract_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CustomerContractDetailResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _details_of_contract_by_id_for_customer_serialize( + self, + contract_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if contract_id is not None: + _path_params['contract_id'] = contract_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/pricebook/contracts/{contract_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_contracts_for_customer( + self, + page: Optional[StrictInt] = None, + per_page: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetCustomerContractsListResponseModel: + """List Contracts for Customer + + + :param page: + :type page: int + :param per_page: + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_contracts_for_customer_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCustomerContractsListResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_contracts_for_customer_with_http_info( + self, + page: Optional[StrictInt] = None, + per_page: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetCustomerContractsListResponseModel]: + """List Contracts for Customer + + + :param page: + :type page: int + :param per_page: + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_contracts_for_customer_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCustomerContractsListResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_contracts_for_customer_without_preload_content( + self, + page: Optional[StrictInt] = None, + per_page: Optional[StrictInt] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Contracts for Customer + + + :param page: + :type page: int + :param per_page: + :type per_page: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_contracts_for_customer_serialize( + page=page, + per_page=per_page, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCustomerContractsListResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_contracts_for_customer_serialize( + self, + page, + per_page, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if per_page is not None: + + _query_params.append(('per_page', per_page)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/pricebook/contracts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hyperstack/api/dashboard_api.py b/hyperstack/api/dashboard_api.py index 7e92393..c486861 100644 --- a/hyperstack/api/dashboard_api.py +++ b/hyperstack/api/dashboard_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def get_instances_containers_and_volumes_overview( + def retrieve_dashboard( self, _request_timeout: Union[ None, @@ -52,8 +52,9 @@ def get_instances_containers_and_volumes_overview( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> DashboardInfoResponse: - """Get Instances, Containers and Volumes Overview + """Retrieve Dashboard + Returns hardware and pricing overview for your active resources, including virtual machines, containers, and volumes. For additional information on the Dashboard feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/dashboard). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -77,7 +78,7 @@ def get_instances_containers_and_volumes_overview( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instances_containers_and_volumes_overview_serialize( + _param = self._retrieve_dashboard_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -102,7 +103,7 @@ def get_instances_containers_and_volumes_overview( @validate_call - def get_instances_containers_and_volumes_overview_with_http_info( + def retrieve_dashboard_with_http_info( self, _request_timeout: Union[ None, @@ -117,8 +118,9 @@ def get_instances_containers_and_volumes_overview_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[DashboardInfoResponse]: - """Get Instances, Containers and Volumes Overview + """Retrieve Dashboard + Returns hardware and pricing overview for your active resources, including virtual machines, containers, and volumes. For additional information on the Dashboard feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/dashboard). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -142,7 +144,7 @@ def get_instances_containers_and_volumes_overview_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instances_containers_and_volumes_overview_serialize( + _param = self._retrieve_dashboard_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -167,7 +169,7 @@ def get_instances_containers_and_volumes_overview_with_http_info( @validate_call - def get_instances_containers_and_volumes_overview_without_preload_content( + def retrieve_dashboard_without_preload_content( self, _request_timeout: Union[ None, @@ -182,8 +184,9 @@ def get_instances_containers_and_volumes_overview_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Instances, Containers and Volumes Overview + """Retrieve Dashboard + Returns hardware and pricing overview for your active resources, including virtual machines, containers, and volumes. For additional information on the Dashboard feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/dashboard). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -207,7 +210,7 @@ def get_instances_containers_and_volumes_overview_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_instances_containers_and_volumes_overview_serialize( + _param = self._retrieve_dashboard_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -227,7 +230,7 @@ def get_instances_containers_and_volumes_overview_without_preload_content( return response_data.response - def _get_instances_containers_and_volumes_overview_serialize( + def _retrieve_dashboard_serialize( self, _request_auth, _content_type, diff --git a/hyperstack/api/environment_api.py b/hyperstack/api/environment_api.py index 5718d30..7a2b3d5 100644 --- a/hyperstack/api/environment_api.py +++ b/hyperstack/api/environment_api.py @@ -58,8 +58,9 @@ def create_environment( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Environment: - """Create Environment + """Create environment + Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body. :param payload: (required) :type payload: CreateEnvironment @@ -129,8 +130,9 @@ def create_environment_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Environment]: - """Create Environment + """Create environment + Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body. :param payload: (required) :type payload: CreateEnvironment @@ -200,8 +202,9 @@ def create_environment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Environment + """Create environment + Creates an environment—a container to organize your resources, including SSH key pairs, virtual machines, and volumes. To create your environment, provide your desired environment name, and [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions) in the request body. :param payload: (required) :type payload: CreateEnvironment @@ -326,7 +329,7 @@ def _create_environment_serialize( @validate_call - def delete_an_environment( + def delete_environment( self, id: StrictInt, _request_timeout: Union[ @@ -342,8 +345,9 @@ def delete_an_environment( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete an environment + """Delete environment + Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment. :param id: (required) :type id: int @@ -369,7 +373,7 @@ def delete_an_environment( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_an_environment_serialize( + _param = self._delete_environment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -396,7 +400,7 @@ def delete_an_environment( @validate_call - def delete_an_environment_with_http_info( + def delete_environment_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -412,8 +416,9 @@ def delete_an_environment_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete an environment + """Delete environment + Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment. :param id: (required) :type id: int @@ -439,7 +444,7 @@ def delete_an_environment_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_an_environment_serialize( + _param = self._delete_environment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -466,7 +471,7 @@ def delete_an_environment_with_http_info( @validate_call - def delete_an_environment_without_preload_content( + def delete_environment_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -482,8 +487,9 @@ def delete_an_environment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete an environment + """Delete environment + Deletes an environment permanently. Provide the environment ID in the path to remove the specified environment. :param id: (required) :type id: int @@ -509,7 +515,7 @@ def delete_an_environment_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_an_environment_serialize( + _param = self._delete_environment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -531,7 +537,7 @@ def delete_an_environment_without_preload_content( return response_data.response - def _delete_an_environment_serialize( + def _delete_environment_serialize( self, id, _request_auth, @@ -594,9 +600,8 @@ def _delete_an_environment_serialize( @validate_call - def get_an_environment_details( + def list_environments( self, - id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -609,12 +614,11 @@ def get_an_environment_details( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Environment: - """Get an environment detail + ) -> Environments: + """List environments + Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features). - :param id: (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -637,8 +641,7 @@ def get_an_environment_details( :return: Returns the result object. """ # noqa: E501 - _param = self._get_an_environment_details_serialize( - id=id, + _param = self._list_environments_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -646,10 +649,9 @@ def get_an_environment_details( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Environment", + '200': "Environments", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -664,9 +666,8 @@ def get_an_environment_details( @validate_call - def get_an_environment_details_with_http_info( + def list_environments_with_http_info( self, - id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -679,12 +680,11 @@ def get_an_environment_details_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Environment]: - """Get an environment detail + ) -> ApiResponse[Environments]: + """List environments + Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features). - :param id: (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -707,8 +707,7 @@ def get_an_environment_details_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_an_environment_details_serialize( - id=id, + _param = self._list_environments_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -716,10 +715,9 @@ def get_an_environment_details_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Environment", + '200': "Environments", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -734,9 +732,8 @@ def get_an_environment_details_with_http_info( @validate_call - def get_an_environment_details_without_preload_content( + def list_environments_without_preload_content( self, - id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -750,11 +747,10 @@ def get_an_environment_details_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get an environment detail + """List environments + Returns a list of your existing environments, providing the following details for each; environment ID, name, [**region**](https://infrahub-doc.nexgencloud.com/docs/features/regions), and the date and time of creation. For more information on environments, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features). - :param id: (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -777,8 +773,7 @@ def get_an_environment_details_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_an_environment_details_serialize( - id=id, + _param = self._list_environments_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -786,10 +781,9 @@ def get_an_environment_details_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Environment", + '200': "Environments", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -799,9 +793,8 @@ def get_an_environment_details_without_preload_content( return response_data.response - def _get_an_environment_details_serialize( + def _list_environments_serialize( self, - id, _request_auth, _content_type, _headers, @@ -821,8 +814,6 @@ def _get_an_environment_details_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -845,7 +836,7 @@ def _get_an_environment_details_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/environments/{id}', + resource_path='/core/environments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -862,8 +853,9 @@ def _get_an_environment_details_serialize( @validate_call - def list_environments( + def retrieve_environment( self, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -876,10 +868,13 @@ def list_environments( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Environments: - """List Environments + ) -> Environment: + """Retrieve environment + Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -902,7 +897,8 @@ def list_environments( :return: Returns the result object. """ # noqa: E501 - _param = self._list_environments_serialize( + _param = self._retrieve_environment_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -910,9 +906,10 @@ def list_environments( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Environments", + '200': "Environment", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -927,8 +924,9 @@ def list_environments( @validate_call - def list_environments_with_http_info( + def retrieve_environment_with_http_info( self, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -941,10 +939,13 @@ def list_environments_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Environments]: - """List Environments + ) -> ApiResponse[Environment]: + """Retrieve environment + Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -967,7 +968,8 @@ def list_environments_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_environments_serialize( + _param = self._retrieve_environment_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -975,9 +977,10 @@ def list_environments_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Environments", + '200': "Environment", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -992,8 +995,9 @@ def list_environments_with_http_info( @validate_call - def list_environments_without_preload_content( + def retrieve_environment_without_preload_content( self, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1007,9 +1011,12 @@ def list_environments_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Environments + """Retrieve environment + Retrieves details about a specific environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1032,7 +1039,8 @@ def list_environments_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_environments_serialize( + _param = self._retrieve_environment_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1040,9 +1048,10 @@ def list_environments_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Environments", + '200': "Environment", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1052,8 +1061,9 @@ def list_environments_without_preload_content( return response_data.response - def _list_environments_serialize( + def _retrieve_environment_serialize( self, + id, _request_auth, _content_type, _headers, @@ -1073,6 +1083,8 @@ def _list_environments_serialize( _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1095,7 +1107,7 @@ def _list_environments_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/environments', + resource_path='/core/environments/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1112,7 +1124,7 @@ def _list_environments_serialize( @validate_call - def update_an_environment( + def update_environment( self, id: StrictInt, payload: UpdateEnvironment, @@ -1129,8 +1141,9 @@ def update_an_environment( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Environment: - """Update Environment + """Update environment + Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. :param id: (required) :type id: int @@ -1158,7 +1171,7 @@ def update_an_environment( :return: Returns the result object. """ # noqa: E501 - _param = self._update_an_environment_serialize( + _param = self._update_environment_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1186,7 +1199,7 @@ def update_an_environment( @validate_call - def update_an_environment_with_http_info( + def update_environment_with_http_info( self, id: StrictInt, payload: UpdateEnvironment, @@ -1203,8 +1216,9 @@ def update_an_environment_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Environment]: - """Update Environment + """Update environment + Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. :param id: (required) :type id: int @@ -1232,7 +1246,7 @@ def update_an_environment_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_an_environment_serialize( + _param = self._update_environment_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1260,7 +1274,7 @@ def update_an_environment_with_http_info( @validate_call - def update_an_environment_without_preload_content( + def update_environment_without_preload_content( self, id: StrictInt, payload: UpdateEnvironment, @@ -1277,8 +1291,9 @@ def update_an_environment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Environment + """Update environment + Updates the name of an existing environment. Provide the environment ID in the path and the new environment `name` in the request body to modify the specified environment. :param id: (required) :type id: int @@ -1306,7 +1321,7 @@ def update_an_environment_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_an_environment_serialize( + _param = self._update_environment_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1329,7 +1344,7 @@ def update_an_environment_without_preload_content( return response_data.response - def _update_an_environment_serialize( + def _update_environment_serialize( self, id, payload, diff --git a/hyperstack/api/firewall_attachment_api.py b/hyperstack/api/firewall_attachment_api.py new file mode 100644 index 0000000..66b3e22 --- /dev/null +++ b/hyperstack/api/firewall_attachment_api.py @@ -0,0 +1,340 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt +from hyperstack.models.attach_firewall_with_vm import AttachFirewallWithVM +from hyperstack.models.response_model import ResponseModel + +from hyperstack.api_client import ApiClient, RequestSerialized +from hyperstack.api_response import ApiResponse +from hyperstack.rest import RESTResponseType + + +class FirewallAttachmentApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def attach_firewall_to_vms( + self, + firewall_id: StrictInt, + payload: AttachFirewallWithVM, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResponseModel: + """Attach Firewalls to VMs + + + :param firewall_id: (required) + :type firewall_id: int + :param payload: (required) + :type payload: AttachFirewallWithVM + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._attach_firewall_to_vms_serialize( + firewall_id=firewall_id, + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def attach_firewall_to_vms_with_http_info( + self, + firewall_id: StrictInt, + payload: AttachFirewallWithVM, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResponseModel]: + """Attach Firewalls to VMs + + + :param firewall_id: (required) + :type firewall_id: int + :param payload: (required) + :type payload: AttachFirewallWithVM + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._attach_firewall_to_vms_serialize( + firewall_id=firewall_id, + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def attach_firewall_to_vms_without_preload_content( + self, + firewall_id: StrictInt, + payload: AttachFirewallWithVM, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Attach Firewalls to VMs + + + :param firewall_id: (required) + :type firewall_id: int + :param payload: (required) + :type payload: AttachFirewallWithVM + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._attach_firewall_to_vms_serialize( + firewall_id=firewall_id, + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _attach_firewall_to_vms_serialize( + self, + firewall_id, + payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewall_id'] = firewall_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if payload is not None: + _body_params = payload + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/core/firewalls/{firewall_id}/update-attachments', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hyperstack/api/firewalls_api.py b/hyperstack/api/firewalls_api.py new file mode 100644 index 0000000..f3cb731 --- /dev/null +++ b/hyperstack/api/firewalls_api.py @@ -0,0 +1,1713 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt +from hyperstack.models.create_firewall_payload import CreateFirewallPayload +from hyperstack.models.create_firewall_rule_payload import CreateFirewallRulePayload +from hyperstack.models.firewall_detail_response import FirewallDetailResponse +from hyperstack.models.firewall_response import FirewallResponse +from hyperstack.models.firewall_rule import FirewallRule +from hyperstack.models.firewalls_list_response import FirewallsListResponse +from hyperstack.models.response_model import ResponseModel + +from hyperstack.api_client import ApiClient, RequestSerialized +from hyperstack.api_response import ApiResponse +from hyperstack.rest import RESTResponseType + + +class FirewallsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def add_rules_to_firewall( + self, + firewall_id: StrictInt, + payload: CreateFirewallRulePayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirewallRule: + """Add Rules to Firewall + + + :param firewall_id: (required) + :type firewall_id: int + :param payload: (required) + :type payload: CreateFirewallRulePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_rules_to_firewall_serialize( + firewall_id=firewall_id, + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallRule", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def add_rules_to_firewall_with_http_info( + self, + firewall_id: StrictInt, + payload: CreateFirewallRulePayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirewallRule]: + """Add Rules to Firewall + + + :param firewall_id: (required) + :type firewall_id: int + :param payload: (required) + :type payload: CreateFirewallRulePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_rules_to_firewall_serialize( + firewall_id=firewall_id, + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallRule", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def add_rules_to_firewall_without_preload_content( + self, + firewall_id: StrictInt, + payload: CreateFirewallRulePayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Add Rules to Firewall + + + :param firewall_id: (required) + :type firewall_id: int + :param payload: (required) + :type payload: CreateFirewallRulePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_rules_to_firewall_serialize( + firewall_id=firewall_id, + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallRule", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _add_rules_to_firewall_serialize( + self, + firewall_id, + payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewall_id'] = firewall_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if payload is not None: + _body_params = payload + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/core/firewalls/{firewall_id}/firewall-rules', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_firewall( + self, + payload: CreateFirewallPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirewallResponse: + """Create Firewall + + + :param payload: (required) + :type payload: CreateFirewallPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_firewall_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_firewall_with_http_info( + self, + payload: CreateFirewallPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirewallResponse]: + """Create Firewall + + + :param payload: (required) + :type payload: CreateFirewallPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_firewall_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_firewall_without_preload_content( + self, + payload: CreateFirewallPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Firewall + + + :param payload: (required) + :type payload: CreateFirewallPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_firewall_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_firewall_serialize( + self, + payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if payload is not None: + _body_params = payload + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/core/firewalls', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_firewall( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResponseModel: + """Delete Firewall + + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_firewall_with_http_info( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResponseModel]: + """Delete Firewall + + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_firewall_without_preload_content( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Firewall + + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_firewall_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/core/firewalls/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_firewall_rules_from_firewall( + self, + firewall_id: StrictInt, + firewall_rule_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ResponseModel: + """Delete Firewall Rules from Firewall + + + :param firewall_id: (required) + :type firewall_id: int + :param firewall_rule_id: (required) + :type firewall_rule_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_rules_from_firewall_serialize( + firewall_id=firewall_id, + firewall_rule_id=firewall_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_firewall_rules_from_firewall_with_http_info( + self, + firewall_id: StrictInt, + firewall_rule_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ResponseModel]: + """Delete Firewall Rules from Firewall + + + :param firewall_id: (required) + :type firewall_id: int + :param firewall_rule_id: (required) + :type firewall_rule_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_rules_from_firewall_serialize( + firewall_id=firewall_id, + firewall_rule_id=firewall_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_firewall_rules_from_firewall_without_preload_content( + self, + firewall_id: StrictInt, + firewall_rule_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Firewall Rules from Firewall + + + :param firewall_id: (required) + :type firewall_id: int + :param firewall_rule_id: (required) + :type firewall_rule_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_firewall_rules_from_firewall_serialize( + firewall_id=firewall_id, + firewall_rule_id=firewall_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '409': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_firewall_rules_from_firewall_serialize( + self, + firewall_id, + firewall_rule_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if firewall_id is not None: + _path_params['firewall_id'] = firewall_id + if firewall_rule_id is not None: + _path_params['firewall_rule_id'] = firewall_rule_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def details_of_firewall_by_id( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirewallDetailResponse: + """Details of Firewall by ID + + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._details_of_firewall_by_id_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallDetailResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def details_of_firewall_by_id_with_http_info( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirewallDetailResponse]: + """Details of Firewall by ID + + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._details_of_firewall_by_id_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallDetailResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def details_of_firewall_by_id_without_preload_content( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Details of Firewall by ID + + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._details_of_firewall_by_id_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallDetailResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _details_of_firewall_by_id_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/core/firewalls/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_firewalls( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FirewallsListResponse: + """Retrieve Firewalls + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewalls_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallsListResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_firewalls_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FirewallsListResponse]: + """Retrieve Firewalls + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewalls_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallsListResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_firewalls_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve Firewalls + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_firewalls_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FirewallsListResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_firewalls_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/core/firewalls', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hyperstack/api/flavor_api.py b/hyperstack/api/flavor_api.py index 67b00c8..58fcccc 100644 --- a/hyperstack/api/flavor_api.py +++ b/hyperstack/api/flavor_api.py @@ -40,7 +40,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def retrieve_flavors( + def list_flavors( self, region: Annotated[Optional[Any], Field(description="Region Name")] = None, _request_timeout: Union[ @@ -56,8 +56,9 @@ def retrieve_flavors( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> FlavorListResponse: - """Retrieve Flavors + """List flavors + Returns a list of available virtual machine specification configurations, referred to as **flavors**. Include a `region_name` in the query string of the request to return only the flavors available in the specified region; the default value will retrieve flavors available in all regions. For more details on flavors, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors). :param region: Region Name :type region: object @@ -83,7 +84,7 @@ def retrieve_flavors( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_flavors_serialize( + _param = self._list_flavors_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -110,7 +111,7 @@ def retrieve_flavors( @validate_call - def retrieve_flavors_with_http_info( + def list_flavors_with_http_info( self, region: Annotated[Optional[Any], Field(description="Region Name")] = None, _request_timeout: Union[ @@ -126,8 +127,9 @@ def retrieve_flavors_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[FlavorListResponse]: - """Retrieve Flavors + """List flavors + Returns a list of available virtual machine specification configurations, referred to as **flavors**. Include a `region_name` in the query string of the request to return only the flavors available in the specified region; the default value will retrieve flavors available in all regions. For more details on flavors, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors). :param region: Region Name :type region: object @@ -153,7 +155,7 @@ def retrieve_flavors_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_flavors_serialize( + _param = self._list_flavors_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -180,7 +182,7 @@ def retrieve_flavors_with_http_info( @validate_call - def retrieve_flavors_without_preload_content( + def list_flavors_without_preload_content( self, region: Annotated[Optional[Any], Field(description="Region Name")] = None, _request_timeout: Union[ @@ -196,8 +198,9 @@ def retrieve_flavors_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve Flavors + """List flavors + Returns a list of available virtual machine specification configurations, referred to as **flavors**. Include a `region_name` in the query string of the request to return only the flavors available in the specified region; the default value will retrieve flavors available in all regions. For more details on flavors, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors). :param region: Region Name :type region: object @@ -223,7 +226,7 @@ def retrieve_flavors_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_flavors_serialize( + _param = self._list_flavors_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -245,7 +248,7 @@ def retrieve_flavors_without_preload_content( return response_data.response - def _retrieve_flavors_serialize( + def _list_flavors_serialize( self, region, _request_auth, diff --git a/hyperstack/api/floating_ip_api.py b/hyperstack/api/floating_ip_api.py index cccd3c2..66a4700 100644 --- a/hyperstack/api/floating_ip_api.py +++ b/hyperstack/api/floating_ip_api.py @@ -38,7 +38,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def attach_floating_ip_to_instance( + def attach_public_ip_to_virtual_machine( self, id: StrictInt, _request_timeout: Union[ @@ -54,8 +54,9 @@ def attach_floating_ip_to_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Attach Floating IP to Instance + """Attach public IP to virtual machine + Initiates the creation of a public IP address and attaches it to an existing virtual machine, making it accessible through the internet. Include the virtual machine ID in the path to attach a public IP to the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). :param id: (required) :type id: int @@ -81,7 +82,7 @@ def attach_floating_ip_to_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_floating_ip_to_instance_serialize( + _param = self._attach_public_ip_to_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -108,7 +109,7 @@ def attach_floating_ip_to_instance( @validate_call - def attach_floating_ip_to_instance_with_http_info( + def attach_public_ip_to_virtual_machine_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -124,8 +125,9 @@ def attach_floating_ip_to_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Attach Floating IP to Instance + """Attach public IP to virtual machine + Initiates the creation of a public IP address and attaches it to an existing virtual machine, making it accessible through the internet. Include the virtual machine ID in the path to attach a public IP to the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). :param id: (required) :type id: int @@ -151,7 +153,7 @@ def attach_floating_ip_to_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_floating_ip_to_instance_serialize( + _param = self._attach_public_ip_to_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -178,7 +180,7 @@ def attach_floating_ip_to_instance_with_http_info( @validate_call - def attach_floating_ip_to_instance_without_preload_content( + def attach_public_ip_to_virtual_machine_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -194,8 +196,9 @@ def attach_floating_ip_to_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Attach Floating IP to Instance + """Attach public IP to virtual machine + Initiates the creation of a public IP address and attaches it to an existing virtual machine, making it accessible through the internet. Include the virtual machine ID in the path to attach a public IP to the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). :param id: (required) :type id: int @@ -221,7 +224,7 @@ def attach_floating_ip_to_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_floating_ip_to_instance_serialize( + _param = self._attach_public_ip_to_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -243,7 +246,7 @@ def attach_floating_ip_to_instance_without_preload_content( return response_data.response - def _attach_floating_ip_to_instance_serialize( + def _attach_public_ip_to_virtual_machine_serialize( self, id, _request_auth, @@ -306,7 +309,7 @@ def _attach_floating_ip_to_instance_serialize( @validate_call - def detach_floating_ip_to_instance( + def detach_public_ip_from_virtual_machine( self, id: StrictInt, _request_timeout: Union[ @@ -322,8 +325,9 @@ def detach_floating_ip_to_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Detach Floating IP to Instance + """Detach public IP from virtual machine + Removes a public IP address from an existing virtual machine, disabling internet accessibility to the VM. Include the virtual machine ID in the path to detach the public IP from the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). :param id: (required) :type id: int @@ -349,7 +353,7 @@ def detach_floating_ip_to_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._detach_floating_ip_to_instance_serialize( + _param = self._detach_public_ip_from_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -376,7 +380,7 @@ def detach_floating_ip_to_instance( @validate_call - def detach_floating_ip_to_instance_with_http_info( + def detach_public_ip_from_virtual_machine_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -392,8 +396,9 @@ def detach_floating_ip_to_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Detach Floating IP to Instance + """Detach public IP from virtual machine + Removes a public IP address from an existing virtual machine, disabling internet accessibility to the VM. Include the virtual machine ID in the path to detach the public IP from the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). :param id: (required) :type id: int @@ -419,7 +424,7 @@ def detach_floating_ip_to_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._detach_floating_ip_to_instance_serialize( + _param = self._detach_public_ip_from_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -446,7 +451,7 @@ def detach_floating_ip_to_instance_with_http_info( @validate_call - def detach_floating_ip_to_instance_without_preload_content( + def detach_public_ip_from_virtual_machine_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -462,8 +467,9 @@ def detach_floating_ip_to_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Detach Floating IP to Instance + """Detach public IP from virtual machine + Removes a public IP address from an existing virtual machine, disabling internet accessibility to the VM. Include the virtual machine ID in the path to detach the public IP from the specified VM. For more information on public IP addresses, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip). :param id: (required) :type id: int @@ -489,7 +495,7 @@ def detach_floating_ip_to_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._detach_floating_ip_to_instance_serialize( + _param = self._detach_public_ip_from_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -511,7 +517,7 @@ def detach_floating_ip_to_instance_without_preload_content( return response_data.response - def _detach_floating_ip_to_instance_serialize( + def _detach_public_ip_from_virtual_machine_serialize( self, id, _request_auth, diff --git a/hyperstack/api/gpu_api.py b/hyperstack/api/gpu_api.py index ebdad61..0c63728 100644 --- a/hyperstack/api/gpu_api.py +++ b/hyperstack/api/gpu_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def get_gpu_list( + def list_gpus( self, _request_timeout: Union[ None, @@ -52,8 +52,9 @@ def get_gpu_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> GPUList: - """Get GPU List + """List GPUs + Returns a list of all available GPUs that can be utilized in the creation of custom virtual machine configurations. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -77,7 +78,7 @@ def get_gpu_list( :return: Returns the result object. """ # noqa: E501 - _param = self._get_gpu_list_serialize( + _param = self._list_gpus_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -102,7 +103,7 @@ def get_gpu_list( @validate_call - def get_gpu_list_with_http_info( + def list_gpus_with_http_info( self, _request_timeout: Union[ None, @@ -117,8 +118,9 @@ def get_gpu_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[GPUList]: - """Get GPU List + """List GPUs + Returns a list of all available GPUs that can be utilized in the creation of custom virtual machine configurations. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -142,7 +144,7 @@ def get_gpu_list_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_gpu_list_serialize( + _param = self._list_gpus_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -167,7 +169,7 @@ def get_gpu_list_with_http_info( @validate_call - def get_gpu_list_without_preload_content( + def list_gpus_without_preload_content( self, _request_timeout: Union[ None, @@ -182,8 +184,9 @@ def get_gpu_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get GPU List + """List GPUs + Returns a list of all available GPUs that can be utilized in the creation of custom virtual machine configurations. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -207,7 +210,7 @@ def get_gpu_list_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_gpu_list_serialize( + _param = self._list_gpus_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -227,7 +230,7 @@ def get_gpu_list_without_preload_content( return response_data.response - def _get_gpu_list_serialize( + def _list_gpus_serialize( self, _request_auth, _content_type, diff --git a/hyperstack/api/image_api.py b/hyperstack/api/image_api.py index d4203dc..7d0400c 100644 --- a/hyperstack/api/image_api.py +++ b/hyperstack/api/image_api.py @@ -40,7 +40,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def retrieve_images( + def list_images( self, region: Annotated[Optional[Any], Field(description="Region Name")] = None, _request_timeout: Union[ @@ -56,8 +56,9 @@ def retrieve_images( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Images: - """Retrieve Images + """List images + Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. Include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. For more information on OS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images). :param region: Region Name :type region: object @@ -83,7 +84,7 @@ def retrieve_images( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_images_serialize( + _param = self._list_images_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -111,7 +112,7 @@ def retrieve_images( @validate_call - def retrieve_images_with_http_info( + def list_images_with_http_info( self, region: Annotated[Optional[Any], Field(description="Region Name")] = None, _request_timeout: Union[ @@ -127,8 +128,9 @@ def retrieve_images_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Images]: - """Retrieve Images + """List images + Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. Include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. For more information on OS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images). :param region: Region Name :type region: object @@ -154,7 +156,7 @@ def retrieve_images_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_images_serialize( + _param = self._list_images_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -182,7 +184,7 @@ def retrieve_images_with_http_info( @validate_call - def retrieve_images_without_preload_content( + def list_images_without_preload_content( self, region: Annotated[Optional[Any], Field(description="Region Name")] = None, _request_timeout: Union[ @@ -198,8 +200,9 @@ def retrieve_images_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve Images + """List images + Returns a list of all available operating system (OS) images, providing details about each image's corresponding virtual machine operating system. Include the optional `region` parameter in the query string of the request to specifically return OS images from the designated region. For more information on OS images, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images). :param region: Region Name :type region: object @@ -225,7 +228,7 @@ def retrieve_images_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_images_serialize( + _param = self._list_images_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, @@ -248,7 +251,7 @@ def retrieve_images_without_preload_content( return response_data.response - def _retrieve_images_serialize( + def _list_images_serialize( self, region, _request_auth, diff --git a/hyperstack/api/invite_api.py b/hyperstack/api/invite_api.py index f319fe7..17842fc 100644 --- a/hyperstack/api/invite_api.py +++ b/hyperstack/api/invite_api.py @@ -17,10 +17,10 @@ from typing_extensions import Annotated from pydantic import StrictInt -from hyperstack.models.invite import Invite -from hyperstack.models.invite_user import InviteUser -from hyperstack.models.invites import Invites -from hyperstack.models.response_model import ResponseModel +from hyperstack.models.common_response_model import CommonResponseModel +from hyperstack.models.get_invites_response_model import GetInvitesResponseModel +from hyperstack.models.invite_user_payload import InviteUserPayload +from hyperstack.models.invite_user_response_model import InviteUserResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -56,7 +56,7 @@ def delete_invite( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResponseModel: + ) -> CommonResponseModel: """Delete Invite @@ -93,7 +93,7 @@ def delete_invite( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -126,7 +126,7 @@ def delete_invite_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResponseModel]: + ) -> ApiResponse[CommonResponseModel]: """Delete Invite @@ -163,7 +163,7 @@ def delete_invite_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -233,7 +233,7 @@ def delete_invite_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -311,7 +311,7 @@ def _delete_invite_serialize( @validate_call def invite_an_user_to_organization( self, - payload: InviteUser, + payload: InviteUserPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -324,12 +324,12 @@ def invite_an_user_to_organization( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Invite: + ) -> InviteUserResponseModel: """Invite an user to organization :param payload: (required) - :type payload: InviteUser + :type payload: InviteUserPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -361,7 +361,7 @@ def invite_an_user_to_organization( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Invite", + '201': "InviteUserResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '409': "ErrorResponseModel", @@ -381,7 +381,7 @@ def invite_an_user_to_organization( @validate_call def invite_an_user_to_organization_with_http_info( self, - payload: InviteUser, + payload: InviteUserPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -394,12 +394,12 @@ def invite_an_user_to_organization_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Invite]: + ) -> ApiResponse[InviteUserResponseModel]: """Invite an user to organization :param payload: (required) - :type payload: InviteUser + :type payload: InviteUserPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -431,7 +431,7 @@ def invite_an_user_to_organization_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Invite", + '201': "InviteUserResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '409': "ErrorResponseModel", @@ -451,7 +451,7 @@ def invite_an_user_to_organization_with_http_info( @validate_call def invite_an_user_to_organization_without_preload_content( self, - payload: InviteUser, + payload: InviteUserPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -469,7 +469,7 @@ def invite_an_user_to_organization_without_preload_content( :param payload: (required) - :type payload: InviteUser + :type payload: InviteUserPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -501,7 +501,7 @@ def invite_an_user_to_organization_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Invite", + '201': "InviteUserResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '409': "ErrorResponseModel", @@ -604,7 +604,7 @@ def list_invites( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Invites: + ) -> GetInvitesResponseModel: """List Invites @@ -638,7 +638,7 @@ def list_invites( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invites", + '200': "GetInvitesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -669,7 +669,7 @@ def list_invites_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Invites]: + ) -> ApiResponse[GetInvitesResponseModel]: """List Invites @@ -703,7 +703,7 @@ def list_invites_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invites", + '200': "GetInvitesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -768,7 +768,7 @@ def list_invites_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Invites", + '200': "GetInvitesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, diff --git a/hyperstack/api/keypair_api.py b/hyperstack/api/keypair_api.py index 294a6f2..d0683a3 100644 --- a/hyperstack/api/keypair_api.py +++ b/hyperstack/api/keypair_api.py @@ -43,7 +43,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def delete_keypair( + def delete_key_pair( self, id: StrictInt, _request_timeout: Union[ @@ -59,8 +59,9 @@ def delete_keypair( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete Keypair + """Delete key pair + Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair. :param id: (required) :type id: int @@ -86,7 +87,7 @@ def delete_keypair( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_keypair_serialize( + _param = self._delete_key_pair_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -113,7 +114,7 @@ def delete_keypair( @validate_call - def delete_keypair_with_http_info( + def delete_key_pair_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -129,8 +130,9 @@ def delete_keypair_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete Keypair + """Delete key pair + Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair. :param id: (required) :type id: int @@ -156,7 +158,7 @@ def delete_keypair_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_keypair_serialize( + _param = self._delete_key_pair_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -183,7 +185,7 @@ def delete_keypair_with_http_info( @validate_call - def delete_keypair_without_preload_content( + def delete_key_pair_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -199,8 +201,9 @@ def delete_keypair_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Keypair + """Delete key pair + Permanently deletes a specified key pair. Include the key pair ID in the request path to remove the designated key pair. :param id: (required) :type id: int @@ -226,7 +229,7 @@ def delete_keypair_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_keypair_serialize( + _param = self._delete_key_pair_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -248,7 +251,7 @@ def delete_keypair_without_preload_content( return response_data.response - def _delete_keypair_serialize( + def _delete_key_pair_serialize( self, id, _request_auth, @@ -311,7 +314,7 @@ def _delete_keypair_serialize( @validate_call - def import_keypair( + def import_key_pair( self, payload: ImportKeypairPayload, _request_timeout: Union[ @@ -327,8 +330,9 @@ def import_keypair( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ImportKeypairResponse: - """Import Keypair + """Import key pair + Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key). :param payload: (required) :type payload: ImportKeypairPayload @@ -354,7 +358,7 @@ def import_keypair( :return: Returns the result object. """ # noqa: E501 - _param = self._import_keypair_serialize( + _param = self._import_key_pair_serialize( payload=payload, _request_auth=_request_auth, _content_type=_content_type, @@ -382,7 +386,7 @@ def import_keypair( @validate_call - def import_keypair_with_http_info( + def import_key_pair_with_http_info( self, payload: ImportKeypairPayload, _request_timeout: Union[ @@ -398,8 +402,9 @@ def import_keypair_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ImportKeypairResponse]: - """Import Keypair + """Import key pair + Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key). :param payload: (required) :type payload: ImportKeypairPayload @@ -425,7 +430,7 @@ def import_keypair_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._import_keypair_serialize( + _param = self._import_key_pair_serialize( payload=payload, _request_auth=_request_auth, _content_type=_content_type, @@ -453,7 +458,7 @@ def import_keypair_with_http_info( @validate_call - def import_keypair_without_preload_content( + def import_key_pair_without_preload_content( self, payload: ImportKeypairPayload, _request_timeout: Union[ @@ -469,8 +474,9 @@ def import_keypair_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import Keypair + """Import key pair + Imports a new key pair for secure shell (SSH) access to your resources. To import a new key pair, include the key name, environment name, and public key in the request body. For additional information on importing SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair#importing-an-ssh-key). :param payload: (required) :type payload: ImportKeypairPayload @@ -496,7 +502,7 @@ def import_keypair_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._import_keypair_serialize( + _param = self._import_key_pair_serialize( payload=payload, _request_auth=_request_auth, _content_type=_content_type, @@ -519,7 +525,7 @@ def import_keypair_without_preload_content( return response_data.response - def _import_keypair_serialize( + def _import_key_pair_serialize( self, payload, _request_auth, @@ -595,7 +601,7 @@ def _import_keypair_serialize( @validate_call - def retrieve_user_keypairs( + def list_key_pairs( self, _request_timeout: Union[ None, @@ -610,8 +616,9 @@ def retrieve_user_keypairs( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Keypairs: - """Retrieve Keypairs + """List key pairs + Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -635,7 +642,7 @@ def retrieve_user_keypairs( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_keypairs_serialize( + _param = self._list_key_pairs_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -660,7 +667,7 @@ def retrieve_user_keypairs( @validate_call - def retrieve_user_keypairs_with_http_info( + def list_key_pairs_with_http_info( self, _request_timeout: Union[ None, @@ -675,8 +682,9 @@ def retrieve_user_keypairs_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Keypairs]: - """Retrieve Keypairs + """List key pairs + Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -700,7 +708,7 @@ def retrieve_user_keypairs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_keypairs_serialize( + _param = self._list_key_pairs_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -725,7 +733,7 @@ def retrieve_user_keypairs_with_http_info( @validate_call - def retrieve_user_keypairs_without_preload_content( + def list_key_pairs_without_preload_content( self, _request_timeout: Union[ None, @@ -740,8 +748,9 @@ def retrieve_user_keypairs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve Keypairs + """List key pairs + Retrieves a list of your existing SSH key pairs, providing details for each. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/keypairs-available-features). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -765,7 +774,7 @@ def retrieve_user_keypairs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_user_keypairs_serialize( + _param = self._list_key_pairs_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -785,7 +794,7 @@ def retrieve_user_keypairs_without_preload_content( return response_data.response - def _retrieve_user_keypairs_serialize( + def _list_key_pairs_serialize( self, _request_auth, _content_type, @@ -845,7 +854,7 @@ def _retrieve_user_keypairs_serialize( @validate_call - def update_keypair_name( + def update_key_pair_name( self, id: StrictInt, payload: UpdateKeypairName, @@ -862,8 +871,9 @@ def update_keypair_name( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> UpdateKeypairnameresponse: - """Update Keypair name + """Update key pair name + Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body. :param id: (required) :type id: int @@ -891,7 +901,7 @@ def update_keypair_name( :return: Returns the result object. """ # noqa: E501 - _param = self._update_keypair_name_serialize( + _param = self._update_key_pair_name_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -919,7 +929,7 @@ def update_keypair_name( @validate_call - def update_keypair_name_with_http_info( + def update_key_pair_name_with_http_info( self, id: StrictInt, payload: UpdateKeypairName, @@ -936,8 +946,9 @@ def update_keypair_name_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[UpdateKeypairnameresponse]: - """Update Keypair name + """Update key pair name + Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body. :param id: (required) :type id: int @@ -965,7 +976,7 @@ def update_keypair_name_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_keypair_name_serialize( + _param = self._update_key_pair_name_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -993,7 +1004,7 @@ def update_keypair_name_with_http_info( @validate_call - def update_keypair_name_without_preload_content( + def update_key_pair_name_without_preload_content( self, id: StrictInt, payload: UpdateKeypairName, @@ -1010,8 +1021,9 @@ def update_keypair_name_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Keypair name + """Update key pair name + Updates the name of a specified key pair. Include the key pair ID in the request path and the new `name` of the key pair in the request body. :param id: (required) :type id: int @@ -1039,7 +1051,7 @@ def update_keypair_name_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_keypair_name_serialize( + _param = self._update_key_pair_name_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -1062,7 +1074,7 @@ def update_keypair_name_without_preload_content( return response_data.response - def _update_keypair_name_serialize( + def _update_key_pair_name_serialize( self, id, payload, diff --git a/hyperstack/api/organization_api.py b/hyperstack/api/organization_api.py index be971ca..5fde5a8 100644 --- a/hyperstack/api/organization_api.py +++ b/hyperstack/api/organization_api.py @@ -16,9 +16,11 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from hyperstack.models.organization_model import OrganizationModel -from hyperstack.models.remove_member_response import RemoveMemberResponse -from hyperstack.models.removemember import Removemember +from hyperstack.models.get_organization_response_model import GetOrganizationResponseModel +from hyperstack.models.remove_member_from_organization_response_model import RemoveMemberFromOrganizationResponseModel +from hyperstack.models.remove_member_payload import RemoveMemberPayload +from hyperstack.models.update_organization_payload import UpdateOrganizationPayload +from hyperstack.models.update_organization_response_model import UpdateOrganizationResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -53,7 +55,7 @@ def get_organization_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OrganizationModel: + ) -> GetOrganizationResponseModel: """Organization Info @@ -87,7 +89,7 @@ def get_organization_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationModel", + '200': "GetOrganizationResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -118,7 +120,7 @@ def get_organization_info_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OrganizationModel]: + ) -> ApiResponse[GetOrganizationResponseModel]: """Organization Info @@ -152,7 +154,7 @@ def get_organization_info_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationModel", + '200': "GetOrganizationResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -217,7 +219,7 @@ def get_organization_info_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationModel", + '200': "GetOrganizationResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -291,7 +293,7 @@ def _get_organization_info_serialize( @validate_call def remove_a_member_from_organization( self, - payload: Removemember, + payload: RemoveMemberPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -304,12 +306,12 @@ def remove_a_member_from_organization( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RemoveMemberResponse: + ) -> RemoveMemberFromOrganizationResponseModel: """Remove a member from organization :param payload: (required) - :type payload: Removemember + :type payload: RemoveMemberPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -341,7 +343,7 @@ def remove_a_member_from_organization( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RemoveMemberResponse", + '200': "RemoveMemberFromOrganizationResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -360,7 +362,7 @@ def remove_a_member_from_organization( @validate_call def remove_a_member_from_organization_with_http_info( self, - payload: Removemember, + payload: RemoveMemberPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -373,12 +375,12 @@ def remove_a_member_from_organization_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RemoveMemberResponse]: + ) -> ApiResponse[RemoveMemberFromOrganizationResponseModel]: """Remove a member from organization :param payload: (required) - :type payload: Removemember + :type payload: RemoveMemberPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -410,7 +412,7 @@ def remove_a_member_from_organization_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RemoveMemberResponse", + '200': "RemoveMemberFromOrganizationResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -429,7 +431,7 @@ def remove_a_member_from_organization_with_http_info( @validate_call def remove_a_member_from_organization_without_preload_content( self, - payload: Removemember, + payload: RemoveMemberPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -447,7 +449,7 @@ def remove_a_member_from_organization_without_preload_content( :param payload: (required) - :type payload: Removemember + :type payload: RemoveMemberPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -479,7 +481,7 @@ def remove_a_member_from_organization_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RemoveMemberResponse", + '200': "RemoveMemberFromOrganizationResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -564,3 +566,281 @@ def _remove_a_member_from_organization_serialize( ) + + + @validate_call + def update_organization_info( + self, + payload: UpdateOrganizationPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UpdateOrganizationResponseModel: + """Update organization info + + + :param payload: (required) + :type payload: UpdateOrganizationPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_info_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateOrganizationResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_organization_info_with_http_info( + self, + payload: UpdateOrganizationPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UpdateOrganizationResponseModel]: + """Update organization info + + + :param payload: (required) + :type payload: UpdateOrganizationPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_info_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateOrganizationResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_organization_info_without_preload_content( + self, + payload: UpdateOrganizationPayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update organization info + + + :param payload: (required) + :type payload: UpdateOrganizationPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_organization_info_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UpdateOrganizationResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_organization_info_serialize( + self, + payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if payload is not None: + _body_params = payload + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/auth/organizations/update', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hyperstack/api/permission_api.py b/hyperstack/api/permission_api.py index 78d02f1..d7c8f26 100644 --- a/hyperstack/api/permission_api.py +++ b/hyperstack/api/permission_api.py @@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from hyperstack.models.permissions import Permissions +from hyperstack.models.get_permissions_response_model import GetPermissionsResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -51,7 +51,7 @@ def list_permissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Permissions: + ) -> GetPermissionsResponseModel: """List Permissions @@ -85,7 +85,7 @@ def list_permissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Permissions", + '200': "GetPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -116,7 +116,7 @@ def list_permissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Permissions]: + ) -> ApiResponse[GetPermissionsResponseModel]: """List Permissions @@ -150,7 +150,7 @@ def list_permissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Permissions", + '200': "GetPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -215,7 +215,7 @@ def list_permissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Permissions", + '200': "GetPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, diff --git a/hyperstack/api/policy_api.py b/hyperstack/api/policy_api.py index 060aee2..7210698 100644 --- a/hyperstack/api/policy_api.py +++ b/hyperstack/api/policy_api.py @@ -16,7 +16,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from hyperstack.models.policies import Policies +from hyperstack.models.get_policies_response_model import GetPoliciesResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -51,7 +51,7 @@ def list_policies( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Policies: + ) -> GetPoliciesResponseModel: """List Policies @@ -85,7 +85,7 @@ def list_policies( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Policies", + '200': "GetPoliciesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -116,7 +116,7 @@ def list_policies_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Policies]: + ) -> ApiResponse[GetPoliciesResponseModel]: """List Policies @@ -150,7 +150,7 @@ def list_policies_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Policies", + '200': "GetPoliciesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -215,7 +215,7 @@ def list_policies_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Policies", + '200': "GetPoliciesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, diff --git a/hyperstack/api/profile_api.py b/hyperstack/api/profile_api.py index 9c91f48..e56d44f 100644 --- a/hyperstack/api/profile_api.py +++ b/hyperstack/api/profile_api.py @@ -57,8 +57,9 @@ def create_profile( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateProfileResponse: - """Create a profile + """Create profile + Creates a provisioning profile to save the configuration of a virtual machine for future use. Include the profile name, description, and virtual machine configuration details in the request body. For more information about virtual machine profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). :param payload: (required) :type payload: CreateProfilePayload @@ -127,8 +128,9 @@ def create_profile_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateProfileResponse]: - """Create a profile + """Create profile + Creates a provisioning profile to save the configuration of a virtual machine for future use. Include the profile name, description, and virtual machine configuration details in the request body. For more information about virtual machine profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). :param payload: (required) :type payload: CreateProfilePayload @@ -197,8 +199,9 @@ def create_profile_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create a profile + """Create profile + Creates a provisioning profile to save the configuration of a virtual machine for future use. Include the profile name, description, and virtual machine configuration details in the request body. For more information about virtual machine profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). :param payload: (required) :type payload: CreateProfilePayload @@ -338,8 +341,9 @@ def delete_profile( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete Profile + """Delete profile + Permanently deletes a provisioning profile. Supply the profile ID in the path to delete the specified profile. :param id: (required) :type id: int @@ -408,8 +412,9 @@ def delete_profile_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete Profile + """Delete profile + Permanently deletes a provisioning profile. Supply the profile ID in the path to delete the specified profile. :param id: (required) :type id: int @@ -478,8 +483,9 @@ def delete_profile_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Profile + """Delete profile + Permanently deletes a provisioning profile. Supply the profile ID in the path to delete the specified profile. :param id: (required) :type id: int @@ -590,9 +596,8 @@ def _delete_profile_serialize( @validate_call - def get_a_profile_detail( + def list_profiles( self, - id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -605,12 +610,11 @@ def get_a_profile_detail( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateProfileResponse: - """Get a Profile Detail + ) -> ProfileListResponse: + """List profiles + Returns a list of your existing provisioning profiles, providing virtual machine configuration details for each. For additional information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles#retrieve-a-list-of-profiles). - :param id: (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -633,8 +637,7 @@ def get_a_profile_detail( :return: Returns the result object. """ # noqa: E501 - _param = self._get_a_profile_detail_serialize( - id=id, + _param = self._list_profiles_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -642,10 +645,9 @@ def get_a_profile_detail( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateProfileResponse", + '200': "ProfileListResponse", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -660,9 +662,8 @@ def get_a_profile_detail( @validate_call - def get_a_profile_detail_with_http_info( + def list_profiles_with_http_info( self, - id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -675,12 +676,11 @@ def get_a_profile_detail_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateProfileResponse]: - """Get a Profile Detail + ) -> ApiResponse[ProfileListResponse]: + """List profiles + Returns a list of your existing provisioning profiles, providing virtual machine configuration details for each. For additional information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles#retrieve-a-list-of-profiles). - :param id: (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -703,8 +703,7 @@ def get_a_profile_detail_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_a_profile_detail_serialize( - id=id, + _param = self._list_profiles_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -712,10 +711,9 @@ def get_a_profile_detail_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateProfileResponse", + '200': "ProfileListResponse", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -730,9 +728,8 @@ def get_a_profile_detail_with_http_info( @validate_call - def get_a_profile_detail_without_preload_content( + def list_profiles_without_preload_content( self, - id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -746,11 +743,10 @@ def get_a_profile_detail_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a Profile Detail + """List profiles + Returns a list of your existing provisioning profiles, providing virtual machine configuration details for each. For additional information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles#retrieve-a-list-of-profiles). - :param id: (required) - :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -773,8 +769,7 @@ def get_a_profile_detail_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_a_profile_detail_serialize( - id=id, + _param = self._list_profiles_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -782,10 +777,9 @@ def get_a_profile_detail_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CreateProfileResponse", + '200': "ProfileListResponse", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -795,9 +789,8 @@ def get_a_profile_detail_without_preload_content( return response_data.response - def _get_a_profile_detail_serialize( + def _list_profiles_serialize( self, - id, _request_auth, _content_type, _headers, @@ -817,8 +810,6 @@ def _get_a_profile_detail_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -841,7 +832,7 @@ def _get_a_profile_detail_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/profiles/{id}', + resource_path='/core/profiles', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -858,8 +849,9 @@ def _get_a_profile_detail_serialize( @validate_call - def get_profile_list( + def retrieve_profile_details( self, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -872,10 +864,13 @@ def get_profile_list( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ProfileListResponse: - """Get Profile List + ) -> CreateProfileResponse: + """Retrieve profile details + Retrieves details for an existing provisioning profile by supplying the profile ID in the request path. For more information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -898,7 +893,8 @@ def get_profile_list( :return: Returns the result object. """ # noqa: E501 - _param = self._get_profile_list_serialize( + _param = self._retrieve_profile_details_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -906,9 +902,10 @@ def get_profile_list( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProfileListResponse", + '200': "CreateProfileResponse", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -923,8 +920,9 @@ def get_profile_list( @validate_call - def get_profile_list_with_http_info( + def retrieve_profile_details_with_http_info( self, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -937,10 +935,13 @@ def get_profile_list_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ProfileListResponse]: - """Get Profile List + ) -> ApiResponse[CreateProfileResponse]: + """Retrieve profile details + Retrieves details for an existing provisioning profile by supplying the profile ID in the request path. For more information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -963,7 +964,8 @@ def get_profile_list_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_profile_list_serialize( + _param = self._retrieve_profile_details_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -971,9 +973,10 @@ def get_profile_list_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProfileListResponse", + '200': "CreateProfileResponse", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -988,8 +991,9 @@ def get_profile_list_with_http_info( @validate_call - def get_profile_list_without_preload_content( + def retrieve_profile_details_without_preload_content( self, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1003,9 +1007,12 @@ def get_profile_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Profile List + """Retrieve profile details + Retrieves details for an existing provisioning profile by supplying the profile ID in the request path. For more information about profiles, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/provisioning-profiles). + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1028,7 +1035,8 @@ def get_profile_list_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_profile_list_serialize( + _param = self._retrieve_profile_details_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1036,9 +1044,10 @@ def get_profile_list_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProfileListResponse", + '200': "CreateProfileResponse", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1048,8 +1057,9 @@ def get_profile_list_without_preload_content( return response_data.response - def _get_profile_list_serialize( + def _retrieve_profile_details_serialize( self, + id, _request_auth, _content_type, _headers, @@ -1069,6 +1079,8 @@ def _get_profile_list_serialize( _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1091,7 +1103,7 @@ def _get_profile_list_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/profiles', + resource_path='/core/profiles/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/hyperstack/api/rbac_role_api.py b/hyperstack/api/rbac_role_api.py index 9ca2549..d2aa7db 100644 --- a/hyperstack/api/rbac_role_api.py +++ b/hyperstack/api/rbac_role_api.py @@ -17,10 +17,10 @@ from typing_extensions import Annotated from pydantic import StrictInt -from hyperstack.models.rbac_role import RBACRole -from hyperstack.models.rbac_role_payload import RBACRolePayload -from hyperstack.models.rbac_roles import RBACRoles -from hyperstack.models.response_model import ResponseModel +from hyperstack.models.common_response_model import CommonResponseModel +from hyperstack.models.create_update_rbac_role_payload import CreateUpdateRbacRolePayload +from hyperstack.models.get_rbac_roles_response_model import GetRbacRolesResponseModel +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -43,7 +43,7 @@ def __init__(self, api_client=None) -> None: @validate_call def create_rbac_role( self, - payload: RBACRolePayload, + payload: CreateUpdateRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -56,12 +56,12 @@ def create_rbac_role( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RBACRole: + ) -> RbacRoleDetailResponseModel: """Create RBAC Role :param payload: (required) - :type payload: RBACRolePayload + :type payload: CreateUpdateRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -93,7 +93,7 @@ def create_rbac_role( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "RBACRole", + '201': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '409': "ErrorResponseModel", @@ -113,7 +113,7 @@ def create_rbac_role( @validate_call def create_rbac_role_with_http_info( self, - payload: RBACRolePayload, + payload: CreateUpdateRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -126,12 +126,12 @@ def create_rbac_role_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RBACRole]: + ) -> ApiResponse[RbacRoleDetailResponseModel]: """Create RBAC Role :param payload: (required) - :type payload: RBACRolePayload + :type payload: CreateUpdateRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -163,7 +163,7 @@ def create_rbac_role_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "RBACRole", + '201': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '409': "ErrorResponseModel", @@ -183,7 +183,7 @@ def create_rbac_role_with_http_info( @validate_call def create_rbac_role_without_preload_content( self, - payload: RBACRolePayload, + payload: CreateUpdateRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -201,7 +201,7 @@ def create_rbac_role_without_preload_content( :param payload: (required) - :type payload: RBACRolePayload + :type payload: CreateUpdateRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -233,7 +233,7 @@ def create_rbac_role_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "RBACRole", + '201': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '409': "ErrorResponseModel", @@ -337,7 +337,7 @@ def delete_a_rbac_role( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResponseModel: + ) -> CommonResponseModel: """Delete a RBAC Role @@ -374,7 +374,7 @@ def delete_a_rbac_role( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -407,7 +407,7 @@ def delete_a_rbac_role_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResponseModel]: + ) -> ApiResponse[CommonResponseModel]: """Delete a RBAC Role @@ -444,7 +444,7 @@ def delete_a_rbac_role_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -514,7 +514,7 @@ def delete_a_rbac_role_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "CommonResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -605,7 +605,7 @@ def get_a_rbac_role_detail( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RBACRole: + ) -> RbacRoleDetailResponseModel: """Get a RBAC Role Detail @@ -642,7 +642,7 @@ def get_a_rbac_role_detail( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -675,7 +675,7 @@ def get_a_rbac_role_detail_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RBACRole]: + ) -> ApiResponse[RbacRoleDetailResponseModel]: """Get a RBAC Role Detail @@ -712,7 +712,7 @@ def get_a_rbac_role_detail_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -782,7 +782,7 @@ def get_a_rbac_role_detail_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -872,7 +872,7 @@ def list_rbac_roles( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RBACRoles: + ) -> GetRbacRolesResponseModel: """List RBAC Roles @@ -906,7 +906,7 @@ def list_rbac_roles( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRoles", + '200': "GetRbacRolesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -937,7 +937,7 @@ def list_rbac_roles_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RBACRoles]: + ) -> ApiResponse[GetRbacRolesResponseModel]: """List RBAC Roles @@ -971,7 +971,7 @@ def list_rbac_roles_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRoles", + '200': "GetRbacRolesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -1036,7 +1036,7 @@ def list_rbac_roles_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRoles", + '200': "GetRbacRolesResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -1111,7 +1111,7 @@ def _list_rbac_roles_serialize( def update_a_rbac_role( self, id: StrictInt, - payload: RBACRolePayload, + payload: CreateUpdateRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1124,14 +1124,14 @@ def update_a_rbac_role( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RBACRole: + ) -> RbacRoleDetailResponseModel: """Update a RBAC Role :param id: (required) :type id: int :param payload: (required) - :type payload: RBACRolePayload + :type payload: CreateUpdateRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1164,7 +1164,7 @@ def update_a_rbac_role( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -1185,7 +1185,7 @@ def update_a_rbac_role( def update_a_rbac_role_with_http_info( self, id: StrictInt, - payload: RBACRolePayload, + payload: CreateUpdateRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1198,14 +1198,14 @@ def update_a_rbac_role_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RBACRole]: + ) -> ApiResponse[RbacRoleDetailResponseModel]: """Update a RBAC Role :param id: (required) :type id: int :param payload: (required) - :type payload: RBACRolePayload + :type payload: CreateUpdateRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1238,7 +1238,7 @@ def update_a_rbac_role_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", @@ -1259,7 +1259,7 @@ def update_a_rbac_role_with_http_info( def update_a_rbac_role_without_preload_content( self, id: StrictInt, - payload: RBACRolePayload, + payload: CreateUpdateRbacRolePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1279,7 +1279,7 @@ def update_a_rbac_role_without_preload_content( :param id: (required) :type id: int :param payload: (required) - :type payload: RBACRolePayload + :type payload: CreateUpdateRbacRolePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1312,7 +1312,7 @@ def update_a_rbac_role_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RBACRole", + '200': "RbacRoleDetailResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", diff --git a/hyperstack/api/region_api.py b/hyperstack/api/region_api.py index 38ed509..d6d1525 100644 --- a/hyperstack/api/region_api.py +++ b/hyperstack/api/region_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def getting_regions( + def list_regions( self, _request_timeout: Union[ None, @@ -52,8 +52,9 @@ def getting_regions( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Regions: - """Getting regions + """List regions + Lists the currently available regions, each representing a distinct geographic location housing a data center. For additional information on regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -77,7 +78,7 @@ def getting_regions( :return: Returns the result object. """ # noqa: E501 - _param = self._getting_regions_serialize( + _param = self._list_regions_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -102,7 +103,7 @@ def getting_regions( @validate_call - def getting_regions_with_http_info( + def list_regions_with_http_info( self, _request_timeout: Union[ None, @@ -117,8 +118,9 @@ def getting_regions_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Regions]: - """Getting regions + """List regions + Lists the currently available regions, each representing a distinct geographic location housing a data center. For additional information on regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -142,7 +144,7 @@ def getting_regions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._getting_regions_serialize( + _param = self._list_regions_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -167,7 +169,7 @@ def getting_regions_with_http_info( @validate_call - def getting_regions_without_preload_content( + def list_regions_without_preload_content( self, _request_timeout: Union[ None, @@ -182,8 +184,9 @@ def getting_regions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Getting regions + """List regions + Lists the currently available regions, each representing a distinct geographic location housing a data center. For additional information on regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -207,7 +210,7 @@ def getting_regions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._getting_regions_serialize( + _param = self._list_regions_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -227,7 +230,7 @@ def getting_regions_without_preload_content( return response_data.response - def _getting_regions_serialize( + def _list_regions_serialize( self, _request_auth, _content_type, diff --git a/hyperstack/api/security_rules_api.py b/hyperstack/api/security_rules_api.py index 92a20d4..06226c7 100644 --- a/hyperstack/api/security_rules_api.py +++ b/hyperstack/api/security_rules_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def retrieve_security_rule_protocols( + def list_firewall_rule_protocols( self, _request_timeout: Union[ None, @@ -52,8 +52,9 @@ def retrieve_security_rule_protocols( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SecurityRulesProtocolFields: - """Retrieve Security Rule Protocols + """List firewall rule protocols + Returns a list of all available protocols that can be used in the creation of firewall rules for your virtual machines. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -77,7 +78,7 @@ def retrieve_security_rule_protocols( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_security_rule_protocols_serialize( + _param = self._list_firewall_rule_protocols_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -102,7 +103,7 @@ def retrieve_security_rule_protocols( @validate_call - def retrieve_security_rule_protocols_with_http_info( + def list_firewall_rule_protocols_with_http_info( self, _request_timeout: Union[ None, @@ -117,8 +118,9 @@ def retrieve_security_rule_protocols_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SecurityRulesProtocolFields]: - """Retrieve Security Rule Protocols + """List firewall rule protocols + Returns a list of all available protocols that can be used in the creation of firewall rules for your virtual machines. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -142,7 +144,7 @@ def retrieve_security_rule_protocols_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_security_rule_protocols_serialize( + _param = self._list_firewall_rule_protocols_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -167,7 +169,7 @@ def retrieve_security_rule_protocols_with_http_info( @validate_call - def retrieve_security_rule_protocols_without_preload_content( + def list_firewall_rule_protocols_without_preload_content( self, _request_timeout: Union[ None, @@ -182,8 +184,9 @@ def retrieve_security_rule_protocols_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve Security Rule Protocols + """List firewall rule protocols + Returns a list of all available protocols that can be used in the creation of firewall rules for your virtual machines. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -207,7 +210,7 @@ def retrieve_security_rule_protocols_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_security_rule_protocols_serialize( + _param = self._list_firewall_rule_protocols_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -227,7 +230,7 @@ def retrieve_security_rule_protocols_without_preload_content( return response_data.response - def _retrieve_security_rule_protocols_serialize( + def _list_firewall_rule_protocols_serialize( self, _request_auth, _content_type, diff --git a/hyperstack/api/stock_api.py b/hyperstack/api/stock_api.py index 55e5f18..b9e6bae 100644 --- a/hyperstack/api/stock_api.py +++ b/hyperstack/api/stock_api.py @@ -37,7 +37,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def retrieve_stocks( + def retrieve_gpu_stocks( self, _request_timeout: Union[ None, @@ -52,8 +52,9 @@ def retrieve_stocks( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> NewStockRetriveResponse: - """retrieve_stocks + """retrieve_gpu_stocks + Returns information on current and upcoming GPU availability, organized by region and GPU model. For additional information on GPU stocks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/gpu-stock-information). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -77,7 +78,7 @@ def retrieve_stocks( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_stocks_serialize( + _param = self._retrieve_gpu_stocks_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -102,7 +103,7 @@ def retrieve_stocks( @validate_call - def retrieve_stocks_with_http_info( + def retrieve_gpu_stocks_with_http_info( self, _request_timeout: Union[ None, @@ -117,8 +118,9 @@ def retrieve_stocks_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[NewStockRetriveResponse]: - """retrieve_stocks + """retrieve_gpu_stocks + Returns information on current and upcoming GPU availability, organized by region and GPU model. For additional information on GPU stocks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/gpu-stock-information). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -142,7 +144,7 @@ def retrieve_stocks_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_stocks_serialize( + _param = self._retrieve_gpu_stocks_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -167,7 +169,7 @@ def retrieve_stocks_with_http_info( @validate_call - def retrieve_stocks_without_preload_content( + def retrieve_gpu_stocks_without_preload_content( self, _request_timeout: Union[ None, @@ -182,8 +184,9 @@ def retrieve_stocks_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """retrieve_stocks + """retrieve_gpu_stocks + Returns information on current and upcoming GPU availability, organized by region and GPU model. For additional information on GPU stocks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/gpu-stock-information). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -207,7 +210,7 @@ def retrieve_stocks_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieve_stocks_serialize( + _param = self._retrieve_gpu_stocks_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -227,7 +230,7 @@ def retrieve_stocks_without_preload_content( return response_data.response - def _retrieve_stocks_serialize( + def _retrieve_gpu_stocks_serialize( self, _request_auth, _content_type, diff --git a/hyperstack/api/template_api.py b/hyperstack/api/template_api.py index 72c7349..0cb7880 100644 --- a/hyperstack/api/template_api.py +++ b/hyperstack/api/template_api.py @@ -62,8 +62,9 @@ def create_template( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Template: - """Create Template + """Create template + Creates a resource template for deployment. :param name: name is required (required) :type name: str @@ -143,8 +144,9 @@ def create_template_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Template]: - """Create Template + """Create template + Creates a resource template for deployment. :param name: name is required (required) :type name: str @@ -224,8 +226,9 @@ def create_template_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Template + """Create template + Creates a resource template for deployment. :param name: name is required (required) :type name: str @@ -366,7 +369,7 @@ def _create_template_serialize( @validate_call - def delete_a_template( + def delete_template( self, id: StrictInt, _request_timeout: Union[ @@ -382,8 +385,9 @@ def delete_a_template( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete a Template + """Delete template + Permanently deletes a template. Supply the template ID in the path to delete the specified template. :param id: (required) :type id: int @@ -409,7 +413,7 @@ def delete_a_template( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_template_serialize( + _param = self._delete_template_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -436,7 +440,7 @@ def delete_a_template( @validate_call - def delete_a_template_with_http_info( + def delete_template_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -452,8 +456,9 @@ def delete_a_template_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete a Template + """Delete template + Permanently deletes a template. Supply the template ID in the path to delete the specified template. :param id: (required) :type id: int @@ -479,7 +484,7 @@ def delete_a_template_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_template_serialize( + _param = self._delete_template_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -506,7 +511,7 @@ def delete_a_template_with_http_info( @validate_call - def delete_a_template_without_preload_content( + def delete_template_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -522,8 +527,9 @@ def delete_a_template_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a Template + """Delete template + Permanently deletes a template. Supply the template ID in the path to delete the specified template. :param id: (required) :type id: int @@ -549,7 +555,7 @@ def delete_a_template_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_template_serialize( + _param = self._delete_template_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -571,7 +577,7 @@ def delete_a_template_without_preload_content( return response_data.response - def _delete_a_template_serialize( + def _delete_template_serialize( self, id, _request_auth, @@ -634,9 +640,9 @@ def _delete_a_template_serialize( @validate_call - def details_of_a_template_by_id( + def list_templates( self, - id: StrictInt, + visibility: Annotated[Optional[Any], Field(description="Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -649,12 +655,13 @@ def details_of_a_template_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Template: - """Details of a Template by ID + ) -> Templates: + """List templates + Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#view-a-list-of-templates). - :param id: (required) - :type id: int + :param visibility: Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility. + :type visibility: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -677,8 +684,8 @@ def details_of_a_template_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._details_of_a_template_by_id_serialize( - id=id, + _param = self._list_templates_serialize( + visibility=visibility, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -686,10 +693,10 @@ def details_of_a_template_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Template", + '200': "Templates", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", + '406': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -704,9 +711,9 @@ def details_of_a_template_by_id( @validate_call - def details_of_a_template_by_id_with_http_info( + def list_templates_with_http_info( self, - id: StrictInt, + visibility: Annotated[Optional[Any], Field(description="Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -719,12 +726,13 @@ def details_of_a_template_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Template]: - """Details of a Template by ID + ) -> ApiResponse[Templates]: + """List templates + Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#view-a-list-of-templates). - :param id: (required) - :type id: int + :param visibility: Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility. + :type visibility: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -747,8 +755,8 @@ def details_of_a_template_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._details_of_a_template_by_id_serialize( - id=id, + _param = self._list_templates_serialize( + visibility=visibility, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -756,10 +764,10 @@ def details_of_a_template_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Template", + '200': "Templates", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", + '406': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -774,9 +782,9 @@ def details_of_a_template_by_id_with_http_info( @validate_call - def details_of_a_template_by_id_without_preload_content( + def list_templates_without_preload_content( self, - id: StrictInt, + visibility: Annotated[Optional[Any], Field(description="Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -790,11 +798,12 @@ def details_of_a_template_by_id_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Details of a Template by ID + """List templates + Returns a comprehensive list of templates, providing resource configuration details for each. Optionally, specify the `visibility` as `public` or `private` to retrieve templates with the desired visibility status. To learn more about the templates feature, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#view-a-list-of-templates). - :param id: (required) - :type id: int + :param visibility: Specify the `visibility` status as either `public` or `private` to filter and retrieve templates with the desired visibility. + :type visibility: object :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -817,8 +826,8 @@ def details_of_a_template_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._details_of_a_template_by_id_serialize( - id=id, + _param = self._list_templates_serialize( + visibility=visibility, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -826,10 +835,10 @@ def details_of_a_template_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Template", + '200': "Templates", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", + '406': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -839,9 +848,9 @@ def details_of_a_template_by_id_without_preload_content( return response_data.response - def _details_of_a_template_by_id_serialize( + def _list_templates_serialize( self, - id, + visibility, _request_auth, _content_type, _headers, @@ -861,9 +870,11 @@ def _details_of_a_template_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters + if visibility is not None: + + _query_params.append(('visibility', visibility)) + # process the header parameters # process the form parameters # process the body parameter @@ -885,7 +896,7 @@ def _details_of_a_template_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/marketplace/templates/{id}', + resource_path='/core/marketplace/templates', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -902,9 +913,9 @@ def _details_of_a_template_by_id_serialize( @validate_call - def list_templates( + def retrieve_template_details( self, - visibility: Annotated[Optional[Any], Field(description="visibility: public/private")] = None, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -917,12 +928,13 @@ def list_templates( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Templates: - """List Templates + ) -> Template: + """Retrieve template details + Retrieves the resource configuration details for a specified template. Provide the template ID in the path to retrieve details for the specified template. For additional information on template configuration details, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#retrieve-the-details-for-a-template). - :param visibility: visibility: public/private - :type visibility: object + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -945,8 +957,8 @@ def list_templates( :return: Returns the result object. """ # noqa: E501 - _param = self._list_templates_serialize( - visibility=visibility, + _param = self._retrieve_template_details_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -954,10 +966,10 @@ def list_templates( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Templates", + '200': "Template", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '406': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -972,9 +984,9 @@ def list_templates( @validate_call - def list_templates_with_http_info( + def retrieve_template_details_with_http_info( self, - visibility: Annotated[Optional[Any], Field(description="visibility: public/private")] = None, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -987,12 +999,13 @@ def list_templates_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Templates]: - """List Templates + ) -> ApiResponse[Template]: + """Retrieve template details + Retrieves the resource configuration details for a specified template. Provide the template ID in the path to retrieve details for the specified template. For additional information on template configuration details, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#retrieve-the-details-for-a-template). - :param visibility: visibility: public/private - :type visibility: object + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1015,8 +1028,8 @@ def list_templates_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_templates_serialize( - visibility=visibility, + _param = self._retrieve_template_details_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1024,10 +1037,10 @@ def list_templates_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Templates", + '200': "Template", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '406': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1042,9 +1055,9 @@ def list_templates_with_http_info( @validate_call - def list_templates_without_preload_content( + def retrieve_template_details_without_preload_content( self, - visibility: Annotated[Optional[Any], Field(description="visibility: public/private")] = None, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1058,11 +1071,12 @@ def list_templates_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Templates + """Retrieve template details + Retrieves the resource configuration details for a specified template. Provide the template ID in the path to retrieve details for the specified template. For additional information on template configuration details, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/templates#retrieve-the-details-for-a-template). - :param visibility: visibility: public/private - :type visibility: object + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1085,8 +1099,8 @@ def list_templates_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_templates_serialize( - visibility=visibility, + _param = self._retrieve_template_details_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1094,10 +1108,10 @@ def list_templates_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Templates", + '200': "Template", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '406': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1107,9 +1121,9 @@ def list_templates_without_preload_content( return response_data.response - def _list_templates_serialize( + def _retrieve_template_details_serialize( self, - visibility, + id, _request_auth, _content_type, _headers, @@ -1129,11 +1143,9 @@ def _list_templates_serialize( _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters - if visibility is not None: - - _query_params.append(('visibility', visibility)) - # process the header parameters # process the form parameters # process the body parameter @@ -1155,7 +1167,7 @@ def _list_templates_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/marketplace/templates', + resource_path='/core/marketplace/templates/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1189,8 +1201,9 @@ def update_template( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Template: - """Update Template + """Update template + Updates the details of a template. Modify the template name, description and/or `is_public` status to change the public/private visibility of the template. :param id: (required) :type id: int @@ -1263,8 +1276,9 @@ def update_template_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Template]: - """Update Template + """Update template + Updates the details of a template. Modify the template name, description and/or `is_public` status to change the public/private visibility of the template. :param id: (required) :type id: int @@ -1337,8 +1351,9 @@ def update_template_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Template + """Update template + Updates the details of a template. Modify the template name, description and/or `is_public` status to change the public/private visibility of the template. :param id: (required) :type id: int diff --git a/hyperstack/api/user_api.py b/hyperstack/api/user_api.py new file mode 100644 index 0000000..b04e474 --- /dev/null +++ b/hyperstack/api/user_api.py @@ -0,0 +1,862 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from hyperstack.models.add_user_info_success_response_model import AddUserInfoSuccessResponseModel +from hyperstack.models.userinfopostpayload import Userinfopostpayload +from hyperstack.models.users_info_list_response import UsersInfoListResponse + +from hyperstack.api_client import ApiClient, RequestSerialized +from hyperstack.api_response import ApiResponse +from hyperstack.rest import RESTResponseType + + +class UserApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_user( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UsersInfoListResponse: + """GET: Fetch User Info + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UsersInfoListResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_user_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UsersInfoListResponse]: + """GET: Fetch User Info + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UsersInfoListResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_user_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """GET: Fetch User Info + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UsersInfoListResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_user_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/billing/user/info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def post_user( + self, + payload: Userinfopostpayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddUserInfoSuccessResponseModel: + """POST: Insert user info + + + :param payload: (required) + :type payload: Userinfopostpayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_user_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddUserInfoSuccessResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def post_user_with_http_info( + self, + payload: Userinfopostpayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddUserInfoSuccessResponseModel]: + """POST: Insert user info + + + :param payload: (required) + :type payload: Userinfopostpayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_user_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddUserInfoSuccessResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def post_user_without_preload_content( + self, + payload: Userinfopostpayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """POST: Insert user info + + + :param payload: (required) + :type payload: Userinfopostpayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._post_user_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddUserInfoSuccessResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _post_user_serialize( + self, + payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if payload is not None: + _body_params = payload + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/billing/user/info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_user_info( + self, + payload: Userinfopostpayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AddUserInfoSuccessResponseModel: + """PUT: Update user info + + + :param payload: (required) + :type payload: Userinfopostpayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_user_info_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddUserInfoSuccessResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_user_info_with_http_info( + self, + payload: Userinfopostpayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AddUserInfoSuccessResponseModel]: + """PUT: Update user info + + + :param payload: (required) + :type payload: Userinfopostpayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_user_info_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddUserInfoSuccessResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_user_info_without_preload_content( + self, + payload: Userinfopostpayload, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """PUT: Update user info + + + :param payload: (required) + :type payload: Userinfopostpayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_user_info_serialize( + payload=payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AddUserInfoSuccessResponseModel", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '403': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_user_info_serialize( + self, + payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if payload is not None: + _body_params = payload + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/billing/user/info', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hyperstack/api/user_detail_choice_api.py b/hyperstack/api/user_detail_choice_api.py new file mode 100644 index 0000000..80e097f --- /dev/null +++ b/hyperstack/api/user_detail_choice_api.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from hyperstack.models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse + +from hyperstack.api_client import ApiClient, RequestSerialized +from hyperstack.api_response import ApiResponse +from hyperstack.rest import RESTResponseType + + +class UserDetailChoiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def retrieve_default_flavors_and_images_for_user( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserDefaultChoicesForUserResponse: + """Retrieve default flavors and images for user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_default_flavors_and_images_for_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDefaultChoicesForUserResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_default_flavors_and_images_for_user_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserDefaultChoicesForUserResponse]: + """Retrieve default flavors and images for user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_default_flavors_and_images_for_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDefaultChoicesForUserResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_default_flavors_and_images_for_user_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve default flavors and images for user + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_default_flavors_and_images_for_user_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserDefaultChoicesForUserResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '405': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_default_flavors_and_images_for_user_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/core/user/resources/defaults', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/hyperstack/api/user_permission_api.py b/hyperstack/api/user_permission_api.py index 4dce94f..8dca77d 100644 --- a/hyperstack/api/user_permission_api.py +++ b/hyperstack/api/user_permission_api.py @@ -17,7 +17,7 @@ from typing_extensions import Annotated from pydantic import StrictInt -from hyperstack.models.permissionsfor_user_permission import PermissionsforUserPermission +from hyperstack.models.get_user_permissions_response_model import GetUserPermissionsResponseModel from hyperstack.api_client import ApiClient, RequestSerialized from hyperstack.api_response import ApiResponse @@ -52,7 +52,7 @@ def list_current_user_permissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PermissionsforUserPermission: + ) -> GetUserPermissionsResponseModel: """List Current User Permissions @@ -86,7 +86,7 @@ def list_current_user_permissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PermissionsforUserPermission", + '200': "GetUserPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -117,7 +117,7 @@ def list_current_user_permissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PermissionsforUserPermission]: + ) -> ApiResponse[GetUserPermissionsResponseModel]: """List Current User Permissions @@ -151,7 +151,7 @@ def list_current_user_permissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PermissionsforUserPermission", + '200': "GetUserPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -216,7 +216,7 @@ def list_current_user_permissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PermissionsforUserPermission", + '200': "GetUserPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '500': None, @@ -303,7 +303,7 @@ def list_user_permissions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PermissionsforUserPermission: + ) -> GetUserPermissionsResponseModel: """List User Permissions @@ -340,7 +340,7 @@ def list_user_permissions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PermissionsforUserPermission", + '200': "GetUserPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '405': "ErrorResponseModel", @@ -373,7 +373,7 @@ def list_user_permissions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PermissionsforUserPermission]: + ) -> ApiResponse[GetUserPermissionsResponseModel]: """List User Permissions @@ -410,7 +410,7 @@ def list_user_permissions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PermissionsforUserPermission", + '200': "GetUserPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '405': "ErrorResponseModel", @@ -480,7 +480,7 @@ def list_user_permissions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PermissionsforUserPermission", + '200': "GetUserPermissionsResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '405': "ErrorResponseModel", diff --git a/hyperstack/api/virtual_machine_api.py b/hyperstack/api/virtual_machine_api.py index 5569647..0dd93f5 100644 --- a/hyperstack/api/virtual_machine_api.py +++ b/hyperstack/api/virtual_machine_api.py @@ -18,11 +18,15 @@ from pydantic import StrictInt, StrictStr, field_validator from typing import Optional +from hyperstack.models.attach_firewalls_to_vm_payload import AttachFirewallsToVMPayload +from hyperstack.models.contract_instances_response import ContractInstancesResponse from hyperstack.models.create_instances_payload import CreateInstancesPayload from hyperstack.models.create_security_rule_payload import CreateSecurityRulePayload +from hyperstack.models.editlabelofanexisting_vm_payload import EditlabelofanexistingVMPayload from hyperstack.models.instance import Instance from hyperstack.models.instance_resize_payload import InstanceResizePayload from hyperstack.models.instances import Instances +from hyperstack.models.metrics_fields import MetricsFields from hyperstack.models.response_model import ResponseModel from hyperstack.models.security_group_rule import SecurityGroupRule @@ -45,7 +49,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def add_security_rule( + def add_firewall_rule_to_virtual_machine( self, id: StrictInt, payload: CreateSecurityRulePayload, @@ -62,8 +66,9 @@ def add_security_rule( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SecurityGroupRule: - """Add Security Rule + """Add firewall rule to virtual machine + Creates a firewall rule and associates it with a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/security-rules). :param id: (required) :type id: int @@ -91,7 +96,7 @@ def add_security_rule( :return: Returns the result object. """ # noqa: E501 - _param = self._add_security_rule_serialize( + _param = self._add_firewall_rule_to_virtual_machine_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -120,7 +125,7 @@ def add_security_rule( @validate_call - def add_security_rule_with_http_info( + def add_firewall_rule_to_virtual_machine_with_http_info( self, id: StrictInt, payload: CreateSecurityRulePayload, @@ -137,8 +142,9 @@ def add_security_rule_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SecurityGroupRule]: - """Add Security Rule + """Add firewall rule to virtual machine + Creates a firewall rule and associates it with a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/security-rules). :param id: (required) :type id: int @@ -166,7 +172,7 @@ def add_security_rule_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._add_security_rule_serialize( + _param = self._add_firewall_rule_to_virtual_machine_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -195,7 +201,7 @@ def add_security_rule_with_http_info( @validate_call - def add_security_rule_without_preload_content( + def add_firewall_rule_to_virtual_machine_without_preload_content( self, id: StrictInt, payload: CreateSecurityRulePayload, @@ -212,8 +218,9 @@ def add_security_rule_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Add Security Rule + """Add firewall rule to virtual machine + Creates a firewall rule and associates it with a virtual machine. Include the virtual machine ID in the path, and provide the firewall rule configuration in the request body, as detailed below. For additional information on firewall rules, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/security-rules). :param id: (required) :type id: int @@ -241,7 +248,7 @@ def add_security_rule_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._add_security_rule_serialize( + _param = self._add_firewall_rule_to_virtual_machine_serialize( id=id, payload=payload, _request_auth=_request_auth, @@ -265,7 +272,7 @@ def add_security_rule_without_preload_content( return response_data.response - def _add_security_rule_serialize( + def _add_firewall_rule_to_virtual_machine_serialize( self, id, payload, @@ -344,9 +351,10 @@ def _add_security_rule_serialize( @validate_call - def create_instances( + def attach_firewalls_to_a_vm( self, - payload: CreateInstancesPayload, + vm_id: StrictInt, + payload: AttachFirewallsToVMPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -359,12 +367,15 @@ def create_instances( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Instances: - """Create Instances + ) -> ResponseModel: + """Attach Firewalls to a VM + Attach Firewalls to a VM + :param vm_id: (required) + :type vm_id: int :param payload: (required) - :type payload: CreateInstancesPayload + :type payload: AttachFirewallsToVMPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -387,7 +398,8 @@ def create_instances( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instances_serialize( + _param = self._attach_firewalls_to_a_vm_serialize( + vm_id=vm_id, payload=payload, _request_auth=_request_auth, _content_type=_content_type, @@ -396,12 +408,10 @@ def create_instances( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instances", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", - '405': "ErrorResponseModel", - '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -416,9 +426,10 @@ def create_instances( @validate_call - def create_instances_with_http_info( + def attach_firewalls_to_a_vm_with_http_info( self, - payload: CreateInstancesPayload, + vm_id: StrictInt, + payload: AttachFirewallsToVMPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -431,12 +442,15 @@ def create_instances_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Instances]: - """Create Instances + ) -> ApiResponse[ResponseModel]: + """Attach Firewalls to a VM + Attach Firewalls to a VM + :param vm_id: (required) + :type vm_id: int :param payload: (required) - :type payload: CreateInstancesPayload + :type payload: AttachFirewallsToVMPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -459,7 +473,8 @@ def create_instances_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instances_serialize( + _param = self._attach_firewalls_to_a_vm_serialize( + vm_id=vm_id, payload=payload, _request_auth=_request_auth, _content_type=_content_type, @@ -468,12 +483,10 @@ def create_instances_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instances", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", - '405': "ErrorResponseModel", - '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -488,9 +501,10 @@ def create_instances_with_http_info( @validate_call - def create_instances_without_preload_content( + def attach_firewalls_to_a_vm_without_preload_content( self, - payload: CreateInstancesPayload, + vm_id: StrictInt, + payload: AttachFirewallsToVMPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -504,11 +518,14 @@ def create_instances_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Instances + """Attach Firewalls to a VM + Attach Firewalls to a VM + :param vm_id: (required) + :type vm_id: int :param payload: (required) - :type payload: CreateInstancesPayload + :type payload: AttachFirewallsToVMPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -531,7 +548,8 @@ def create_instances_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_instances_serialize( + _param = self._attach_firewalls_to_a_vm_serialize( + vm_id=vm_id, payload=payload, _request_auth=_request_auth, _content_type=_content_type, @@ -540,12 +558,10 @@ def create_instances_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instances", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", - '405': "ErrorResponseModel", - '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -555,8 +571,9 @@ def create_instances_without_preload_content( return response_data.response - def _create_instances_serialize( + def _attach_firewalls_to_a_vm_serialize( self, + vm_id, payload, _request_auth, _content_type, @@ -577,6 +594,8 @@ def _create_instances_serialize( _body_params: Optional[bytes] = None # process the path parameters + if vm_id is not None: + _path_params['vm_id'] = vm_id # process the query parameters # process the header parameters # process the form parameters @@ -614,7 +633,7 @@ def _create_instances_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/core/virtual-machines', + resource_path='/core/virtual-machines/{vm_id}/attach-firewalls', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -631,10 +650,9 @@ def _create_instances_serialize( @validate_call - def delete_a_security_rule( + def create_virtual_machine( self, - virtual_machine_id: StrictInt, - sg_rule_id: StrictInt, + payload: CreateInstancesPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -647,14 +665,13 @@ def delete_a_security_rule( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResponseModel: - """Delete a security group rule + ) -> Instances: + """Create virtual machine + Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features). - :param virtual_machine_id: (required) - :type virtual_machine_id: int - :param sg_rule_id: (required) - :type sg_rule_id: int + :param payload: (required) + :type payload: CreateInstancesPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -677,9 +694,8 @@ def delete_a_security_rule( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_security_rule_serialize( - virtual_machine_id=virtual_machine_id, - sg_rule_id=sg_rule_id, + _param = self._create_virtual_machine_serialize( + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -687,10 +703,12 @@ def delete_a_security_rule( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "Instances", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '405': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -705,10 +723,9 @@ def delete_a_security_rule( @validate_call - def delete_a_security_rule_with_http_info( + def create_virtual_machine_with_http_info( self, - virtual_machine_id: StrictInt, - sg_rule_id: StrictInt, + payload: CreateInstancesPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -721,14 +738,13 @@ def delete_a_security_rule_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResponseModel]: - """Delete a security group rule + ) -> ApiResponse[Instances]: + """Create virtual machine + Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features). - :param virtual_machine_id: (required) - :type virtual_machine_id: int - :param sg_rule_id: (required) - :type sg_rule_id: int + :param payload: (required) + :type payload: CreateInstancesPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -751,9 +767,8 @@ def delete_a_security_rule_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_security_rule_serialize( - virtual_machine_id=virtual_machine_id, - sg_rule_id=sg_rule_id, + _param = self._create_virtual_machine_serialize( + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -761,10 +776,12 @@ def delete_a_security_rule_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "Instances", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '405': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -779,10 +796,9 @@ def delete_a_security_rule_with_http_info( @validate_call - def delete_a_security_rule_without_preload_content( + def create_virtual_machine_without_preload_content( self, - virtual_machine_id: StrictInt, - sg_rule_id: StrictInt, + payload: CreateInstancesPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -796,13 +812,12 @@ def delete_a_security_rule_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a security group rule + """Create virtual machine + Creates one or more virtual machines with the specified custom configuration and features provided in the request body. For more information about the virtual machine features offered by Infrahub, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/virtual-machine-features#create-a-virtual-machine-with-custom-features). - :param virtual_machine_id: (required) - :type virtual_machine_id: int - :param sg_rule_id: (required) - :type sg_rule_id: int + :param payload: (required) + :type payload: CreateInstancesPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -825,9 +840,8 @@ def delete_a_security_rule_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_a_security_rule_serialize( - virtual_machine_id=virtual_machine_id, - sg_rule_id=sg_rule_id, + _param = self._create_virtual_machine_serialize( + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -835,10 +849,12 @@ def delete_a_security_rule_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "Instances", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '405': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -848,10 +864,9 @@ def delete_a_security_rule_without_preload_content( return response_data.response - def _delete_a_security_rule_serialize( + def _create_virtual_machine_serialize( self, - virtual_machine_id, - sg_rule_id, + payload, _request_auth, _content_type, _headers, @@ -871,14 +886,12 @@ def _delete_a_security_rule_serialize( _body_params: Optional[bytes] = None # process the path parameters - if virtual_machine_id is not None: - _path_params['virtual_machine_id'] = virtual_machine_id - if sg_rule_id is not None: - _path_params['sg_rule_id'] = sg_rule_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if payload is not None: + _body_params = payload # set the HTTP header `Accept` @@ -888,6 +901,19 @@ def _delete_a_security_rule_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -896,8 +922,8 @@ def _delete_a_security_rule_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id}', + method='POST', + resource_path='/core/virtual-machines', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -914,9 +940,10 @@ def _delete_a_security_rule_serialize( @validate_call - def delete_an_instance( + def delete_firewall_rule_from_virtual_machine( self, - id: StrictInt, + virtual_machine_id: StrictInt, + sg_rule_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -930,11 +957,14 @@ def delete_an_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete an instance + """Delete firewall rule from virtual machine + Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine. - :param id: (required) - :type id: int + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param sg_rule_id: (required) + :type sg_rule_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -957,8 +987,9 @@ def delete_an_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_an_instance_serialize( - id=id, + _param = self._delete_firewall_rule_from_virtual_machine_serialize( + virtual_machine_id=virtual_machine_id, + sg_rule_id=sg_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -984,9 +1015,10 @@ def delete_an_instance( @validate_call - def delete_an_instance_with_http_info( + def delete_firewall_rule_from_virtual_machine_with_http_info( self, - id: StrictInt, + virtual_machine_id: StrictInt, + sg_rule_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1000,11 +1032,14 @@ def delete_an_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete an instance + """Delete firewall rule from virtual machine + Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine. - :param id: (required) - :type id: int + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param sg_rule_id: (required) + :type sg_rule_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1027,8 +1062,9 @@ def delete_an_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_an_instance_serialize( - id=id, + _param = self._delete_firewall_rule_from_virtual_machine_serialize( + virtual_machine_id=virtual_machine_id, + sg_rule_id=sg_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1054,9 +1090,10 @@ def delete_an_instance_with_http_info( @validate_call - def delete_an_instance_without_preload_content( + def delete_firewall_rule_from_virtual_machine_without_preload_content( self, - id: StrictInt, + virtual_machine_id: StrictInt, + sg_rule_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1070,11 +1107,14 @@ def delete_an_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete an instance + """Delete firewall rule from virtual machine + Deletes a firewall rule associated with a virtual machine. Provide the virtual machine ID and the firewall rule ID in the path to remove the specified rule from the specified virtual machine. - :param id: (required) - :type id: int + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param sg_rule_id: (required) + :type sg_rule_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1097,8 +1137,9 @@ def delete_an_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_an_instance_serialize( - id=id, + _param = self._delete_firewall_rule_from_virtual_machine_serialize( + virtual_machine_id=virtual_machine_id, + sg_rule_id=sg_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1119,9 +1160,10 @@ def delete_an_instance_without_preload_content( return response_data.response - def _delete_an_instance_serialize( + def _delete_firewall_rule_from_virtual_machine_serialize( self, - id, + virtual_machine_id, + sg_rule_id, _request_auth, _content_type, _headers, @@ -1141,8 +1183,10 @@ def _delete_an_instance_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id + if virtual_machine_id is not None: + _path_params['virtual_machine_id'] = virtual_machine_id + if sg_rule_id is not None: + _path_params['sg_rule_id'] = sg_rule_id # process the query parameters # process the header parameters # process the form parameters @@ -1165,7 +1209,7 @@ def _delete_an_instance_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/core/virtual-machines/{id}', + resource_path='/core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1182,7 +1226,7 @@ def _delete_an_instance_serialize( @validate_call - def get_an_instance_details( + def delete_virtual_machine( self, id: StrictInt, _request_timeout: Union[ @@ -1197,9 +1241,10 @@ def get_an_instance_details( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Instance: - """Get an instance details + ) -> ResponseModel: + """Delete virtual machine + Permanently deletes a virtual machine. Supply the virtual machine ID in the path to delete the specified virtual machine. :param id: (required) :type id: int @@ -1225,7 +1270,7 @@ def get_an_instance_details( :return: Returns the result object. """ # noqa: E501 - _param = self._get_an_instance_details_serialize( + _param = self._delete_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1234,10 +1279,11 @@ def get_an_instance_details( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instance", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1252,7 +1298,7 @@ def get_an_instance_details( @validate_call - def get_an_instance_details_with_http_info( + def delete_virtual_machine_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -1267,9 +1313,10 @@ def get_an_instance_details_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Instance]: - """Get an instance details + ) -> ApiResponse[ResponseModel]: + """Delete virtual machine + Permanently deletes a virtual machine. Supply the virtual machine ID in the path to delete the specified virtual machine. :param id: (required) :type id: int @@ -1295,7 +1342,7 @@ def get_an_instance_details_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_an_instance_details_serialize( + _param = self._delete_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1304,10 +1351,11 @@ def get_an_instance_details_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instance", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1322,7 +1370,7 @@ def get_an_instance_details_with_http_info( @validate_call - def get_an_instance_details_without_preload_content( + def delete_virtual_machine_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -1338,8 +1386,9 @@ def get_an_instance_details_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get an instance details + """Delete virtual machine + Permanently deletes a virtual machine. Supply the virtual machine ID in the path to delete the specified virtual machine. :param id: (required) :type id: int @@ -1365,7 +1414,7 @@ def get_an_instance_details_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_an_instance_details_serialize( + _param = self._delete_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -1374,10 +1423,11 @@ def get_an_instance_details_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instance", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1387,7 +1437,7 @@ def get_an_instance_details_without_preload_content( return response_data.response - def _get_an_instance_details_serialize( + def _delete_virtual_machine_serialize( self, id, _request_auth, @@ -1432,7 +1482,7 @@ def _get_an_instance_details_serialize( ] return self.api_client.param_serialize( - method='GET', + method='DELETE', resource_path='/core/virtual-machines/{id}', path_params=_path_params, query_params=_query_params, @@ -1450,9 +1500,10 @@ def _get_an_instance_details_serialize( @validate_call - def hard_reboot_instance( + def edit_labels_of_an_existing_vm( self, - id: StrictInt, + virtual_machine_id: StrictInt, + payload: EditlabelofanexistingVMPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1466,11 +1517,13 @@ def hard_reboot_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Hard Reboot Instance + """Edit labels of an existing VM - :param id: (required) - :type id: int + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param payload: (required) + :type payload: EditlabelofanexistingVMPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1493,8 +1546,9 @@ def hard_reboot_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._hard_reboot_instance_serialize( - id=id, + _param = self._edit_labels_of_an_existing_vm_serialize( + virtual_machine_id=virtual_machine_id, + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1506,6 +1560,7 @@ def hard_reboot_instance( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1520,9 +1575,10 @@ def hard_reboot_instance( @validate_call - def hard_reboot_instance_with_http_info( + def edit_labels_of_an_existing_vm_with_http_info( self, - id: StrictInt, + virtual_machine_id: StrictInt, + payload: EditlabelofanexistingVMPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1536,11 +1592,13 @@ def hard_reboot_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Hard Reboot Instance + """Edit labels of an existing VM - :param id: (required) - :type id: int + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param payload: (required) + :type payload: EditlabelofanexistingVMPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1563,8 +1621,9 @@ def hard_reboot_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._hard_reboot_instance_serialize( - id=id, + _param = self._edit_labels_of_an_existing_vm_serialize( + virtual_machine_id=virtual_machine_id, + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1576,6 +1635,7 @@ def hard_reboot_instance_with_http_info( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1590,9 +1650,10 @@ def hard_reboot_instance_with_http_info( @validate_call - def hard_reboot_instance_without_preload_content( + def edit_labels_of_an_existing_vm_without_preload_content( self, - id: StrictInt, + virtual_machine_id: StrictInt, + payload: EditlabelofanexistingVMPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1606,11 +1667,13 @@ def hard_reboot_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Hard Reboot Instance + """Edit labels of an existing VM - :param id: (required) - :type id: int + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param payload: (required) + :type payload: EditlabelofanexistingVMPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1633,8 +1696,9 @@ def hard_reboot_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._hard_reboot_instance_serialize( - id=id, + _param = self._edit_labels_of_an_existing_vm_serialize( + virtual_machine_id=virtual_machine_id, + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1646,6 +1710,7 @@ def hard_reboot_instance_without_preload_content( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '409': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -1655,9 +1720,10 @@ def hard_reboot_instance_without_preload_content( return response_data.response - def _hard_reboot_instance_serialize( + def _edit_labels_of_an_existing_vm_serialize( self, - id, + virtual_machine_id, + payload, _request_auth, _content_type, _headers, @@ -1677,12 +1743,14 @@ def _hard_reboot_instance_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id + if virtual_machine_id is not None: + _path_params['virtual_machine_id'] = virtual_machine_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if payload is not None: + _body_params = payload # set the HTTP header `Accept` @@ -1692,6 +1760,19 @@ def _hard_reboot_instance_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1700,8 +1781,8 @@ def _hard_reboot_instance_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/core/virtual-machines/{id}/hard-reboot', + method='PUT', + resource_path='/core/virtual-machines/{virtual_machine_id}/label', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1718,9 +1799,9 @@ def _hard_reboot_instance_serialize( @validate_call - def hibernate_instance( + def hard_reboot_virtual_machine( self, - virtual_machine_id: StrictInt, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1734,11 +1815,12 @@ def hibernate_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Hibernate Instance + """Hard reboot virtual machine + Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine. - :param virtual_machine_id: (required) - :type virtual_machine_id: int + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1761,8 +1843,8 @@ def hibernate_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._hibernate_instance_serialize( - virtual_machine_id=virtual_machine_id, + _param = self._hard_reboot_virtual_machine_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1788,9 +1870,9 @@ def hibernate_instance( @validate_call - def hibernate_instance_with_http_info( + def hard_reboot_virtual_machine_with_http_info( self, - virtual_machine_id: StrictInt, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1804,11 +1886,12 @@ def hibernate_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Hibernate Instance + """Hard reboot virtual machine + Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine. - :param virtual_machine_id: (required) - :type virtual_machine_id: int + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1831,8 +1914,8 @@ def hibernate_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._hibernate_instance_serialize( - virtual_machine_id=virtual_machine_id, + _param = self._hard_reboot_virtual_machine_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1858,9 +1941,9 @@ def hibernate_instance_with_http_info( @validate_call - def hibernate_instance_without_preload_content( + def hard_reboot_virtual_machine_without_preload_content( self, - virtual_machine_id: StrictInt, + id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1874,11 +1957,12 @@ def hibernate_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Hibernate Instance + """Hard reboot virtual machine + Initiates a hard reboot for a virtual machine, simulating the process of unplugging and rebooting a physical machine. Provide the virtual machine ID in the path to execute a hard reboot for the specified virtual machine. - :param virtual_machine_id: (required) - :type virtual_machine_id: int + :param id: (required) + :type id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1901,8 +1985,8 @@ def hibernate_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._hibernate_instance_serialize( - virtual_machine_id=virtual_machine_id, + _param = self._hard_reboot_virtual_machine_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1923,9 +2007,9 @@ def hibernate_instance_without_preload_content( return response_data.response - def _hibernate_instance_serialize( + def _hard_reboot_virtual_machine_serialize( self, - virtual_machine_id, + id, _request_auth, _content_type, _headers, @@ -1945,8 +2029,8 @@ def _hibernate_instance_serialize( _body_params: Optional[bytes] = None # process the path parameters - if virtual_machine_id is not None: - _path_params['virtual_machine_id'] = virtual_machine_id + if id is not None: + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1969,7 +2053,7 @@ def _hibernate_instance_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/virtual-machines/{virtual_machine_id}/hibernate', + resource_path='/core/virtual-machines/{id}/hard-reboot', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1986,8 +2070,9 @@ def _hibernate_instance_serialize( @validate_call - def list_instances( + def hibernate_virtual_machine( self, + virtual_machine_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2000,11 +2085,14 @@ def list_instances( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Instances: - """List Instances + ) -> ResponseModel: + """Hibernate virtual machine + Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated. - :param _request_timeout: timeout setting for this request. If one + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. @@ -2026,7 +2114,8 @@ def list_instances( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._hibernate_virtual_machine_serialize( + virtual_machine_id=virtual_machine_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2034,9 +2123,10 @@ def list_instances( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instances", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2051,8 +2141,9 @@ def list_instances( @validate_call - def list_instances_with_http_info( + def hibernate_virtual_machine_with_http_info( self, + virtual_machine_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2065,10 +2156,13 @@ def list_instances_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Instances]: - """List Instances + ) -> ApiResponse[ResponseModel]: + """Hibernate virtual machine + Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated. + :param virtual_machine_id: (required) + :type virtual_machine_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2091,7 +2185,8 @@ def list_instances_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._hibernate_virtual_machine_serialize( + virtual_machine_id=virtual_machine_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2099,9 +2194,10 @@ def list_instances_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instances", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2116,8 +2212,9 @@ def list_instances_with_http_info( @validate_call - def list_instances_without_preload_content( + def hibernate_virtual_machine_without_preload_content( self, + virtual_machine_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2131,9 +2228,12 @@ def list_instances_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Instances + """Hibernate virtual machine + Initiates the hibernation of a virtual machine, saving its current state to disk before powering off. Provide the virtual machine ID in the path to specify the virtual machine to be hibernated. + :param virtual_machine_id: (required) + :type virtual_machine_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2156,7 +2256,8 @@ def list_instances_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_instances_serialize( + _param = self._hibernate_virtual_machine_serialize( + virtual_machine_id=virtual_machine_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2164,9 +2265,10 @@ def list_instances_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Instances", + '200': "ResponseModel", '400': "ErrorResponseModel", '401': "ErrorResponseModel", + '404': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2176,8 +2278,9 @@ def list_instances_without_preload_content( return response_data.response - def _list_instances_serialize( + def _hibernate_virtual_machine_serialize( self, + virtual_machine_id, _request_auth, _content_type, _headers, @@ -2197,6 +2300,8 @@ def _list_instances_serialize( _body_params: Optional[bytes] = None # process the path parameters + if virtual_machine_id is not None: + _path_params['virtual_machine_id'] = virtual_machine_id # process the query parameters # process the header parameters # process the form parameters @@ -2219,7 +2324,7 @@ def _list_instances_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/virtual-machines', + resource_path='/core/virtual-machines/{virtual_machine_id}/hibernate', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2236,10 +2341,8 @@ def _list_instances_serialize( @validate_call - def resize_virtual_machine( + def list_virtual_machines( self, - virtual_machine_id: StrictInt, - payload: InstanceResizePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2252,14 +2355,11 @@ def resize_virtual_machine( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResponseModel: - """Resize Virtual Machine + ) -> Instances: + """List all virtual machines + Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first. - :param virtual_machine_id: (required) - :type virtual_machine_id: int - :param payload: (required) - :type payload: InstanceResizePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2282,9 +2382,7 @@ def resize_virtual_machine( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_virtual_machine_serialize( - virtual_machine_id=virtual_machine_id, - payload=payload, + _param = self._list_virtual_machines_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2292,11 +2390,9 @@ def resize_virtual_machine( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "Instances", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", - '405': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2311,10 +2407,8 @@ def resize_virtual_machine( @validate_call - def resize_virtual_machine_with_http_info( + def list_virtual_machines_with_http_info( self, - virtual_machine_id: StrictInt, - payload: InstanceResizePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2327,14 +2421,11 @@ def resize_virtual_machine_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResponseModel]: - """Resize Virtual Machine + ) -> ApiResponse[Instances]: + """List all virtual machines + Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first. - :param virtual_machine_id: (required) - :type virtual_machine_id: int - :param payload: (required) - :type payload: InstanceResizePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2357,9 +2448,7 @@ def resize_virtual_machine_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_virtual_machine_serialize( - virtual_machine_id=virtual_machine_id, - payload=payload, + _param = self._list_virtual_machines_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2367,11 +2456,9 @@ def resize_virtual_machine_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "Instances", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", - '405': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2386,10 +2473,8 @@ def resize_virtual_machine_with_http_info( @validate_call - def resize_virtual_machine_without_preload_content( + def list_virtual_machines_without_preload_content( self, - virtual_machine_id: StrictInt, - payload: InstanceResizePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2403,13 +2488,10 @@ def resize_virtual_machine_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Resize Virtual Machine + """List all virtual machines + Returns a list of your existing virtual machines, providing configuration details for each. The list is sorted by creation date, with the oldest virtual machines displayed first. - :param virtual_machine_id: (required) - :type virtual_machine_id: int - :param payload: (required) - :type payload: InstanceResizePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2432,9 +2514,7 @@ def resize_virtual_machine_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_virtual_machine_serialize( - virtual_machine_id=virtual_machine_id, - payload=payload, + _param = self._list_virtual_machines_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2442,11 +2522,9 @@ def resize_virtual_machine_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponseModel", + '200': "Instances", '400': "ErrorResponseModel", '401': "ErrorResponseModel", - '404': "ErrorResponseModel", - '405': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2456,10 +2534,8 @@ def resize_virtual_machine_without_preload_content( return response_data.response - def _resize_virtual_machine_serialize( + def _list_virtual_machines_serialize( self, - virtual_machine_id, - payload, _request_auth, _content_type, _headers, @@ -2479,14 +2555,10 @@ def _resize_virtual_machine_serialize( _body_params: Optional[bytes] = None # process the path parameters - if virtual_machine_id is not None: - _path_params['virtual_machine_id'] = virtual_machine_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if payload is not None: - _body_params = payload # set the HTTP header `Accept` @@ -2496,19 +2568,6 @@ def _resize_virtual_machine_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2517,8 +2576,8 @@ def _resize_virtual_machine_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/core/virtual-machines/{virtual_machine_id}/resize', + method='GET', + resource_path='/core/virtual-machines', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2535,9 +2594,10 @@ def _resize_virtual_machine_serialize( @validate_call - def restore_instance_from_hibernation( + def resize_virtual_machine( self, virtual_machine_id: StrictInt, + payload: InstanceResizePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2551,11 +2611,14 @@ def restore_instance_from_hibernation( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Restore Instance from Hibernation + """Resize virtual machine + Updates the configuration specifications for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine). :param virtual_machine_id: (required) :type virtual_machine_id: int + :param payload: (required) + :type payload: InstanceResizePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2578,8 +2641,9 @@ def restore_instance_from_hibernation( :return: Returns the result object. """ # noqa: E501 - _param = self._restore_instance_from_hibernation_serialize( + _param = self._resize_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2591,6 +2655,7 @@ def restore_instance_from_hibernation( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '405': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2605,9 +2670,10 @@ def restore_instance_from_hibernation( @validate_call - def restore_instance_from_hibernation_with_http_info( + def resize_virtual_machine_with_http_info( self, virtual_machine_id: StrictInt, + payload: InstanceResizePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2621,11 +2687,14 @@ def restore_instance_from_hibernation_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Restore Instance from Hibernation + """Resize virtual machine + Updates the configuration specifications for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine). :param virtual_machine_id: (required) :type virtual_machine_id: int + :param payload: (required) + :type payload: InstanceResizePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2648,8 +2717,9 @@ def restore_instance_from_hibernation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._restore_instance_from_hibernation_serialize( + _param = self._resize_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2661,6 +2731,7 @@ def restore_instance_from_hibernation_with_http_info( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '405': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2675,9 +2746,10 @@ def restore_instance_from_hibernation_with_http_info( @validate_call - def restore_instance_from_hibernation_without_preload_content( + def resize_virtual_machine_without_preload_content( self, virtual_machine_id: StrictInt, + payload: InstanceResizePayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2691,11 +2763,14 @@ def restore_instance_from_hibernation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Restore Instance from Hibernation + """Resize virtual machine + Updates the configuration specifications for an existing virtual machine. Include the virtual machine ID in the path and provide the new configuration, referred to as a `flavor`, in the body of the request. For additional information resizing, [**click here**](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors#modify-the-flavor-of-an-existing-virtual-machine). :param virtual_machine_id: (required) :type virtual_machine_id: int + :param payload: (required) + :type payload: InstanceResizePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2718,8 +2793,9 @@ def restore_instance_from_hibernation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._restore_instance_from_hibernation_serialize( + _param = self._resize_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, + payload=payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2731,6 +2807,7 @@ def restore_instance_from_hibernation_without_preload_content( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", + '405': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2740,9 +2817,10 @@ def restore_instance_from_hibernation_without_preload_content( return response_data.response - def _restore_instance_from_hibernation_serialize( + def _resize_virtual_machine_serialize( self, virtual_machine_id, + payload, _request_auth, _content_type, _headers, @@ -2768,6 +2846,8 @@ def _restore_instance_from_hibernation_serialize( # process the header parameters # process the form parameters # process the body parameter + if payload is not None: + _body_params = payload # set the HTTP header `Accept` @@ -2777,6 +2857,19 @@ def _restore_instance_from_hibernation_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -2785,8 +2878,8 @@ def _restore_instance_from_hibernation_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/core/virtual-machines/{virtual_machine_id}/hibernate-restore', + method='POST', + resource_path='/core/virtual-machines/{virtual_machine_id}/resize', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2803,10 +2896,9 @@ def _restore_instance_from_hibernation_serialize( @validate_call - def retrieved_metrics_successfully( + def restore_virtual_machine_from_hibernation( self, virtual_machine_id: StrictInt, - duration: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2820,13 +2912,12 @@ def retrieved_metrics_successfully( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Get instance metrics + """Restore virtual machine from hibernation + Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation. :param virtual_machine_id: (required) :type virtual_machine_id: int - :param duration: - :type duration: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2849,9 +2940,8 @@ def retrieved_metrics_successfully( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieved_metrics_successfully_serialize( + _param = self._restore_virtual_machine_from_hibernation_serialize( virtual_machine_id=virtual_machine_id, - duration=duration, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2863,7 +2953,6 @@ def retrieved_metrics_successfully( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", - '406': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2878,10 +2967,9 @@ def retrieved_metrics_successfully( @validate_call - def retrieved_metrics_successfully_with_http_info( + def restore_virtual_machine_from_hibernation_with_http_info( self, virtual_machine_id: StrictInt, - duration: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2895,13 +2983,12 @@ def retrieved_metrics_successfully_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Get instance metrics + """Restore virtual machine from hibernation + Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation. :param virtual_machine_id: (required) :type virtual_machine_id: int - :param duration: - :type duration: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2924,9 +3011,8 @@ def retrieved_metrics_successfully_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieved_metrics_successfully_serialize( + _param = self._restore_virtual_machine_from_hibernation_serialize( virtual_machine_id=virtual_machine_id, - duration=duration, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2938,7 +3024,6 @@ def retrieved_metrics_successfully_with_http_info( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", - '406': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -2953,10 +3038,9 @@ def retrieved_metrics_successfully_with_http_info( @validate_call - def retrieved_metrics_successfully_without_preload_content( + def restore_virtual_machine_from_hibernation_without_preload_content( self, virtual_machine_id: StrictInt, - duration: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2970,13 +3054,12 @@ def retrieved_metrics_successfully_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get instance metrics + """Restore virtual machine from hibernation + Resumes a virtual machine from hibernation, bringing it back to an active state. Provide the virtual machine ID in the path to specify the virtual machine to be restored from hibernation. :param virtual_machine_id: (required) :type virtual_machine_id: int - :param duration: - :type duration: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2999,9 +3082,8 @@ def retrieved_metrics_successfully_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._retrieved_metrics_successfully_serialize( + _param = self._restore_virtual_machine_from_hibernation_serialize( virtual_machine_id=virtual_machine_id, - duration=duration, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3013,7 +3095,6 @@ def retrieved_metrics_successfully_without_preload_content( '400': "ErrorResponseModel", '401': "ErrorResponseModel", '404': "ErrorResponseModel", - '406': "ErrorResponseModel", '500': None, } response_data = self.api_client.call_api( @@ -3023,10 +3104,9 @@ def retrieved_metrics_successfully_without_preload_content( return response_data.response - def _retrieved_metrics_successfully_serialize( + def _restore_virtual_machine_from_hibernation_serialize( self, virtual_machine_id, - duration, _request_auth, _content_type, _headers, @@ -3049,10 +3129,6 @@ def _retrieved_metrics_successfully_serialize( if virtual_machine_id is not None: _path_params['virtual_machine_id'] = virtual_machine_id # process the query parameters - if duration is not None: - - _query_params.append(('duration', duration)) - # process the header parameters # process the form parameters # process the body parameter @@ -3074,7 +3150,834 @@ def _retrieved_metrics_successfully_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/core/virtual-machines/{virtual_machine_id}/metrics', + resource_path='/core/virtual-machines/{virtual_machine_id}/hibernate-restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_virtual_machine_details( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Instance: + """Retrieve virtual machine details + + Retrieves the details of an existing virtual machine. Supply the virtual machine ID in the path, and Infrahub will return the corresponding Virtual Machine object. + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machine_details_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_virtual_machine_details_with_http_info( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Instance]: + """Retrieve virtual machine details + + Retrieves the details of an existing virtual machine. Supply the virtual machine ID in the path, and Infrahub will return the corresponding Virtual Machine object. + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machine_details_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_virtual_machine_details_without_preload_content( + self, + id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve virtual machine details + + Retrieves the details of an existing virtual machine. Supply the virtual machine ID in the path, and Infrahub will return the corresponding Virtual Machine object. + + :param id: (required) + :type id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machine_details_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Instance", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_virtual_machine_details_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/core/virtual-machines/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_virtual_machine_performance_metrics( + self, + virtual_machine_id: StrictInt, + duration: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MetricsFields: + """Retrieve virtual machine performance metrics + + Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics). + + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param duration: + :type duration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machine_performance_metrics_serialize( + virtual_machine_id=virtual_machine_id, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MetricsFields", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '406': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_virtual_machine_performance_metrics_with_http_info( + self, + virtual_machine_id: StrictInt, + duration: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MetricsFields]: + """Retrieve virtual machine performance metrics + + Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics). + + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param duration: + :type duration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machine_performance_metrics_serialize( + virtual_machine_id=virtual_machine_id, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MetricsFields", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '406': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_virtual_machine_performance_metrics_without_preload_content( + self, + virtual_machine_id: StrictInt, + duration: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve virtual machine performance metrics + + Retrieves performance metrics data for a virtual machine. Provide the virtual machine ID in the path to retrieve the following data for the specified virtual machine: CPU usage, memory usage (RAM), `network.in`, `network.out`, `disk.read`, and `disk.write`. The optional `duration` parameter can be used to specify the period for retrieving performance metrics; the default value will retrieve all available data. To learn more about virtual machine performance metrics, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#performance-metrics). + + :param virtual_machine_id: (required) + :type virtual_machine_id: int + :param duration: + :type duration: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machine_performance_metrics_serialize( + virtual_machine_id=virtual_machine_id, + duration=duration, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MetricsFields", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '404': "ErrorResponseModel", + '406': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_virtual_machine_performance_metrics_serialize( + self, + virtual_machine_id, + duration, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if virtual_machine_id is not None: + _path_params['virtual_machine_id'] = virtual_machine_id + # process the query parameters + if duration is not None: + + _query_params.append(('duration', duration)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/core/virtual-machines/{virtual_machine_id}/metrics', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def retrieve_virtual_machines_associated_with_a_contract( + self, + contract_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ContractInstancesResponse: + """Retrieve virtual machines associated with a contract + + + :param contract_id: (required) + :type contract_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machines_associated_with_a_contract_serialize( + contract_id=contract_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ContractInstancesResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def retrieve_virtual_machines_associated_with_a_contract_with_http_info( + self, + contract_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ContractInstancesResponse]: + """Retrieve virtual machines associated with a contract + + + :param contract_id: (required) + :type contract_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machines_associated_with_a_contract_serialize( + contract_id=contract_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ContractInstancesResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def retrieve_virtual_machines_associated_with_a_contract_without_preload_content( + self, + contract_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Retrieve virtual machines associated with a contract + + + :param contract_id: (required) + :type contract_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._retrieve_virtual_machines_associated_with_a_contract_serialize( + contract_id=contract_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ContractInstancesResponse", + '400': "ErrorResponseModel", + '401': "ErrorResponseModel", + '500': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _retrieve_virtual_machines_associated_with_a_contract_serialize( + self, + contract_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if contract_id is not None: + _path_params['contract_id'] = contract_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'apiKey', + 'accessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/core/virtual-machines/contract/{contract_id}/virtual-machines', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3091,7 +3994,7 @@ def _retrieved_metrics_successfully_serialize( @validate_call - def start_instance( + def start_virtual_machine( self, id: StrictInt, _request_timeout: Union[ @@ -3107,8 +4010,9 @@ def start_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Start Instance + """Start virtual machine + Initiates the startup of a virtual machine. Supply the virtual machine ID in the path to initiate the starting of the specified virtual machine. :param id: (required) :type id: int @@ -3134,7 +4038,7 @@ def start_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._start_instance_serialize( + _param = self._start_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -3161,7 +4065,7 @@ def start_instance( @validate_call - def start_instance_with_http_info( + def start_virtual_machine_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -3177,8 +4081,9 @@ def start_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Start Instance + """Start virtual machine + Initiates the startup of a virtual machine. Supply the virtual machine ID in the path to initiate the starting of the specified virtual machine. :param id: (required) :type id: int @@ -3204,7 +4109,7 @@ def start_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._start_instance_serialize( + _param = self._start_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -3231,7 +4136,7 @@ def start_instance_with_http_info( @validate_call - def start_instance_without_preload_content( + def start_virtual_machine_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -3247,8 +4152,9 @@ def start_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Start Instance + """Start virtual machine + Initiates the startup of a virtual machine. Supply the virtual machine ID in the path to initiate the starting of the specified virtual machine. :param id: (required) :type id: int @@ -3274,7 +4180,7 @@ def start_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._start_instance_serialize( + _param = self._start_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -3296,7 +4202,7 @@ def start_instance_without_preload_content( return response_data.response - def _start_instance_serialize( + def _start_virtual_machine_serialize( self, id, _request_auth, @@ -3359,7 +4265,7 @@ def _start_instance_serialize( @validate_call - def stop_instance( + def stop_virtual_machine( self, id: StrictInt, _request_timeout: Union[ @@ -3375,8 +4281,9 @@ def stop_instance( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Stop Instance + """Stop virtual machine + Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine. :param id: (required) :type id: int @@ -3402,7 +4309,7 @@ def stop_instance( :return: Returns the result object. """ # noqa: E501 - _param = self._stop_instance_serialize( + _param = self._stop_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -3429,7 +4336,7 @@ def stop_instance( @validate_call - def stop_instance_with_http_info( + def stop_virtual_machine_with_http_info( self, id: StrictInt, _request_timeout: Union[ @@ -3445,8 +4352,9 @@ def stop_instance_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Stop Instance + """Stop virtual machine + Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine. :param id: (required) :type id: int @@ -3472,7 +4380,7 @@ def stop_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._stop_instance_serialize( + _param = self._stop_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -3499,7 +4407,7 @@ def stop_instance_with_http_info( @validate_call - def stop_instance_without_preload_content( + def stop_virtual_machine_without_preload_content( self, id: StrictInt, _request_timeout: Union[ @@ -3515,8 +4423,9 @@ def stop_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Stop Instance + """Stop virtual machine + Shuts down a virtual machine. Provide the virtual machine ID in the path to initiate the shutdown process for the specified virtual machine. :param id: (required) :type id: int @@ -3542,7 +4451,7 @@ def stop_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._stop_instance_serialize( + _param = self._stop_virtual_machine_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -3564,7 +4473,7 @@ def stop_instance_without_preload_content( return response_data.response - def _stop_instance_serialize( + def _stop_virtual_machine_serialize( self, id, _request_auth, diff --git a/hyperstack/api/virtual_machine_events_api.py b/hyperstack/api/virtual_machine_events_api.py index f7efadc..ab55205 100644 --- a/hyperstack/api/virtual_machine_events_api.py +++ b/hyperstack/api/virtual_machine_events_api.py @@ -38,7 +38,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def fetch_all_of_the_instance_events( + def list_virtual_machine_events( self, virtual_machine_id: StrictStr, _request_timeout: Union[ @@ -54,8 +54,9 @@ def fetch_all_of_the_instance_events( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> InstanceEvents: - """Fetch all of the instance events + """List virtual machine events + Retrieves a list of all events in a virtual machine's history, which records actions performed on the specified virtual machine. Include the virtual machine ID in the path to retrieve the history of events. For more details on virtual machine events history, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#events-history). :param virtual_machine_id: (required) :type virtual_machine_id: str @@ -81,7 +82,7 @@ def fetch_all_of_the_instance_events( :return: Returns the result object. """ # noqa: E501 - _param = self._fetch_all_of_the_instance_events_serialize( + _param = self._list_virtual_machine_events_serialize( virtual_machine_id=virtual_machine_id, _request_auth=_request_auth, _content_type=_content_type, @@ -108,7 +109,7 @@ def fetch_all_of_the_instance_events( @validate_call - def fetch_all_of_the_instance_events_with_http_info( + def list_virtual_machine_events_with_http_info( self, virtual_machine_id: StrictStr, _request_timeout: Union[ @@ -124,8 +125,9 @@ def fetch_all_of_the_instance_events_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[InstanceEvents]: - """Fetch all of the instance events + """List virtual machine events + Retrieves a list of all events in a virtual machine's history, which records actions performed on the specified virtual machine. Include the virtual machine ID in the path to retrieve the history of events. For more details on virtual machine events history, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#events-history). :param virtual_machine_id: (required) :type virtual_machine_id: str @@ -151,7 +153,7 @@ def fetch_all_of_the_instance_events_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._fetch_all_of_the_instance_events_serialize( + _param = self._list_virtual_machine_events_serialize( virtual_machine_id=virtual_machine_id, _request_auth=_request_auth, _content_type=_content_type, @@ -178,7 +180,7 @@ def fetch_all_of_the_instance_events_with_http_info( @validate_call - def fetch_all_of_the_instance_events_without_preload_content( + def list_virtual_machine_events_without_preload_content( self, virtual_machine_id: StrictStr, _request_timeout: Union[ @@ -194,8 +196,9 @@ def fetch_all_of_the_instance_events_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Fetch all of the instance events + """List virtual machine events + Retrieves a list of all events in a virtual machine's history, which records actions performed on the specified virtual machine. Include the virtual machine ID in the path to retrieve the history of events. For more details on virtual machine events history, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/vm-performance-metrics-and-events-history#events-history). :param virtual_machine_id: (required) :type virtual_machine_id: str @@ -221,7 +224,7 @@ def fetch_all_of_the_instance_events_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._fetch_all_of_the_instance_events_serialize( + _param = self._list_virtual_machine_events_serialize( virtual_machine_id=virtual_machine_id, _request_auth=_request_auth, _content_type=_content_type, @@ -243,7 +246,7 @@ def fetch_all_of_the_instance_events_without_preload_content( return response_data.response - def _fetch_all_of_the_instance_events_serialize( + def _list_virtual_machine_events_serialize( self, virtual_machine_id, _request_auth, diff --git a/hyperstack/api/volume_api.py b/hyperstack/api/volume_api.py index 4eeeff7..38c45b0 100644 --- a/hyperstack/api/volume_api.py +++ b/hyperstack/api/volume_api.py @@ -58,8 +58,9 @@ def create_volume( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Volume: - """Create Volume + """Create volume + Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). :param payload: (required) :type payload: CreateVolumePayload @@ -130,8 +131,9 @@ def create_volume_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Volume]: - """Create Volume + """Create volume + Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). :param payload: (required) :type payload: CreateVolumePayload @@ -202,8 +204,9 @@ def create_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create Volume + """Create volume + Creates a volume that can be attached to a virtual machine, expanding its storage capacity. Specify the volume type and custom configuration in the request body. For additional details on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). :param payload: (required) :type payload: CreateVolumePayload @@ -345,8 +348,9 @@ def delete_volume( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResponseModel: - """Delete Volume + """Delete volume + Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted. :param id: (required) :type id: int @@ -415,8 +419,9 @@ def delete_volume_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResponseModel]: - """Delete Volume + """Delete volume + Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted. :param id: (required) :type id: int @@ -485,8 +490,9 @@ def delete_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete Volume + """Delete volume + Deletes a volume permanently. Provide the volume ID in the path to specify the volume to be deleted. :param id: (required) :type id: int @@ -597,7 +603,7 @@ def _delete_volume_serialize( @validate_call - def get_volume_types( + def list_volume_types( self, _request_timeout: Union[ None, @@ -612,8 +618,9 @@ def get_volume_types( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> VolumeTypes: - """GET Volume Types + """List volume types + Retrieves a list of available volume types that can be used in the creation of a new volume. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -637,7 +644,7 @@ def get_volume_types( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_types_serialize( + _param = self._list_volume_types_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -662,7 +669,7 @@ def get_volume_types( @validate_call - def get_volume_types_with_http_info( + def list_volume_types_with_http_info( self, _request_timeout: Union[ None, @@ -677,8 +684,9 @@ def get_volume_types_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[VolumeTypes]: - """GET Volume Types + """List volume types + Retrieves a list of available volume types that can be used in the creation of a new volume. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -702,7 +710,7 @@ def get_volume_types_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_types_serialize( + _param = self._list_volume_types_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -727,7 +735,7 @@ def get_volume_types_with_http_info( @validate_call - def get_volume_types_without_preload_content( + def list_volume_types_without_preload_content( self, _request_timeout: Union[ None, @@ -742,8 +750,9 @@ def get_volume_types_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """GET Volume Types + """List volume types + Retrieves a list of available volume types that can be used in the creation of a new volume. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -767,7 +776,7 @@ def get_volume_types_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_types_serialize( + _param = self._list_volume_types_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -787,7 +796,7 @@ def get_volume_types_without_preload_content( return response_data.response - def _get_volume_types_serialize( + def _list_volume_types_serialize( self, _request_auth, _content_type, @@ -862,8 +871,9 @@ def list_volumes( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Volumes: - """List Volumes + """List volumes + Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -927,8 +937,9 @@ def list_volumes_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Volumes]: - """List Volumes + """List volumes + Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -992,8 +1003,9 @@ def list_volumes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List Volumes + """List volumes + Returns a list of your existing volumes, providing details for each. For more information on volumes, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features). :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/hyperstack/api/volume_attachment_api.py b/hyperstack/api/volume_attachment_api.py index aa85b74..2b01284 100644 --- a/hyperstack/api/volume_attachment_api.py +++ b/hyperstack/api/volume_attachment_api.py @@ -41,7 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def attach_volumes( + def attach_volumes_to_virtual_machine( self, virtual_machine_id: StrictInt, payload: AttachVolumesPayload, @@ -58,8 +58,9 @@ def attach_volumes( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> AttachVolumes: - """Attach Volumes + """Attach volumes to virtual machine + Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1). :param virtual_machine_id: (required) :type virtual_machine_id: int @@ -87,7 +88,7 @@ def attach_volumes( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_volumes_serialize( + _param = self._attach_volumes_to_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, payload=payload, _request_auth=_request_auth, @@ -116,7 +117,7 @@ def attach_volumes( @validate_call - def attach_volumes_with_http_info( + def attach_volumes_to_virtual_machine_with_http_info( self, virtual_machine_id: StrictInt, payload: AttachVolumesPayload, @@ -133,8 +134,9 @@ def attach_volumes_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[AttachVolumes]: - """Attach Volumes + """Attach volumes to virtual machine + Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1). :param virtual_machine_id: (required) :type virtual_machine_id: int @@ -162,7 +164,7 @@ def attach_volumes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_volumes_serialize( + _param = self._attach_volumes_to_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, payload=payload, _request_auth=_request_auth, @@ -191,7 +193,7 @@ def attach_volumes_with_http_info( @validate_call - def attach_volumes_without_preload_content( + def attach_volumes_to_virtual_machine_without_preload_content( self, virtual_machine_id: StrictInt, payload: AttachVolumesPayload, @@ -208,8 +210,9 @@ def attach_volumes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Attach Volumes + """Attach volumes to virtual machine + Attaches one or more volumes to an existing virtual machine, expanding its storage capacity by 2PB per attached volume. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volume attachment, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/volumes-available-features#attach-a-volume-to-a-virtual-machine-1). :param virtual_machine_id: (required) :type virtual_machine_id: int @@ -237,7 +240,7 @@ def attach_volumes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._attach_volumes_serialize( + _param = self._attach_volumes_to_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, payload=payload, _request_auth=_request_auth, @@ -261,7 +264,7 @@ def attach_volumes_without_preload_content( return response_data.response - def _attach_volumes_serialize( + def _attach_volumes_to_virtual_machine_serialize( self, virtual_machine_id, payload, @@ -340,7 +343,7 @@ def _attach_volumes_serialize( @validate_call - def detach_volumes( + def detach_volumes_from_virtual_machine( self, virtual_machine_id: StrictInt, payload: DetachVolumesPayload, @@ -357,8 +360,9 @@ def detach_volumes( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> DetachVolumes: - """Detach Volumes + """Detach volumes from virtual machine + Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine. :param virtual_machine_id: (required) :type virtual_machine_id: int @@ -386,7 +390,7 @@ def detach_volumes( :return: Returns the result object. """ # noqa: E501 - _param = self._detach_volumes_serialize( + _param = self._detach_volumes_from_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, payload=payload, _request_auth=_request_auth, @@ -415,7 +419,7 @@ def detach_volumes( @validate_call - def detach_volumes_with_http_info( + def detach_volumes_from_virtual_machine_with_http_info( self, virtual_machine_id: StrictInt, payload: DetachVolumesPayload, @@ -432,8 +436,9 @@ def detach_volumes_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[DetachVolumes]: - """Detach Volumes + """Detach volumes from virtual machine + Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine. :param virtual_machine_id: (required) :type virtual_machine_id: int @@ -461,7 +466,7 @@ def detach_volumes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._detach_volumes_serialize( + _param = self._detach_volumes_from_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, payload=payload, _request_auth=_request_auth, @@ -490,7 +495,7 @@ def detach_volumes_with_http_info( @validate_call - def detach_volumes_without_preload_content( + def detach_volumes_from_virtual_machine_without_preload_content( self, virtual_machine_id: StrictInt, payload: DetachVolumesPayload, @@ -507,8 +512,9 @@ def detach_volumes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Detach Volumes + """Detach volumes from virtual machine + Detaches one or more volumes currently attached to an existing virtual machine. Include the virtual machine ID in the path and the volume IDs in the request body to detach the specified volumes from the designated virtual machine. :param virtual_machine_id: (required) :type virtual_machine_id: int @@ -536,7 +542,7 @@ def detach_volumes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._detach_volumes_serialize( + _param = self._detach_volumes_from_virtual_machine_serialize( virtual_machine_id=virtual_machine_id, payload=payload, _request_auth=_request_auth, @@ -560,7 +566,7 @@ def detach_volumes_without_preload_content( return response_data.response - def _detach_volumes_serialize( + def _detach_volumes_from_virtual_machine_serialize( self, virtual_machine_id, payload, diff --git a/hyperstack/api_client.py b/hyperstack/api_client.py index 5e4d004..9e16b18 100644 --- a/hyperstack/api_client.py +++ b/hyperstack/api_client.py @@ -14,6 +14,7 @@ import datetime from dateutil.parser import parse +from enum import Enum import json import mimetypes import os @@ -86,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/3.0.1/python' + self.user_agent = 'OpenAPI-Generator/1.1.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -429,6 +430,8 @@ def __deserialize(self, data, klass): return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: return self.__deserialize_model(data, klass) @@ -499,7 +502,7 @@ def parameters_to_url_query(self, params, collection_formats): else: new_params.append((k, quote(str(v)))) - return "&".join(["=".join(item) for item in new_params]) + return "&".join(["=".join(map(str, item)) for item in new_params]) def files_parameters(self, files=None): """Builds form parameters. @@ -726,6 +729,24 @@ def __deserialize_datetime(self, string): ) ) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/hyperstack/configuration.py b/hyperstack/configuration.py index c955902..d81323c 100644 --- a/hyperstack/configuration.py +++ b/hyperstack/configuration.py @@ -408,7 +408,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0\n"\ - "SDK Package Version: 3.0.1".\ + "SDK Package Version: 1.1.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/hyperstack/models/__init__.py b/hyperstack/models/__init__.py index 03bce89..67ecca9 100644 --- a/hyperstack/models/__init__.py +++ b/hyperstack/models/__init__.py @@ -14,64 +14,139 @@ # import models into model package -from hyperstack.models.api_key import APIKey -from hyperstack.models.api_key_fields import APIKeyFields -from hyperstack.models.api_key_payload import APIKeyPayload -from hyperstack.models.api_keygeneration import APIKeygeneration +from hyperstack.models.add_update_flavor_organization_payload import AddUpdateFlavorOrganizationPayload +from hyperstack.models.add_user_info_success_response_model import AddUserInfoSuccessResponseModel +from hyperstack.models.admin_add_update_image_organization_payload import AdminAddUpdateImageOrganizationPayload +from hyperstack.models.admin_bootstrap_environment_payload import AdminBootstrapEnvironmentPayload +from hyperstack.models.admin_cluster_resource import AdminClusterResource +from hyperstack.models.admin_container_resource import AdminContainerResource +from hyperstack.models.admin_contract_event_fields import AdminContractEventFields +from hyperstack.models.admin_contract_fields import AdminContractFields +from hyperstack.models.admin_count_resources_organization import AdminCountResourcesOrganization +from hyperstack.models.admin_count_resources_organizations import AdminCountResourcesOrganizations +from hyperstack.models.admin_create_contract_response_model import AdminCreateContractResponseModel +from hyperstack.models.admin_envrionment_resources import AdminEnvrionmentResources +from hyperstack.models.admin_flavor_detail_fields import AdminFlavorDetailFields +from hyperstack.models.admin_flavor_detail_node_fields import AdminFlavorDetailNodeFields +from hyperstack.models.admin_flavor_resource import AdminFlavorResource +from hyperstack.models.admin_flavor_resources_list import AdminFlavorResourcesList +from hyperstack.models.admin_get_contract_detail_fields import AdminGetContractDetailFields +from hyperstack.models.admin_get_version_response import AdminGetVersionResponse +from hyperstack.models.admin_hibernation_restoration_payload_model import AdminHibernationRestorationPayloadModel +from hyperstack.models.admin_image_admin_fields import AdminImageAdminFields +from hyperstack.models.admin_image_admin_response import AdminImageAdminResponse +from hyperstack.models.admin_image_admin_response_image import AdminImageAdminResponseImage +from hyperstack.models.admin_image_list_admin_response import AdminImageListAdminResponse +from hyperstack.models.admin_instance_resources import AdminInstanceResources +from hyperstack.models.admin_node_resource import AdminNodeResource +from hyperstack.models.admin_organization_resource_list import AdminOrganizationResourceList +from hyperstack.models.admin_organization_resource_response import AdminOrganizationResourceResponse +from hyperstack.models.admin_organization_resources import AdminOrganizationResources +from hyperstack.models.admin_organization_response_model import AdminOrganizationResponseModel +from hyperstack.models.admin_organization_summary_fields import AdminOrganizationSummaryFields +from hyperstack.models.admin_organizations_response_model import AdminOrganizationsResponseModel +from hyperstack.models.admin_organizations_summary_response_model import AdminOrganizationsSummaryResponseModel +from hyperstack.models.admin_user_fields import AdminUserFields +from hyperstack.models.admin_user_response_model import AdminUserResponseModel +from hyperstack.models.admin_users_response_model import AdminUsersResponseModel +from hyperstack.models.admin_version_response_model import AdminVersionResponseModel +from hyperstack.models.admin_volume_resource import AdminVolumeResource from hyperstack.models.adminaddorganizationpayload import Adminaddorganizationpayload from hyperstack.models.admincreditpostpayload import Admincreditpostpayload +from hyperstack.models.adminpaymenthistoryfields import Adminpaymenthistoryfields +from hyperstack.models.adminpaymenthistoryresponse import Adminpaymenthistoryresponse from hyperstack.models.adminrechargehistoryfields import Adminrechargehistoryfields from hyperstack.models.adminrechargehistoryresponse import Adminrechargehistoryresponse from hyperstack.models.adminthresholdpostpayload import Adminthresholdpostpayload +from hyperstack.models.api_key_fields import ApiKeyFields from hyperstack.models.api_key_verify_fields import ApiKeyVerifyFields -from hyperstack.models.api_key_verify_response import ApiKeyVerifyResponse -from hyperstack.models.assign_rbac_role_payload import AssignRBACRolePayload +from hyperstack.models.assign_rbac_role_payload import AssignRbacRolePayload from hyperstack.models.attach_callback_payload import AttachCallbackPayload from hyperstack.models.attach_callback_response import AttachCallbackResponse +from hyperstack.models.attach_firewall_with_vm import AttachFirewallWithVM +from hyperstack.models.attach_firewalls_to_vm_payload import AttachFirewallsToVMPayload from hyperstack.models.attach_volume_fields import AttachVolumeFields from hyperstack.models.attach_volumes import AttachVolumes from hyperstack.models.attach_volumes_payload import AttachVolumesPayload +from hyperstack.models.auth_get_token_response_model import AuthGetTokenResponseModel +from hyperstack.models.auth_request_login_fields import AuthRequestLoginFields +from hyperstack.models.auth_request_login_response_model import AuthRequestLoginResponseModel +from hyperstack.models.auth_user_fields import AuthUserFields +from hyperstack.models.auth_user_info_response_model import AuthUserInfoResponseModel from hyperstack.models.billing_response import BillingResponse +from hyperstack.models.billingimmuneresources import Billingimmuneresources +from hyperstack.models.billingimmuneresourcesresponse import Billingimmuneresourcesresponse from hyperstack.models.billingmetricesfields import Billingmetricesfields from hyperstack.models.billingmetricesresponse import Billingmetricesresponse -from hyperstack.models.cluster_resource import ClusterResource +from hyperstack.models.common_response_model import CommonResponseModel from hyperstack.models.compliance_fields import ComplianceFields from hyperstack.models.compliance_model_fields import ComplianceModelFields from hyperstack.models.compliance_payload import CompliancePayload from hyperstack.models.compliance_response import ComplianceResponse from hyperstack.models.container_overview_fields import ContainerOverviewFields -from hyperstack.models.container_resource import ContainerResource +from hyperstack.models.contract_instance_fields import ContractInstanceFields +from hyperstack.models.contract_instances_response import ContractInstancesResponse +from hyperstack.models.create_contarct_fields import CreateContarctFields +from hyperstack.models.create_contract_payload import CreateContractPayload from hyperstack.models.create_discount_response import CreateDiscountResponse from hyperstack.models.create_discounts_payload import CreateDiscountsPayload from hyperstack.models.create_environment import CreateEnvironment +from hyperstack.models.create_firewall_payload import CreateFirewallPayload +from hyperstack.models.create_firewall_rule_payload import CreateFirewallRulePayload from hyperstack.models.create_gpu import CreateGPU from hyperstack.models.create_instances_payload import CreateInstancesPayload from hyperstack.models.create_profile_payload import CreateProfilePayload from hyperstack.models.create_profile_response import CreateProfileResponse from hyperstack.models.create_security_rule_payload import CreateSecurityRulePayload from hyperstack.models.create_update_compliance_response import CreateUpdateComplianceResponse +from hyperstack.models.create_update_permission_payload import CreateUpdatePermissionPayload +from hyperstack.models.create_update_permission_response_model import CreateUpdatePermissionResponseModel +from hyperstack.models.create_update_policy_payload import CreateUpdatePolicyPayload +from hyperstack.models.create_update_policy_response_model import CreateUpdatePolicyResponseModel +from hyperstack.models.create_update_rbac_role_payload import CreateUpdateRbacRolePayload from hyperstack.models.create_volume_payload import CreateVolumePayload +from hyperstack.models.customer_contract_detail_response_model import CustomerContractDetailResponseModel +from hyperstack.models.customer_contract_fields import CustomerContractFields +from hyperstack.models.customer_fields import CustomerFields +from hyperstack.models.customer_payload import CustomerPayload from hyperstack.models.dashboard_info_response import DashboardInfoResponse from hyperstack.models.deployment_fields import DeploymentFields from hyperstack.models.deployment_fieldsforstartdeployments import DeploymentFieldsforstartdeployments from hyperstack.models.deployments import Deployments from hyperstack.models.detach_volumes import DetachVolumes from hyperstack.models.detach_volumes_payload import DetachVolumesPayload -from hyperstack.models.discount_detail_response import DiscountDetailResponse +from hyperstack.models.discount_entity_model import DiscountEntityModel +from hyperstack.models.discount_fields import DiscountFields +from hyperstack.models.discount_plan_fields import DiscountPlanFields from hyperstack.models.discount_resource_fields import DiscountResourceFields +from hyperstack.models.editlabelofanexisting_vm_payload import EditlabelofanexistingVMPayload from hyperstack.models.environment import Environment from hyperstack.models.environment_fields import EnvironmentFields from hyperstack.models.environment_fieldsfor_volume import EnvironmentFieldsforVolume from hyperstack.models.environments import Environments -from hyperstack.models.envrionment_resources import EnvrionmentResources from hyperstack.models.error_response_model import ErrorResponseModel +from hyperstack.models.excludebillingpostpayload import Excludebillingpostpayload +from hyperstack.models.excludebillingpostresponse import Excludebillingpostresponse +from hyperstack.models.firewall_attachment_model import FirewallAttachmentModel +from hyperstack.models.firewall_attachment_vm_model import FirewallAttachmentVMModel +from hyperstack.models.firewall_detail_fields import FirewallDetailFields +from hyperstack.models.firewall_detail_response import FirewallDetailResponse +from hyperstack.models.firewall_environment_fields import FirewallEnvironmentFields +from hyperstack.models.firewall_fields import FirewallFields +from hyperstack.models.firewall_response import FirewallResponse +from hyperstack.models.firewall_rule import FirewallRule +from hyperstack.models.firewalls_list_response import FirewallsListResponse +from hyperstack.models.flavor_admin_response import FlavorAdminResponse +from hyperstack.models.flavor_admin_response_flavors import FlavorAdminResponseFlavors +from hyperstack.models.flavor_detail_response import FlavorDetailResponse from hyperstack.models.flavor_fields import FlavorFields from hyperstack.models.flavor_item_get_response import FlavorItemGetResponse from hyperstack.models.flavor_list_response import FlavorListResponse from hyperstack.models.flavor_object_fields import FlavorObjectFields from hyperstack.models.flavor_payload import FlavorPayload -from hyperstack.models.flavor_resource import FlavorResource from hyperstack.models.flavor_response import FlavorResponse +from hyperstack.models.flavor_vm_fields import FlavorVMFields +from hyperstack.models.flavor_vms_response import FlavorVMsResponse from hyperstack.models.future_node_model import FutureNodeModel from hyperstack.models.future_node_response_model import FutureNodeResponseModel from hyperstack.models.future_node_stock_model import FutureNodeStockModel @@ -81,9 +156,25 @@ from hyperstack.models.gpu_fields import GPUFields from hyperstack.models.gpu_list import GPUList from hyperstack.models.gpu_region_fields import GPURegionFields +from hyperstack.models.generate_api_key_response_model import GenerateApiKeyResponseModel from hyperstack.models.get_all_discount_for_all_organization_response import GetAllDiscountForAllOrganizationResponse -from hyperstack.models.get_token import GetToken -from hyperstack.models.get_token_response import GetTokenResponse +from hyperstack.models.get_all_discounts_fields import GetAllDiscountsFields +from hyperstack.models.get_api_key_response_model import GetApiKeyResponseModel +from hyperstack.models.get_contract_detail_response_model import GetContractDetailResponseModel +from hyperstack.models.get_contract_events_response_model import GetContractEventsResponseModel +from hyperstack.models.get_contracts_list_response_model import GetContractsListResponseModel +from hyperstack.models.get_customer_contracts_list_response_model import GetCustomerContractsListResponseModel +from hyperstack.models.get_discount_detail_response import GetDiscountDetailResponse +from hyperstack.models.get_discount_response import GetDiscountResponse +from hyperstack.models.get_entity_discount_detail_response import GetEntityDiscountDetailResponse +from hyperstack.models.get_invites_response_model import GetInvitesResponseModel +from hyperstack.models.get_organization_response_model import GetOrganizationResponseModel +from hyperstack.models.get_permissions_response_model import GetPermissionsResponseModel +from hyperstack.models.get_policies_response_model import GetPoliciesResponseModel +from hyperstack.models.get_rbac_roles_response_model import GetRbacRolesResponseModel +from hyperstack.models.get_token_payload import GetTokenPayload +from hyperstack.models.get_user_permissions_response_model import GetUserPermissionsResponseModel +from hyperstack.models.get_version_response import GetVersionResponse from hyperstack.models.getcreditandthresholdinfo import Getcreditandthresholdinfo from hyperstack.models.getcreditandthresholdinfoinresponse import Getcreditandthresholdinfoinresponse from hyperstack.models.image_fields import ImageFields @@ -95,17 +186,21 @@ from hyperstack.models.infrahub_resource_object_response import InfrahubResourceObjectResponse from hyperstack.models.insert_discount_plan_fields import InsertDiscountPlanFields from hyperstack.models.instance import Instance +from hyperstack.models.instance_admin import InstanceAdmin from hyperstack.models.instance_admin_fields import InstanceAdminFields from hyperstack.models.instance_environment_fields import InstanceEnvironmentFields from hyperstack.models.instance_events import InstanceEvents from hyperstack.models.instance_events_fields import InstanceEventsFields +from hyperstack.models.instance_fields import InstanceFields from hyperstack.models.instance_flavor_fields import InstanceFlavorFields from hyperstack.models.instance_image_fields import InstanceImageFields from hyperstack.models.instance_keypair_fields import InstanceKeypairFields from hyperstack.models.instance_overview_fields import InstanceOverviewFields from hyperstack.models.instance_resize_payload import InstanceResizePayload -from hyperstack.models.instance_resources import InstanceResources from hyperstack.models.instances import Instances +from hyperstack.models.instances_admin import InstancesAdmin +from hyperstack.models.instances_summary_admin import InstancesSummaryAdmin +from hyperstack.models.instances_summary_fields import InstancesSummaryFields from hyperstack.models.internal_environment_fields import InternalEnvironmentFields from hyperstack.models.internal_instance_fields import InternalInstanceFields from hyperstack.models.internal_instance_flavor_fields import InternalInstanceFlavorFields @@ -116,16 +211,18 @@ from hyperstack.models.internal_volume_attachment_fields import InternalVolumeAttachmentFields from hyperstack.models.internal_volume_fields import InternalVolumeFields from hyperstack.models.internal_volumes_response import InternalVolumesResponse -from hyperstack.models.invite import Invite from hyperstack.models.invite_fields import InviteFields -from hyperstack.models.invite_user import InviteUser -from hyperstack.models.invites import Invites +from hyperstack.models.invite_user_payload import InviteUserPayload +from hyperstack.models.invite_user_response_model import InviteUserResponseModel from hyperstack.models.keypair_fields import KeypairFields from hyperstack.models.keypairs import Keypairs +from hyperstack.models.lable_resonse import LableResonse from hyperstack.models.lastdaycostfields import Lastdaycostfields from hyperstack.models.lastdaycostresponse import Lastdaycostresponse from hyperstack.models.logo_get_response import LogoGetResponse -from hyperstack.models.logout import Logout +from hyperstack.models.logout_payload import LogoutPayload +from hyperstack.models.metric_item_fields import MetricItemFields +from hyperstack.models.metrics_fields import MetricsFields from hyperstack.models.new_configurations_response import NewConfigurationsResponse from hyperstack.models.new_model_response import NewModelResponse from hyperstack.models.new_stock_response import NewStockResponse @@ -138,15 +235,9 @@ from hyperstack.models.node_stock_payload_model import NodeStockPayloadModel from hyperstack.models.node_stock_response_model import NodeStockResponseModel from hyperstack.models.node_stocks_payload import NodeStocksPayload -from hyperstack.models.organization_info_model import OrganizationInfoModel -from hyperstack.models.organization_model import OrganizationModel +from hyperstack.models.organization_fields import OrganizationFields from hyperstack.models.organization_object_response import OrganizationObjectResponse -from hyperstack.models.organization_resource_list import OrganizationResourceList -from hyperstack.models.organization_resource_response import OrganizationResourceResponse -from hyperstack.models.organization_resources import OrganizationResources -from hyperstack.models.organization_response_model import OrganizationResponseModel -from hyperstack.models.organization_user_model import OrganizationUserModel -from hyperstack.models.organizations_response_model import OrganizationsResponseModel +from hyperstack.models.organization_user_response_model import OrganizationUserResponseModel from hyperstack.models.overview_info import OverviewInfo from hyperstack.models.payment_details_fields import PaymentDetailsFields from hyperstack.models.payment_details_response import PaymentDetailsResponse @@ -154,37 +245,25 @@ from hyperstack.models.payment_initiate_payload import PaymentInitiatePayload from hyperstack.models.payment_initiate_response import PaymentInitiateResponse from hyperstack.models.permission_fields import PermissionFields -from hyperstack.models.permission_fieldsfor_user_permission import PermissionFieldsforUserPermission -from hyperstack.models.permission_payload import PermissionPayload -from hyperstack.models.permission_response import PermissionResponse -from hyperstack.models.permissions import Permissions -from hyperstack.models.permissionsfor_user_permission import PermissionsforUserPermission -from hyperstack.models.policies import Policies from hyperstack.models.policy_fields import PolicyFields -from hyperstack.models.policy_payload import PolicyPayload from hyperstack.models.policy_permission_fields import PolicyPermissionFields -from hyperstack.models.policy_response import PolicyResponse from hyperstack.models.power_usage_model import PowerUsageModel from hyperstack.models.pricebook_model import PricebookModel from hyperstack.models.pricebook_resource_object_response import PricebookResourceObjectResponse from hyperstack.models.profile_fields import ProfileFields from hyperstack.models.profile_list_response import ProfileListResponse from hyperstack.models.profile_object_fields import ProfileObjectFields -from hyperstack.models.rbac_role import RBACRole -from hyperstack.models.rbac_role_fieldfor_organization import RBACRoleFieldforOrganization -from hyperstack.models.rbac_role_fields import RBACRoleFields -from hyperstack.models.rbac_role_payload import RBACRolePayload -from hyperstack.models.rbac_roles import RBACRoles -from hyperstack.models.refresh_token import RefreshToken +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel +from hyperstack.models.rbac_role_field import RbacRoleField +from hyperstack.models.rbac_role_fields import RbacRoleFields +from hyperstack.models.refresh_token_payload import RefreshTokenPayload from hyperstack.models.region_fields import RegionFields from hyperstack.models.region_payload import RegionPayload from hyperstack.models.region_response import RegionResponse from hyperstack.models.regions import Regions -from hyperstack.models.remove_member_response import RemoveMemberResponse -from hyperstack.models.removemember import Removemember +from hyperstack.models.remove_member_from_organization_response_model import RemoveMemberFromOrganizationResponseModel +from hyperstack.models.remove_member_payload import RemoveMemberPayload from hyperstack.models.request_console import RequestConsole -from hyperstack.models.request_login_data_response import RequestLoginDataResponse -from hyperstack.models.request_login_response import RequestLoginResponse from hyperstack.models.resource_payload import ResourcePayload from hyperstack.models.response_model import ResponseModel from hyperstack.models.role_permission_fields import RolePermissionFields @@ -193,6 +272,7 @@ from hyperstack.models.security_group_rule_fields import SecurityGroupRuleFields from hyperstack.models.security_rules_fieldsfor_instance import SecurityRulesFieldsforInstance from hyperstack.models.security_rules_protocol_fields import SecurityRulesProtocolFields +from hyperstack.models.set_defaults_payload import SetDefaultsPayload from hyperstack.models.single_visibility_user_response import SingleVisibilityUserResponse from hyperstack.models.start_deployment import StartDeployment from hyperstack.models.start_deployment_payload import StartDeploymentPayload @@ -203,22 +283,33 @@ from hyperstack.models.template_fields import TemplateFields from hyperstack.models.templates import Templates from hyperstack.models.token_fields import TokenFields +from hyperstack.models.update_contract_payload import UpdateContractPayload from hyperstack.models.update_discounts_payload import UpdateDiscountsPayload from hyperstack.models.update_discounts_status_payload import UpdateDiscountsStatusPayload from hyperstack.models.update_environment import UpdateEnvironment from hyperstack.models.update_gpu import UpdateGPU from hyperstack.models.update_keypair_name import UpdateKeypairName from hyperstack.models.update_keypairnameresponse import UpdateKeypairnameresponse +from hyperstack.models.update_organization_payload import UpdateOrganizationPayload +from hyperstack.models.update_organization_response_model import UpdateOrganizationResponseModel from hyperstack.models.update_template import UpdateTemplate -from hyperstack.models.user_fields import UserFields -from hyperstack.models.user_info_response import UserInfoResponse +from hyperstack.models.user_default_choice_for_admin_fields import UserDefaultChoiceForAdminFields +from hyperstack.models.user_default_choice_for_user_fields import UserDefaultChoiceForUserFields +from hyperstack.models.user_default_choices_for_admin_response import UserDefaultChoicesForAdminResponse +from hyperstack.models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse +from hyperstack.models.user_permission_fields import UserPermissionFields +from hyperstack.models.user_transfer_payload import UserTransferPayload +from hyperstack.models.userinfopostpayload import Userinfopostpayload +from hyperstack.models.users_info_fields import UsersInfoFields +from hyperstack.models.users_info_list_response import UsersInfoListResponse from hyperstack.models.vncurl import VNCURL from hyperstack.models.vncurl_fields import VNCURLFields +from hyperstack.models.verify_api_key_payload import VerifyApiKeyPayload +from hyperstack.models.verify_api_key_response_model import VerifyApiKeyResponseModel from hyperstack.models.volume import Volume from hyperstack.models.volume_attachment_fields import VolumeAttachmentFields from hyperstack.models.volume_fields import VolumeFields from hyperstack.models.volume_fieldsfor_instance import VolumeFieldsforInstance from hyperstack.models.volume_overview_fields import VolumeOverviewFields -from hyperstack.models.volume_resource import VolumeResource from hyperstack.models.volume_types import VolumeTypes from hyperstack.models.volumes import Volumes diff --git a/hyperstack/models/add_update_flavor_organization_payload.py b/hyperstack/models/add_update_flavor_organization_payload.py new file mode 100644 index 0000000..35704f0 --- /dev/null +++ b/hyperstack/models/add_update_flavor_organization_payload.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AddUpdateFlavorOrganizationPayload(BaseModel): + """ + AddUpdateFlavorOrganizationPayload + """ # noqa: E501 + name: StrictStr + description: Optional[StrictStr] = None + openstack_id: StrictStr + region_id: StrictInt + cpu: StrictInt + ram: Union[StrictFloat, StrictInt] + disk: StrictInt + ephemeral: Optional[StrictInt] = None + gpu_id: StrictInt + gpu_count: StrictInt + is_public: StrictBool + organizations: List[StrictInt] + __properties: ClassVar[List[str]] = ["name", "description", "openstack_id", "region_id", "cpu", "ram", "disk", "ephemeral", "gpu_id", "gpu_count", "is_public", "organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddUpdateFlavorOrganizationPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddUpdateFlavorOrganizationPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "openstack_id": obj.get("openstack_id"), + "region_id": obj.get("region_id"), + "cpu": obj.get("cpu"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "ephemeral": obj.get("ephemeral"), + "gpu_id": obj.get("gpu_id"), + "gpu_count": obj.get("gpu_count"), + "is_public": obj.get("is_public"), + "organizations": obj.get("organizations") + }) + return _obj + + diff --git a/hyperstack/models/request_login_response.py b/hyperstack/models/add_user_info_success_response_model.py similarity index 78% rename from hyperstack/models/request_login_response.py rename to hyperstack/models/add_user_info_success_response_model.py index 70de1c8..94a8b9b 100644 --- a/hyperstack/models/request_login_response.py +++ b/hyperstack/models/add_user_info_success_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.request_login_data_response import RequestLoginDataResponse +from hyperstack.models.users_info_fields import UsersInfoFields from typing import Optional, Set from typing_extensions import Self -class RequestLoginResponse(BaseModel): +class AddUserInfoSuccessResponseModel(BaseModel): """ - RequestLoginResponse + AddUserInfoSuccessResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - data: Optional[RequestLoginDataResponse] = None + data: Optional[UsersInfoFields] = None __properties: ClassVar[List[str]] = ["status", "message", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RequestLoginResponse from a JSON string""" + """Create an instance of AddUserInfoSuccessResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RequestLoginResponse from a dict""" + """Create an instance of AddUserInfoSuccessResponseModel from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "data": RequestLoginDataResponse.from_dict(obj["data"]) if obj.get("data") is not None else None + "data": UsersInfoFields.from_dict(obj["data"]) if obj.get("data") is not None else None }) return _obj diff --git a/hyperstack/models/admin_add_update_image_organization_payload.py b/hyperstack/models/admin_add_update_image_organization_payload.py new file mode 100644 index 0000000..196a97a --- /dev/null +++ b/hyperstack/models/admin_add_update_image_organization_payload.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminAddUpdateImageOrganizationPayload(BaseModel): + """ + AdminAddUpdateImageOrganizationPayload + """ # noqa: E501 + name: StrictStr + openstack_id: StrictStr + region_id: StrictInt + type: StrictStr + version: StrictStr + size: StrictInt + is_public: StrictBool + description: Optional[StrictStr] = None + labels: Optional[List[StrictStr]] = None + organizations: List[StrictInt] + __properties: ClassVar[List[str]] = ["name", "openstack_id", "region_id", "type", "version", "size", "is_public", "description", "labels", "organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminAddUpdateImageOrganizationPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminAddUpdateImageOrganizationPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "openstack_id": obj.get("openstack_id"), + "region_id": obj.get("region_id"), + "type": obj.get("type"), + "version": obj.get("version"), + "size": obj.get("size"), + "is_public": obj.get("is_public"), + "description": obj.get("description"), + "labels": obj.get("labels"), + "organizations": obj.get("organizations") + }) + return _obj + + diff --git a/hyperstack/models/admin_bootstrap_environment_payload.py b/hyperstack/models/admin_bootstrap_environment_payload.py new file mode 100644 index 0000000..9b010a6 --- /dev/null +++ b/hyperstack/models/admin_bootstrap_environment_payload.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AdminBootstrapEnvironmentPayload(BaseModel): + """ + AdminBootstrapEnvironmentPayload + """ # noqa: E501 + org_id: StrictInt + __properties: ClassVar[List[str]] = ["org_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminBootstrapEnvironmentPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminBootstrapEnvironmentPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "org_id": obj.get("org_id") + }) + return _obj + + diff --git a/hyperstack/models/cluster_resource.py b/hyperstack/models/admin_cluster_resource.py similarity index 82% rename from hyperstack/models/cluster_resource.py rename to hyperstack/models/admin_cluster_resource.py index ffb3262..65a7f8f 100644 --- a/hyperstack/models/cluster_resource.py +++ b/hyperstack/models/admin_cluster_resource.py @@ -18,15 +18,15 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.flavor_resource import FlavorResource +from hyperstack.models.admin_flavor_resource import AdminFlavorResource from typing import Optional, Set from typing_extensions import Self -class ClusterResource(BaseModel): +class AdminClusterResource(BaseModel): """ - ClusterResource + AdminClusterResource """ # noqa: E501 id: Optional[StrictInt] = None name: Optional[StrictStr] = None @@ -34,16 +34,16 @@ class ClusterResource(BaseModel): status: Optional[StrictStr] = None master_count: Optional[StrictInt] = None node_count: Optional[StrictInt] = None - node_flavor: Optional[FlavorResource] = None + node_flavor: Optional[AdminFlavorResource] = None enable_public_ip: Optional[StrictBool] = None created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "kubernetes_version", "status", "master_count", "node_count", "node_flavor", "enable_public_ip", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +57,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClusterResource from a JSON string""" + """Create an instance of AdminClusterResource from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -85,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClusterResource from a dict""" + """Create an instance of AdminClusterResource from a dict""" if obj is None: return None @@ -99,7 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "master_count": obj.get("master_count"), "node_count": obj.get("node_count"), - "node_flavor": FlavorResource.from_dict(obj["node_flavor"]) if obj.get("node_flavor") is not None else None, + "node_flavor": AdminFlavorResource.from_dict(obj["node_flavor"]) if obj.get("node_flavor") is not None else None, "enable_public_ip": obj.get("enable_public_ip"), "created_at": obj.get("created_at") }) diff --git a/hyperstack/models/container_resource.py b/hyperstack/models/admin_container_resource.py similarity index 81% rename from hyperstack/models/container_resource.py rename to hyperstack/models/admin_container_resource.py index 5424d5c..0ee5070 100644 --- a/hyperstack/models/container_resource.py +++ b/hyperstack/models/admin_container_resource.py @@ -18,19 +18,19 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.flavor_resource import FlavorResource +from hyperstack.models.admin_flavor_resource import AdminFlavorResource from typing import Optional, Set from typing_extensions import Self -class ContainerResource(BaseModel): +class AdminContainerResource(BaseModel): """ - ContainerResource + AdminContainerResource """ # noqa: E501 id: Optional[StrictInt] = None name: Optional[StrictStr] = None - flavor: Optional[FlavorResource] = None + flavor: Optional[AdminFlavorResource] = None status: Optional[StrictStr] = None image: Optional[StrictStr] = None fixed_ip: Optional[StrictStr] = None @@ -38,11 +38,11 @@ class ContainerResource(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "flavor", "status", "image", "fixed_ip", "floating_ip", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +56,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ContainerResource from a JSON string""" + """Create an instance of AdminContainerResource from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ContainerResource from a dict""" + """Create an instance of AdminContainerResource from a dict""" if obj is None: return None @@ -94,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), - "flavor": FlavorResource.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None, + "flavor": AdminFlavorResource.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None, "status": obj.get("status"), "image": obj.get("image"), "fixed_ip": obj.get("fixed_ip"), diff --git a/hyperstack/models/admin_contract_event_fields.py b/hyperstack/models/admin_contract_event_fields.py new file mode 100644 index 0000000..92e100c --- /dev/null +++ b/hyperstack/models/admin_contract_event_fields.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminContractEventFields(BaseModel): + """ + AdminContractEventFields + """ # noqa: E501 + id: Optional[StrictInt] = None + user_id: Optional[StrictInt] = None + org_id: Optional[StrictInt] = None + time: Optional[datetime] = None + type: Optional[StrictStr] = None + reason: Optional[StrictStr] = None + message: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "user_id", "org_id", "time", "type", "reason", "message", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminContractEventFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminContractEventFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "org_id": obj.get("org_id"), + "time": obj.get("time"), + "type": obj.get("type"), + "reason": obj.get("reason"), + "message": obj.get("message"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/admin_contract_fields.py b/hyperstack/models/admin_contract_fields.py new file mode 100644 index 0000000..e4847d7 --- /dev/null +++ b/hyperstack/models/admin_contract_fields.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class AdminContractFields(BaseModel): + """ + AdminContractFields + """ # noqa: E501 + id: Optional[StrictInt] = None + org_name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + start_date: Optional[datetime] = None + end_date: Optional[datetime] = None + expiration_policy: Optional[StrictInt] = None + status: Optional[StrictStr] = None + gpu_name: Optional[StrictStr] = None + percent: Optional[Union[StrictFloat, StrictInt]] = None + amount: Optional[Union[StrictFloat, StrictInt]] = None + discount_type: Optional[StrictStr] = None + resource_count: Optional[StrictInt] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "org_name", "description", "start_date", "end_date", "expiration_policy", "status", "gpu_name", "percent", "amount", "discount_type", "resource_count", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminContractFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminContractFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "org_name": obj.get("org_name"), + "description": obj.get("description"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "expiration_policy": obj.get("expiration_policy"), + "status": obj.get("status"), + "gpu_name": obj.get("gpu_name"), + "percent": obj.get("percent"), + "amount": obj.get("amount"), + "discount_type": obj.get("discount_type"), + "resource_count": obj.get("resource_count"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/admin_count_resources_organization.py b/hyperstack/models/admin_count_resources_organization.py new file mode 100644 index 0000000..17c6e18 --- /dev/null +++ b/hyperstack/models/admin_count_resources_organization.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminCountResourcesOrganization(BaseModel): + """ + AdminCountResourcesOrganization + """ # noqa: E501 + organization_id: Optional[StrictInt] = None + total_instances: Optional[StrictInt] = None + total_volumes: Optional[StrictInt] = None + total_containers: Optional[StrictInt] = None + total_clusters: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["organization_id", "total_instances", "total_volumes", "total_containers", "total_clusters"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminCountResourcesOrganization from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminCountResourcesOrganization from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "total_instances": obj.get("total_instances"), + "total_volumes": obj.get("total_volumes"), + "total_containers": obj.get("total_containers"), + "total_clusters": obj.get("total_clusters") + }) + return _obj + + diff --git a/hyperstack/models/admin_count_resources_organizations.py b/hyperstack/models/admin_count_resources_organizations.py new file mode 100644 index 0000000..c6a6ba9 --- /dev/null +++ b/hyperstack/models/admin_count_resources_organizations.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_count_resources_organization import AdminCountResourcesOrganization +from typing import Optional, Set +from typing_extensions import Self + +class AdminCountResourcesOrganizations(BaseModel): + """ + AdminCountResourcesOrganizations + """ # noqa: E501 + resources: Optional[List[AdminCountResourcesOrganization]] = None + __properties: ClassVar[List[str]] = ["resources"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminCountResourcesOrganizations from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in resources (list) + _items = [] + if self.resources: + for _item in self.resources: + if _item: + _items.append(_item.to_dict()) + _dict['resources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminCountResourcesOrganizations from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resources": [AdminCountResourcesOrganization.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/admin_create_contract_response_model.py b/hyperstack/models/admin_create_contract_response_model.py new file mode 100644 index 0000000..188d7fa --- /dev/null +++ b/hyperstack/models/admin_create_contract_response_model.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.create_contarct_fields import CreateContarctFields +from typing import Optional, Set +from typing_extensions import Self + +class AdminCreateContractResponseModel(BaseModel): + """ + AdminCreateContractResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + contract: Optional[CreateContarctFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "contract"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminCreateContractResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of contract + if self.contract: + _dict['contract'] = self.contract.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminCreateContractResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "contract": CreateContarctFields.from_dict(obj["contract"]) if obj.get("contract") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/envrionment_resources.py b/hyperstack/models/admin_envrionment_resources.py similarity index 71% rename from hyperstack/models/envrionment_resources.py rename to hyperstack/models/admin_envrionment_resources.py index 39c5a0a..afb7062 100644 --- a/hyperstack/models/envrionment_resources.py +++ b/hyperstack/models/admin_envrionment_resources.py @@ -18,34 +18,34 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.cluster_resource import ClusterResource -from hyperstack.models.container_resource import ContainerResource -from hyperstack.models.instance_resources import InstanceResources -from hyperstack.models.volume_resource import VolumeResource +from hyperstack.models.admin_cluster_resource import AdminClusterResource +from hyperstack.models.admin_container_resource import AdminContainerResource +from hyperstack.models.admin_instance_resources import AdminInstanceResources +from hyperstack.models.admin_volume_resource import AdminVolumeResource from typing import Optional, Set from typing_extensions import Self -class EnvrionmentResources(BaseModel): +class AdminEnvrionmentResources(BaseModel): """ - EnvrionmentResources + AdminEnvrionmentResources """ # noqa: E501 id: Optional[StrictInt] = None name: Optional[StrictStr] = None region: Optional[StrictStr] = None - instances: Optional[List[InstanceResources]] = None - volumes: Optional[List[VolumeResource]] = None - containers: Optional[List[ContainerResource]] = None - clusters: Optional[List[ClusterResource]] = None + instances: Optional[List[AdminInstanceResources]] = None + volumes: Optional[List[AdminVolumeResource]] = None + containers: Optional[List[AdminContainerResource]] = None + clusters: Optional[List[AdminClusterResource]] = None created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "region", "instances", "volumes", "containers", "clusters", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EnvrionmentResources from a JSON string""" + """Create an instance of AdminEnvrionmentResources from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -112,7 +112,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EnvrionmentResources from a dict""" + """Create an instance of AdminEnvrionmentResources from a dict""" if obj is None: return None @@ -123,10 +123,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "name": obj.get("name"), "region": obj.get("region"), - "instances": [InstanceResources.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, - "volumes": [VolumeResource.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, - "containers": [ContainerResource.from_dict(_item) for _item in obj["containers"]] if obj.get("containers") is not None else None, - "clusters": [ClusterResource.from_dict(_item) for _item in obj["clusters"]] if obj.get("clusters") is not None else None, + "instances": [AdminInstanceResources.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "volumes": [AdminVolumeResource.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "containers": [AdminContainerResource.from_dict(_item) for _item in obj["containers"]] if obj.get("containers") is not None else None, + "clusters": [AdminClusterResource.from_dict(_item) for _item in obj["clusters"]] if obj.get("clusters") is not None else None, "created_at": obj.get("created_at") }) return _obj diff --git a/hyperstack/models/admin_flavor_detail_fields.py b/hyperstack/models/admin_flavor_detail_fields.py new file mode 100644 index 0000000..b161307 --- /dev/null +++ b/hyperstack/models/admin_flavor_detail_fields.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from hyperstack.models.admin_flavor_detail_node_fields import AdminFlavorDetailNodeFields +from typing import Optional, Set +from typing_extensions import Self + +class AdminFlavorDetailFields(BaseModel): + """ + AdminFlavorDetailFields + """ # noqa: E501 + id: Optional[StrictInt] = None + openstack_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + region_name: Optional[StrictStr] = None + cpu: Optional[StrictInt] = None + ram: Optional[Union[StrictFloat, StrictInt]] = None + disk: Optional[StrictInt] = None + gpu: Optional[StrictStr] = None + status: Optional[StrictStr] = None + gpu_count: Optional[StrictInt] = None + stock_available: Optional[StrictBool] = None + nodes: Optional[List[AdminFlavorDetailNodeFields]] = None + vms: Optional[List[StrictInt]] = None + is_public: Optional[StrictBool] = None + is_custom: Optional[StrictBool] = None + org_ids: Optional[List[StrictInt]] = None + ephemeral: Optional[StrictInt] = None + description: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "openstack_id", "name", "region_name", "cpu", "ram", "disk", "gpu", "status", "gpu_count", "stock_available", "nodes", "vms", "is_public", "is_custom", "org_ids", "ephemeral", "description", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminFlavorDetailFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in nodes (list) + _items = [] + if self.nodes: + for _item in self.nodes: + if _item: + _items.append(_item.to_dict()) + _dict['nodes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminFlavorDetailFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "openstack_id": obj.get("openstack_id"), + "name": obj.get("name"), + "region_name": obj.get("region_name"), + "cpu": obj.get("cpu"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "gpu": obj.get("gpu"), + "status": obj.get("status"), + "gpu_count": obj.get("gpu_count"), + "stock_available": obj.get("stock_available"), + "nodes": [AdminFlavorDetailNodeFields.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None, + "vms": obj.get("vms"), + "is_public": obj.get("is_public"), + "is_custom": obj.get("is_custom"), + "org_ids": obj.get("org_ids"), + "ephemeral": obj.get("ephemeral"), + "description": obj.get("description"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/admin_flavor_detail_node_fields.py b/hyperstack/models/admin_flavor_detail_node_fields.py new file mode 100644 index 0000000..900e4b3 --- /dev/null +++ b/hyperstack/models/admin_flavor_detail_node_fields.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminFlavorDetailNodeFields(BaseModel): + """ + AdminFlavorDetailNodeFields + """ # noqa: E501 + id: Optional[StrictInt] = None + openstack_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + available: Optional[StrictInt] = None + status: Optional[StrictStr] = None + provision_date: Optional[datetime] = None + projects: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["id", "openstack_id", "name", "available", "status", "provision_date", "projects"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminFlavorDetailNodeFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminFlavorDetailNodeFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "openstack_id": obj.get("openstack_id"), + "name": obj.get("name"), + "available": obj.get("available"), + "status": obj.get("status"), + "provision_date": obj.get("provision_date"), + "projects": obj.get("projects") + }) + return _obj + + diff --git a/hyperstack/models/admin_flavor_resource.py b/hyperstack/models/admin_flavor_resource.py new file mode 100644 index 0000000..f1a65cb --- /dev/null +++ b/hyperstack/models/admin_flavor_resource.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from hyperstack.models.admin_node_resource import AdminNodeResource +from typing import Optional, Set +from typing_extensions import Self + +class AdminFlavorResource(BaseModel): + """ + AdminFlavorResource + """ # noqa: E501 + id: Optional[StrictInt] = None + openstack_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + region_name: Optional[StrictStr] = None + cpu: Optional[StrictInt] = None + ram: Optional[Union[StrictFloat, StrictInt]] = None + disk: Optional[StrictInt] = None + gpu: Optional[StrictStr] = None + status: Optional[StrictStr] = None + gpu_count: Optional[StrictInt] = None + stock_available: Optional[StrictBool] = None + nodes: Optional[List[AdminNodeResource]] = None + vms: Optional[List[StrictInt]] = None + is_public: Optional[StrictBool] = None + is_custom: Optional[StrictBool] = None + ephemeral: Optional[StrictInt] = None + description: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "openstack_id", "name", "region_name", "cpu", "ram", "disk", "gpu", "status", "gpu_count", "stock_available", "nodes", "vms", "is_public", "is_custom", "ephemeral", "description", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminFlavorResource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in nodes (list) + _items = [] + if self.nodes: + for _item in self.nodes: + if _item: + _items.append(_item.to_dict()) + _dict['nodes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminFlavorResource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "openstack_id": obj.get("openstack_id"), + "name": obj.get("name"), + "region_name": obj.get("region_name"), + "cpu": obj.get("cpu"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "gpu": obj.get("gpu"), + "status": obj.get("status"), + "gpu_count": obj.get("gpu_count"), + "stock_available": obj.get("stock_available"), + "nodes": [AdminNodeResource.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None, + "vms": obj.get("vms"), + "is_public": obj.get("is_public"), + "is_custom": obj.get("is_custom"), + "ephemeral": obj.get("ephemeral"), + "description": obj.get("description"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/admin_flavor_resources_list.py b/hyperstack/models/admin_flavor_resources_list.py new file mode 100644 index 0000000..b4ea734 --- /dev/null +++ b/hyperstack/models/admin_flavor_resources_list.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_flavor_resource import AdminFlavorResource +from typing import Optional, Set +from typing_extensions import Self + +class AdminFlavorResourcesList(BaseModel): + """ + AdminFlavorResourcesList + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + flavors: Optional[List[AdminFlavorResource]] = None + __properties: ClassVar[List[str]] = ["status", "message", "flavors"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminFlavorResourcesList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in flavors (list) + _items = [] + if self.flavors: + for _item in self.flavors: + if _item: + _items.append(_item.to_dict()) + _dict['flavors'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminFlavorResourcesList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "flavors": [AdminFlavorResource.from_dict(_item) for _item in obj["flavors"]] if obj.get("flavors") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/admin_get_contract_detail_fields.py b/hyperstack/models/admin_get_contract_detail_fields.py new file mode 100644 index 0000000..bfaf7f1 --- /dev/null +++ b/hyperstack/models/admin_get_contract_detail_fields.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminGetContractDetailFields(BaseModel): + """ + AdminGetContractDetailFields + """ # noqa: E501 + id: Optional[StrictInt] = None + org_id: Optional[StrictInt] = None + description: Optional[StrictStr] = None + start_date: Optional[datetime] = None + end_date: Optional[datetime] = None + expiration_policy: Optional[StrictInt] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "org_id", "description", "start_date", "end_date", "expiration_policy", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminGetContractDetailFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminGetContractDetailFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "org_id": obj.get("org_id"), + "description": obj.get("description"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "expiration_policy": obj.get("expiration_policy"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/admin_get_version_response.py b/hyperstack/models/admin_get_version_response.py new file mode 100644 index 0000000..f904939 --- /dev/null +++ b/hyperstack/models/admin_get_version_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminGetVersionResponse(BaseModel): + """ + AdminGetVersionResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + version: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "message", "version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminGetVersionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminGetVersionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "version": obj.get("version") + }) + return _obj + + diff --git a/hyperstack/models/admin_hibernation_restoration_payload_model.py b/hyperstack/models/admin_hibernation_restoration_payload_model.py new file mode 100644 index 0000000..9ecfbc5 --- /dev/null +++ b/hyperstack/models/admin_hibernation_restoration_payload_model.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AdminHibernationRestorationPayloadModel(BaseModel): + """ + AdminHibernationRestorationPayloadModel + """ # noqa: E501 + org_id: StrictInt + vm_name: StrictStr + vm_id: StrictInt + status: StrictStr + __properties: ClassVar[List[str]] = ["org_id", "vm_name", "vm_id", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminHibernationRestorationPayloadModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminHibernationRestorationPayloadModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "org_id": obj.get("org_id"), + "vm_name": obj.get("vm_name"), + "vm_id": obj.get("vm_id"), + "status": obj.get("status") + }) + return _obj + + diff --git a/hyperstack/models/admin_image_admin_fields.py b/hyperstack/models/admin_image_admin_fields.py new file mode 100644 index 0000000..20eab7a --- /dev/null +++ b/hyperstack/models/admin_image_admin_fields.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.lable_resonse import LableResonse +from typing import Optional, Set +from typing_extensions import Self + +class AdminImageAdminFields(BaseModel): + """ + AdminImageAdminFields + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + openstack_id: Optional[StrictStr] = None + region_id: Optional[StrictInt] = None + region_name: Optional[StrictStr] = None + type: Optional[StrictStr] = None + version: Optional[StrictStr] = None + size: Optional[StrictInt] = None + is_public: Optional[StrictBool] = None + description: Optional[StrictStr] = None + labels: Optional[List[LableResonse]] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "name", "openstack_id", "region_id", "region_name", "type", "version", "size", "is_public", "description", "labels", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminImageAdminFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminImageAdminFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "openstack_id": obj.get("openstack_id"), + "region_id": obj.get("region_id"), + "region_name": obj.get("region_name"), + "type": obj.get("type"), + "version": obj.get("version"), + "size": obj.get("size"), + "is_public": obj.get("is_public"), + "description": obj.get("description"), + "labels": [LableResonse.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/admin_image_admin_response.py b/hyperstack/models/admin_image_admin_response.py new file mode 100644 index 0000000..47e3aec --- /dev/null +++ b/hyperstack/models/admin_image_admin_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_image_admin_response_image import AdminImageAdminResponseImage +from typing import Optional, Set +from typing_extensions import Self + +class AdminImageAdminResponse(BaseModel): + """ + AdminImageAdminResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + image: Optional[AdminImageAdminResponseImage] = None + __properties: ClassVar[List[str]] = ["status", "message", "image"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminImageAdminResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of image + if self.image: + _dict['image'] = self.image.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminImageAdminResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "image": AdminImageAdminResponseImage.from_dict(obj["image"]) if obj.get("image") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/admin_image_admin_response_image.py b/hyperstack/models/admin_image_admin_response_image.py new file mode 100644 index 0000000..fbfb476 --- /dev/null +++ b/hyperstack/models/admin_image_admin_response_image.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.lable_resonse import LableResonse +from typing import Optional, Set +from typing_extensions import Self + +class AdminImageAdminResponseImage(BaseModel): + """ + AdminImageAdminResponseImage + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + openstack_id: Optional[StrictStr] = None + region_id: Optional[StrictInt] = None + region_name: Optional[StrictStr] = None + type: Optional[StrictStr] = None + version: Optional[StrictStr] = None + size: Optional[StrictInt] = None + is_public: Optional[StrictBool] = None + description: Optional[StrictStr] = None + labels: Optional[List[LableResonse]] = None + created_at: Optional[datetime] = None + organizations: List[StrictInt] + __properties: ClassVar[List[str]] = ["id", "name", "openstack_id", "region_id", "region_name", "type", "version", "size", "is_public", "description", "labels", "created_at", "organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminImageAdminResponseImage from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminImageAdminResponseImage from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "openstack_id": obj.get("openstack_id"), + "region_id": obj.get("region_id"), + "region_name": obj.get("region_name"), + "type": obj.get("type"), + "version": obj.get("version"), + "size": obj.get("size"), + "is_public": obj.get("is_public"), + "description": obj.get("description"), + "labels": [LableResonse.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "created_at": obj.get("created_at"), + "organizations": obj.get("organizations") + }) + return _obj + + diff --git a/hyperstack/models/discount_detail_response.py b/hyperstack/models/admin_image_list_admin_response.py similarity index 72% rename from hyperstack/models/discount_detail_response.py rename to hyperstack/models/admin_image_list_admin_response.py index 1f08da1..3ac4ebb 100644 --- a/hyperstack/models/discount_detail_response.py +++ b/hyperstack/models/admin_image_list_admin_response.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.insert_discount_plan_fields import InsertDiscountPlanFields +from hyperstack.models.admin_image_admin_fields import AdminImageAdminFields from typing import Optional, Set from typing_extensions import Self -class DiscountDetailResponse(BaseModel): +class AdminImageListAdminResponse(BaseModel): """ - DiscountDetailResponse + AdminImageListAdminResponse """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - discount_plan: Optional[List[InsertDiscountPlanFields]] = None - __properties: ClassVar[List[str]] = ["status", "message", "discount_plan"] + data: Optional[List[AdminImageAdminFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DiscountDetailResponse from a JSON string""" + """Create an instance of AdminImageListAdminResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,18 +71,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in discount_plan (list) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) _items = [] - if self.discount_plan: - for _item in self.discount_plan: + if self.data: + for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['discount_plan'] = _items + _dict['data'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DiscountDetailResponse from a dict""" + """Create an instance of AdminImageListAdminResponse from a dict""" if obj is None: return None @@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "discount_plan": [InsertDiscountPlanFields.from_dict(_item) for _item in obj["discount_plan"]] if obj.get("discount_plan") is not None else None + "data": [AdminImageAdminFields.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/hyperstack/models/instance_resources.py b/hyperstack/models/admin_instance_resources.py similarity index 74% rename from hyperstack/models/instance_resources.py rename to hyperstack/models/admin_instance_resources.py index d38ce5c..fb1b332 100644 --- a/hyperstack/models/instance_resources.py +++ b/hyperstack/models/admin_instance_resources.py @@ -18,35 +18,37 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.flavor_resource import FlavorResource +from hyperstack.models.admin_flavor_resource import AdminFlavorResource from typing import Optional, Set from typing_extensions import Self -class InstanceResources(BaseModel): +class AdminInstanceResources(BaseModel): """ - InstanceResources + AdminInstanceResources """ # noqa: E501 id: Optional[StrictInt] = None name: Optional[StrictStr] = None + openstack_id: Optional[StrictStr] = None host: Optional[StrictStr] = None status: Optional[StrictStr] = None - flavor: Optional[FlavorResource] = None + flavor: Optional[AdminFlavorResource] = None image_id: Optional[StrictInt] = None volume_id: Optional[StrictInt] = None keypair_name: Optional[StrictStr] = None fixed_ip: Optional[StrictStr] = None floating_ip: Optional[StrictStr] = None + contract_id: Optional[StrictInt] = None floating_ip_status: Optional[StrictStr] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["id", "name", "host", "status", "flavor", "image_id", "volume_id", "keypair_name", "fixed_ip", "floating_ip", "floating_ip_status", "created_at"] + __properties: ClassVar[List[str]] = ["id", "name", "openstack_id", "host", "status", "flavor", "image_id", "volume_id", "keypair_name", "fixed_ip", "floating_ip", "contract_id", "floating_ip_status", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +62,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstanceResources from a JSON string""" + """Create an instance of AdminInstanceResources from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -88,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstanceResources from a dict""" + """Create an instance of AdminInstanceResources from a dict""" if obj is None: return None @@ -98,14 +100,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), + "openstack_id": obj.get("openstack_id"), "host": obj.get("host"), "status": obj.get("status"), - "flavor": FlavorResource.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None, + "flavor": AdminFlavorResource.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None, "image_id": obj.get("image_id"), "volume_id": obj.get("volume_id"), "keypair_name": obj.get("keypair_name"), "fixed_ip": obj.get("fixed_ip"), "floating_ip": obj.get("floating_ip"), + "contract_id": obj.get("contract_id"), "floating_ip_status": obj.get("floating_ip_status"), "created_at": obj.get("created_at") }) diff --git a/hyperstack/models/admin_node_resource.py b/hyperstack/models/admin_node_resource.py new file mode 100644 index 0000000..8da0a0b --- /dev/null +++ b/hyperstack/models/admin_node_resource.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminNodeResource(BaseModel): + """ + AdminNodeResource + """ # noqa: E501 + id: Optional[StrictInt] = None + openstack_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + available: Optional[StrictInt] = None + status: Optional[StrictStr] = None + provision_date: Optional[datetime] = None + organizations: Optional[List[StrictInt]] = None + __properties: ClassVar[List[str]] = ["id", "openstack_id", "name", "available", "status", "provision_date", "organizations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminNodeResource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminNodeResource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "openstack_id": obj.get("openstack_id"), + "name": obj.get("name"), + "available": obj.get("available"), + "status": obj.get("status"), + "provision_date": obj.get("provision_date"), + "organizations": obj.get("organizations") + }) + return _obj + + diff --git a/hyperstack/models/organizations_response_model.py b/hyperstack/models/admin_organization_resource_list.py similarity index 77% rename from hyperstack/models/organizations_response_model.py rename to hyperstack/models/admin_organization_resource_list.py index 3d26055..8973b91 100644 --- a/hyperstack/models/organizations_response_model.py +++ b/hyperstack/models/admin_organization_resource_list.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.organization_info_model import OrganizationInfoModel +from hyperstack.models.admin_organization_resources import AdminOrganizationResources from typing import Optional, Set from typing_extensions import Self -class OrganizationsResponseModel(BaseModel): +class AdminOrganizationResourceList(BaseModel): """ - OrganizationsResponseModel + AdminOrganizationResourceList """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - organizations: Optional[List[OrganizationInfoModel]] = None + organizations: Optional[List[AdminOrganizationResources]] = None __properties: ClassVar[List[str]] = ["status", "message", "organizations"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationsResponseModel from a JSON string""" + """Create an instance of AdminOrganizationResourceList from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationsResponseModel from a dict""" + """Create an instance of AdminOrganizationResourceList from a dict""" if obj is None: return None @@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "organizations": [OrganizationInfoModel.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + "organizations": [AdminOrganizationResources.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None }) return _obj diff --git a/hyperstack/models/organization_model.py b/hyperstack/models/admin_organization_resource_response.py similarity index 76% rename from hyperstack/models/organization_model.py rename to hyperstack/models/admin_organization_resource_response.py index b1c793d..4bbc461 100644 --- a/hyperstack/models/organization_model.py +++ b/hyperstack/models/admin_organization_resource_response.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.organization_info_model import OrganizationInfoModel +from hyperstack.models.admin_organization_resources import AdminOrganizationResources from typing import Optional, Set from typing_extensions import Self -class OrganizationModel(BaseModel): +class AdminOrganizationResourceResponse(BaseModel): """ - OrganizationModel + AdminOrganizationResourceResponse """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - organization: Optional[OrganizationInfoModel] = None + organization: Optional[AdminOrganizationResources] = None __properties: ClassVar[List[str]] = ["status", "message", "organization"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationModel from a JSON string""" + """Create an instance of AdminOrganizationResourceResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationModel from a dict""" + """Create an instance of AdminOrganizationResourceResponse from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "organization": OrganizationInfoModel.from_dict(obj["organization"]) if obj.get("organization") is not None else None + "organization": AdminOrganizationResources.from_dict(obj["organization"]) if obj.get("organization") is not None else None }) return _obj diff --git a/hyperstack/models/organization_resources.py b/hyperstack/models/admin_organization_resources.py similarity index 77% rename from hyperstack/models/organization_resources.py rename to hyperstack/models/admin_organization_resources.py index 350b741..7da6510 100644 --- a/hyperstack/models/organization_resources.py +++ b/hyperstack/models/admin_organization_resources.py @@ -17,25 +17,25 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.envrionment_resources import EnvrionmentResources +from hyperstack.models.admin_envrionment_resources import AdminEnvrionmentResources from typing import Optional, Set from typing_extensions import Self -class OrganizationResources(BaseModel): +class AdminOrganizationResources(BaseModel): """ - OrganizationResources + AdminOrganizationResources """ # noqa: E501 organization_id: Optional[StrictInt] = None - environments: Optional[List[EnvrionmentResources]] = None + environments: Optional[List[AdminEnvrionmentResources]] = None __properties: ClassVar[List[str]] = ["organization_id", "environments"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationResources from a JSON string""" + """Create an instance of AdminOrganizationResources from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -81,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationResources from a dict""" + """Create an instance of AdminOrganizationResources from a dict""" if obj is None: return None @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "organization_id": obj.get("organization_id"), - "environments": [EnvrionmentResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None + "environments": [AdminEnvrionmentResources.from_dict(_item) for _item in obj["environments"]] if obj.get("environments") is not None else None }) return _obj diff --git a/hyperstack/models/organization_response_model.py b/hyperstack/models/admin_organization_response_model.py similarity index 77% rename from hyperstack/models/organization_response_model.py rename to hyperstack/models/admin_organization_response_model.py index 6fc1ff5..6cd2f21 100644 --- a/hyperstack/models/organization_response_model.py +++ b/hyperstack/models/admin_organization_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.organization_info_model import OrganizationInfoModel +from hyperstack.models.organization_fields import OrganizationFields from typing import Optional, Set from typing_extensions import Self -class OrganizationResponseModel(BaseModel): +class AdminOrganizationResponseModel(BaseModel): """ - OrganizationResponseModel + AdminOrganizationResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - organizations: Optional[OrganizationInfoModel] = None + organizations: Optional[OrganizationFields] = None __properties: ClassVar[List[str]] = ["status", "message", "organizations"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationResponseModel from a JSON string""" + """Create an instance of AdminOrganizationResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationResponseModel from a dict""" + """Create an instance of AdminOrganizationResponseModel from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "organizations": OrganizationInfoModel.from_dict(obj["organizations"]) if obj.get("organizations") is not None else None + "organizations": OrganizationFields.from_dict(obj["organizations"]) if obj.get("organizations") is not None else None }) return _obj diff --git a/hyperstack/models/admin_organization_summary_fields.py b/hyperstack/models/admin_organization_summary_fields.py new file mode 100644 index 0000000..8a2aa60 --- /dev/null +++ b/hyperstack/models/admin_organization_summary_fields.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminOrganizationSummaryFields(BaseModel): + """ + AdminOrganizationSummaryFields + """ # noqa: E501 + id: StrictInt + name: StrictStr + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "name", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminOrganizationSummaryFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminOrganizationSummaryFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/admin_organizations_response_model.py b/hyperstack/models/admin_organizations_response_model.py new file mode 100644 index 0000000..caa266c --- /dev/null +++ b/hyperstack/models/admin_organizations_response_model.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.organization_fields import OrganizationFields +from typing import Optional, Set +from typing_extensions import Self + +class AdminOrganizationsResponseModel(BaseModel): + """ + AdminOrganizationsResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + organizations: Optional[List[OrganizationFields]] = None + organization_count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["status", "message", "organizations", "organization_count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminOrganizationsResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) + _items = [] + if self.organizations: + for _item in self.organizations: + if _item: + _items.append(_item.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminOrganizationsResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "organizations": [OrganizationFields.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None, + "organization_count": obj.get("organization_count") + }) + return _obj + + diff --git a/hyperstack/models/organization_resource_list.py b/hyperstack/models/admin_organizations_summary_response_model.py similarity index 76% rename from hyperstack/models/organization_resource_list.py rename to hyperstack/models/admin_organizations_summary_response_model.py index 73c899e..40a0878 100644 --- a/hyperstack/models/organization_resource_list.py +++ b/hyperstack/models/admin_organizations_summary_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.organization_resources import OrganizationResources +from hyperstack.models.admin_organization_summary_fields import AdminOrganizationSummaryFields from typing import Optional, Set from typing_extensions import Self -class OrganizationResourceList(BaseModel): +class AdminOrganizationsSummaryResponseModel(BaseModel): """ - OrganizationResourceList + AdminOrganizationsSummaryResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - organizations: Optional[List[OrganizationResources]] = None + organizations: Optional[List[AdminOrganizationSummaryFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "organizations"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationResourceList from a JSON string""" + """Create an instance of AdminOrganizationsSummaryResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationResourceList from a dict""" + """Create an instance of AdminOrganizationsSummaryResponseModel from a dict""" if obj is None: return None @@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "organizations": [OrganizationResources.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None + "organizations": [AdminOrganizationSummaryFields.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None }) return _obj diff --git a/hyperstack/models/admin_user_fields.py b/hyperstack/models/admin_user_fields.py new file mode 100644 index 0000000..b4c0125 --- /dev/null +++ b/hyperstack/models/admin_user_fields.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminUserFields(BaseModel): + """ + AdminUserFields + """ # noqa: E501 + id: StrictInt + username: StrictStr + email: StrictStr + org_id: StrictInt + org_name: StrictStr + created_at: Optional[datetime] = None + last_login: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "username", "email", "org_id", "org_name", "created_at", "last_login"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminUserFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminUserFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "username": obj.get("username"), + "email": obj.get("email"), + "org_id": obj.get("org_id"), + "org_name": obj.get("org_name"), + "created_at": obj.get("created_at"), + "last_login": obj.get("last_login") + }) + return _obj + + diff --git a/hyperstack/models/user_info_response.py b/hyperstack/models/admin_user_response_model.py similarity index 79% rename from hyperstack/models/user_info_response.py rename to hyperstack/models/admin_user_response_model.py index 27c16ff..67ca23a 100644 --- a/hyperstack/models/user_info_response.py +++ b/hyperstack/models/admin_user_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.user_fields import UserFields +from hyperstack.models.admin_user_fields import AdminUserFields from typing import Optional, Set from typing_extensions import Self -class UserInfoResponse(BaseModel): +class AdminUserResponseModel(BaseModel): """ - UserInfoResponse + AdminUserResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - user: Optional[UserFields] = None + user: Optional[AdminUserFields] = None __properties: ClassVar[List[str]] = ["status", "message", "user"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserInfoResponse from a JSON string""" + """Create an instance of AdminUserResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserInfoResponse from a dict""" + """Create an instance of AdminUserResponseModel from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "user": UserFields.from_dict(obj["user"]) if obj.get("user") is not None else None + "user": AdminUserFields.from_dict(obj["user"]) if obj.get("user") is not None else None }) return _obj diff --git a/hyperstack/models/admin_users_response_model.py b/hyperstack/models/admin_users_response_model.py new file mode 100644 index 0000000..4897a77 --- /dev/null +++ b/hyperstack/models/admin_users_response_model.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_user_fields import AdminUserFields +from typing import Optional, Set +from typing_extensions import Self + +class AdminUsersResponseModel(BaseModel): + """ + AdminUsersResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + users: Optional[List[AdminUserFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "users"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminUsersResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminUsersResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "users": [AdminUserFields.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/admin_version_response_model.py b/hyperstack/models/admin_version_response_model.py new file mode 100644 index 0000000..3f4ee58 --- /dev/null +++ b/hyperstack/models/admin_version_response_model.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AdminVersionResponseModel(BaseModel): + """ + AdminVersionResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + version: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "message", "version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AdminVersionResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AdminVersionResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "version": obj.get("version") + }) + return _obj + + diff --git a/hyperstack/models/volume_resource.py b/hyperstack/models/admin_volume_resource.py similarity index 80% rename from hyperstack/models/volume_resource.py rename to hyperstack/models/admin_volume_resource.py index 241e2a4..17219bc 100644 --- a/hyperstack/models/volume_resource.py +++ b/hyperstack/models/admin_volume_resource.py @@ -18,29 +18,30 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class VolumeResource(BaseModel): +class AdminVolumeResource(BaseModel): """ - VolumeResource + AdminVolumeResource """ # noqa: E501 id: Optional[StrictInt] = None name: Optional[StrictStr] = None + openstack_id: Optional[StrictStr] = None type: Optional[StrictStr] = None size: Optional[StrictInt] = None status: Optional[StrictStr] = None bootable: Optional[StrictBool] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["id", "name", "type", "size", "status", "bootable", "created_at"] + __properties: ClassVar[List[str]] = ["id", "name", "openstack_id", "type", "size", "status", "bootable", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of VolumeResource from a JSON string""" + """Create an instance of AdminVolumeResource from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -79,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of VolumeResource from a dict""" + """Create an instance of AdminVolumeResource from a dict""" if obj is None: return None @@ -89,6 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), + "openstack_id": obj.get("openstack_id"), "type": obj.get("type"), "size": obj.get("size"), "status": obj.get("status"), diff --git a/hyperstack/models/adminaddorganizationpayload.py b/hyperstack/models/adminaddorganizationpayload.py index d36408d..92110f5 100644 --- a/hyperstack/models/adminaddorganizationpayload.py +++ b/hyperstack/models/adminaddorganizationpayload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class Adminaddorganizationpayload(BaseModel): organization_id: StrictInt __properties: ClassVar[List[str]] = ["organization_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/admincreditpostpayload.py b/hyperstack/models/admincreditpostpayload.py index 24b185b..cba21e5 100644 --- a/hyperstack/models/admincreditpostpayload.py +++ b/hyperstack/models/admincreditpostpayload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class Admincreditpostpayload(BaseModel): credit: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["credit"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/adminpaymenthistoryfields.py b/hyperstack/models/adminpaymenthistoryfields.py new file mode 100644 index 0000000..774a861 --- /dev/null +++ b/hyperstack/models/adminpaymenthistoryfields.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class Adminpaymenthistoryfields(BaseModel): + """ + Adminpaymenthistoryfields + """ # noqa: E501 + amount: Optional[Union[StrictFloat, StrictInt]] = None + medium: Optional[StrictStr] = None + status: Optional[StrictStr] = None + transaction_id: Optional[StrictStr] = None + payment_id: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["amount", "medium", "status", "transaction_id", "payment_id", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Adminpaymenthistoryfields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Adminpaymenthistoryfields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "medium": obj.get("medium"), + "status": obj.get("status"), + "transaction_id": obj.get("transaction_id"), + "payment_id": obj.get("payment_id"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/adminpaymenthistoryresponse.py b/hyperstack/models/adminpaymenthistoryresponse.py new file mode 100644 index 0000000..ef39716 --- /dev/null +++ b/hyperstack/models/adminpaymenthistoryresponse.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.adminpaymenthistoryfields import Adminpaymenthistoryfields +from typing import Optional, Set +from typing_extensions import Self + +class Adminpaymenthistoryresponse(BaseModel): + """ + Adminpaymenthistoryresponse + """ # noqa: E501 + message: Optional[StrictStr] = None + status: Optional[StrictBool] = None + payments: Optional[List[Adminpaymenthistoryfields]] = None + __properties: ClassVar[List[str]] = ["message", "status", "payments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Adminpaymenthistoryresponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in payments (list) + _items = [] + if self.payments: + for _item in self.payments: + if _item: + _items.append(_item.to_dict()) + _dict['payments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Adminpaymenthistoryresponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "status": obj.get("status"), + "payments": [Adminpaymenthistoryfields.from_dict(_item) for _item in obj["payments"]] if obj.get("payments") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/adminrechargehistoryfields.py b/hyperstack/models/adminrechargehistoryfields.py index 80998f8..77c79f3 100644 --- a/hyperstack/models/adminrechargehistoryfields.py +++ b/hyperstack/models/adminrechargehistoryfields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -35,11 +35,11 @@ class Adminrechargehistoryfields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["credit", "threshold", "prev_balance", "curr_balance", "medium", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/adminrechargehistoryresponse.py b/hyperstack/models/adminrechargehistoryresponse.py index 5c09217..f2f70bb 100644 --- a/hyperstack/models/adminrechargehistoryresponse.py +++ b/hyperstack/models/adminrechargehistoryresponse.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.adminrechargehistoryfields import Adminrechargehistoryfields from typing import Optional, Set @@ -32,11 +32,11 @@ class Adminrechargehistoryresponse(BaseModel): data: Optional[List[Adminrechargehistoryfields]] = None __properties: ClassVar[List[str]] = ["message", "status", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/adminthresholdpostpayload.py b/hyperstack/models/adminthresholdpostpayload.py index 062a9f6..521e797 100644 --- a/hyperstack/models/adminthresholdpostpayload.py +++ b/hyperstack/models/adminthresholdpostpayload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class Adminthresholdpostpayload(BaseModel): threshold: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["threshold"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/api_key_fields.py b/hyperstack/models/api_key_fields.py index c13158d..c700840 100644 --- a/hyperstack/models/api_key_fields.py +++ b/hyperstack/models/api_key_fields.py @@ -17,23 +17,23 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class APIKeyFields(BaseModel): +class ApiKeyFields(BaseModel): """ - APIKeyFields + ApiKeyFields """ # noqa: E501 key: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["key"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of APIKeyFields from a JSON string""" + """Create an instance of ApiKeyFields from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of APIKeyFields from a dict""" + """Create an instance of ApiKeyFields from a dict""" if obj is None: return None diff --git a/hyperstack/models/api_key_verify_fields.py b/hyperstack/models/api_key_verify_fields.py index c92f579..849fb36 100644 --- a/hyperstack/models/api_key_verify_fields.py +++ b/hyperstack/models/api_key_verify_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -32,11 +32,11 @@ class ApiKeyVerifyFields(BaseModel): sub: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["user_id", "org_id", "user_role", "sub"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/assign_rbac_role_payload.py b/hyperstack/models/assign_rbac_role_payload.py index 7630658..9011d52 100644 --- a/hyperstack/models/assign_rbac_role_payload.py +++ b/hyperstack/models/assign_rbac_role_payload.py @@ -17,23 +17,23 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class AssignRBACRolePayload(BaseModel): +class AssignRbacRolePayload(BaseModel): """ - AssignRBACRolePayload + AssignRbacRolePayload """ # noqa: E501 role_id: StrictInt __properties: ClassVar[List[str]] = ["role_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AssignRBACRolePayload from a JSON string""" + """Create an instance of AssignRbacRolePayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AssignRBACRolePayload from a dict""" + """Create an instance of AssignRbacRolePayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/attach_callback_payload.py b/hyperstack/models/attach_callback_payload.py index ead01d4..94412c3 100644 --- a/hyperstack/models/attach_callback_payload.py +++ b/hyperstack/models/attach_callback_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class AttachCallbackPayload(BaseModel): url: StrictStr __properties: ClassVar[List[str]] = ["url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/attach_callback_response.py b/hyperstack/models/attach_callback_response.py index 819ee6e..794f64b 100644 --- a/hyperstack/models/attach_callback_response.py +++ b/hyperstack/models/attach_callback_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class AttachCallbackResponse(BaseModel): url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/attach_firewall_with_vm.py b/hyperstack/models/attach_firewall_with_vm.py new file mode 100644 index 0000000..2ccbef8 --- /dev/null +++ b/hyperstack/models/attach_firewall_with_vm.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AttachFirewallWithVM(BaseModel): + """ + AttachFirewallWithVM + """ # noqa: E501 + vms: List[StrictInt] + __properties: ClassVar[List[str]] = ["vms"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AttachFirewallWithVM from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttachFirewallWithVM from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "vms": obj.get("vms") + }) + return _obj + + diff --git a/hyperstack/models/attach_firewalls_to_vm_payload.py b/hyperstack/models/attach_firewalls_to_vm_payload.py new file mode 100644 index 0000000..89986d8 --- /dev/null +++ b/hyperstack/models/attach_firewalls_to_vm_payload.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AttachFirewallsToVMPayload(BaseModel): + """ + AttachFirewallsToVMPayload + """ # noqa: E501 + firewalls: List[StrictInt] + __properties: ClassVar[List[str]] = ["firewalls"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AttachFirewallsToVMPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttachFirewallsToVMPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "firewalls": obj.get("firewalls") + }) + return _obj + + diff --git a/hyperstack/models/attach_volume_fields.py b/hyperstack/models/attach_volume_fields.py index a9cdaaf..5a883f2 100644 --- a/hyperstack/models/attach_volume_fields.py +++ b/hyperstack/models/attach_volume_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -34,11 +34,11 @@ class AttachVolumeFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "instance_id", "volume_id", "status", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/attach_volumes.py b/hyperstack/models/attach_volumes.py index 3bb6154..f43381a 100644 --- a/hyperstack/models/attach_volumes.py +++ b/hyperstack/models/attach_volumes.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.attach_volume_fields import AttachVolumeFields from typing import Optional, Set @@ -32,11 +32,11 @@ class AttachVolumes(BaseModel): volume_attachments: Optional[List[AttachVolumeFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "volume_attachments"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/attach_volumes_payload.py b/hyperstack/models/attach_volumes_payload.py index eab0721..b2e150e 100644 --- a/hyperstack/models/attach_volumes_payload.py +++ b/hyperstack/models/attach_volumes_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class AttachVolumesPayload(BaseModel): volume_ids: Optional[List[StrictInt]] = None __properties: ClassVar[List[str]] = ["volume_ids"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/get_token_response.py b/hyperstack/models/auth_get_token_response_model.py similarity index 81% rename from hyperstack/models/get_token_response.py rename to hyperstack/models/auth_get_token_response_model.py index 03cfec7..86244c6 100644 --- a/hyperstack/models/get_token_response.py +++ b/hyperstack/models/auth_get_token_response_model.py @@ -17,26 +17,27 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.token_fields import TokenFields from typing import Optional, Set from typing_extensions import Self -class GetTokenResponse(BaseModel): +class AuthGetTokenResponseModel(BaseModel): """ - GetTokenResponse + AuthGetTokenResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None token: Optional[TokenFields] = None - __properties: ClassVar[List[str]] = ["status", "message", "token"] + first_login: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["status", "message", "token", "first_login"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetTokenResponse from a JSON string""" + """Create an instance of AuthGetTokenResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetTokenResponse from a dict""" + """Create an instance of AuthGetTokenResponseModel from a dict""" if obj is None: return None @@ -88,7 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "token": TokenFields.from_dict(obj["token"]) if obj.get("token") is not None else None + "token": TokenFields.from_dict(obj["token"]) if obj.get("token") is not None else None, + "first_login": obj.get("first_login") }) return _obj diff --git a/hyperstack/models/request_login_data_response.py b/hyperstack/models/auth_request_login_fields.py similarity index 84% rename from hyperstack/models/request_login_data_response.py rename to hyperstack/models/auth_request_login_fields.py index 60c1a15..570a8e5 100644 --- a/hyperstack/models/request_login_data_response.py +++ b/hyperstack/models/auth_request_login_fields.py @@ -17,24 +17,24 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class RequestLoginDataResponse(BaseModel): +class AuthRequestLoginFields(BaseModel): """ - RequestLoginDataResponse + AuthRequestLoginFields """ # noqa: E501 authorization_url: Optional[StrictStr] = None session_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["authorization_url", "session_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RequestLoginDataResponse from a JSON string""" + """Create an instance of AuthRequestLoginFields from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RequestLoginDataResponse from a dict""" + """Create an instance of AuthRequestLoginFields from a dict""" if obj is None: return None diff --git a/hyperstack/models/auth_request_login_response_model.py b/hyperstack/models/auth_request_login_response_model.py new file mode 100644 index 0000000..ace0e44 --- /dev/null +++ b/hyperstack/models/auth_request_login_response_model.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.auth_request_login_fields import AuthRequestLoginFields +from typing import Optional, Set +from typing_extensions import Self + +class AuthRequestLoginResponseModel(BaseModel): + """ + AuthRequestLoginResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + data: Optional[AuthRequestLoginFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthRequestLoginResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthRequestLoginResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "data": AuthRequestLoginFields.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/user_fields.py b/hyperstack/models/auth_user_fields.py similarity index 86% rename from hyperstack/models/user_fields.py rename to hyperstack/models/auth_user_fields.py index 7f97e06..697d37b 100644 --- a/hyperstack/models/user_fields.py +++ b/hyperstack/models/auth_user_fields.py @@ -18,14 +18,14 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class UserFields(BaseModel): +class AuthUserFields(BaseModel): """ - UserFields + AuthUserFields """ # noqa: E501 email: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -33,11 +33,11 @@ class UserFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["email", "name", "username", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserFields from a JSON string""" + """Create an instance of AuthUserFields from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserFields from a dict""" + """Create an instance of AuthUserFields from a dict""" if obj is None: return None diff --git a/hyperstack/models/auth_user_info_response_model.py b/hyperstack/models/auth_user_info_response_model.py new file mode 100644 index 0000000..1215b01 --- /dev/null +++ b/hyperstack/models/auth_user_info_response_model.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.auth_user_fields import AuthUserFields +from typing import Optional, Set +from typing_extensions import Self + +class AuthUserInfoResponseModel(BaseModel): + """ + AuthUserInfoResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + user: Optional[AuthUserFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "user"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthUserInfoResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of user + if self.user: + _dict['user'] = self.user.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthUserInfoResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "user": AuthUserFields.from_dict(obj["user"]) if obj.get("user") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/billing_response.py b/hyperstack/models/billing_response.py index 0318b1c..c95dc8c 100644 --- a/hyperstack/models/billing_response.py +++ b/hyperstack/models/billing_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.organization_object_response import OrganizationObjectResponse from typing import Optional, Set @@ -31,11 +31,11 @@ class BillingResponse(BaseModel): calculated_bills: Optional[List[OrganizationObjectResponse]] = None __properties: ClassVar[List[str]] = ["type", "calculated_bills"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/billingimmuneresources.py b/hyperstack/models/billingimmuneresources.py new file mode 100644 index 0000000..caea303 --- /dev/null +++ b/hyperstack/models/billingimmuneresources.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Billingimmuneresources(BaseModel): + """ + Billingimmuneresources + """ # noqa: E501 + resource_id: Optional[StrictInt] = None + resource_type: Optional[StrictStr] = None + organization_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["resource_id", "resource_type", "organization_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Billingimmuneresources from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Billingimmuneresources from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id"), + "resource_type": obj.get("resource_type"), + "organization_id": obj.get("organization_id") + }) + return _obj + + diff --git a/hyperstack/models/billingimmuneresourcesresponse.py b/hyperstack/models/billingimmuneresourcesresponse.py new file mode 100644 index 0000000..2b9ea35 --- /dev/null +++ b/hyperstack/models/billingimmuneresourcesresponse.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.billingimmuneresources import Billingimmuneresources +from typing import Optional, Set +from typing_extensions import Self + +class Billingimmuneresourcesresponse(BaseModel): + """ + Billingimmuneresourcesresponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + data: Optional[List[Billingimmuneresources]] = None + __properties: ClassVar[List[str]] = ["status", "message", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Billingimmuneresourcesresponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Billingimmuneresourcesresponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "data": [Billingimmuneresources.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/billingmetricesfields.py b/hyperstack/models/billingmetricesfields.py index 72fa477..0a8d42d 100644 --- a/hyperstack/models/billingmetricesfields.py +++ b/hyperstack/models/billingmetricesfields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -37,13 +37,14 @@ class Billingmetricesfields(BaseModel): total_up_time: Optional[Union[StrictFloat, StrictInt]] = None total_bill: Optional[Union[StrictFloat, StrictInt]] = None active: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["resource_id", "resource_type", "name", "organization_id", "bill_per_minute", "create_time", "terminate_time", "total_up_time", "total_bill", "active"] + exclude_billing: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["resource_id", "resource_type", "name", "organization_id", "bill_per_minute", "create_time", "terminate_time", "total_up_time", "total_bill", "active", "exclude_billing"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -99,7 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "terminate_time": obj.get("terminate_time"), "total_up_time": obj.get("total_up_time"), "total_bill": obj.get("total_bill"), - "active": obj.get("active") + "active": obj.get("active"), + "exclude_billing": obj.get("exclude_billing") }) return _obj diff --git a/hyperstack/models/billingmetricesresponse.py b/hyperstack/models/billingmetricesresponse.py index 16697db..85b6c3c 100644 --- a/hyperstack/models/billingmetricesresponse.py +++ b/hyperstack/models/billingmetricesresponse.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.billingmetricesfields import Billingmetricesfields from typing import Optional, Set @@ -32,11 +32,11 @@ class Billingmetricesresponse(BaseModel): data: Optional[List[Billingmetricesfields]] = None __properties: ClassVar[List[str]] = ["message", "status", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/remove_member_response.py b/hyperstack/models/common_response_model.py similarity index 84% rename from hyperstack/models/remove_member_response.py rename to hyperstack/models/common_response_model.py index 9c69f1f..f3f5324 100644 --- a/hyperstack/models/remove_member_response.py +++ b/hyperstack/models/common_response_model.py @@ -17,24 +17,24 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class RemoveMemberResponse(BaseModel): +class CommonResponseModel(BaseModel): """ - RemoveMemberResponse + CommonResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RemoveMemberResponse from a JSON string""" + """Create an instance of CommonResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RemoveMemberResponse from a dict""" + """Create an instance of CommonResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/compliance_fields.py b/hyperstack/models/compliance_fields.py index 0d60b18..41c5d6f 100644 --- a/hyperstack/models/compliance_fields.py +++ b/hyperstack/models/compliance_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -32,11 +32,11 @@ class ComplianceFields(BaseModel): hdd: Optional[List[StrictInt]] = None __properties: ClassVar[List[str]] = ["gpu_model", "cpu", "ram", "hdd"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/compliance_model_fields.py b/hyperstack/models/compliance_model_fields.py index c3f7698..4fc8136 100644 --- a/hyperstack/models/compliance_model_fields.py +++ b/hyperstack/models/compliance_model_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -35,11 +35,11 @@ class ComplianceModelFields(BaseModel): variation_unit: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["id", "gpu_model", "resource_type", "base_value", "variation_min", "variation_max", "variation_unit"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/compliance_payload.py b/hyperstack/models/compliance_payload.py index ece910e..a96ec59 100644 --- a/hyperstack/models/compliance_payload.py +++ b/hyperstack/models/compliance_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -34,11 +34,11 @@ class CompliancePayload(BaseModel): variation_unit: StrictInt __properties: ClassVar[List[str]] = ["gpu_model", "resource_type", "base_value", "variation_min", "variation_max", "variation_unit"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/compliance_response.py b/hyperstack/models/compliance_response.py index 1466aaa..41b237a 100644 --- a/hyperstack/models/compliance_response.py +++ b/hyperstack/models/compliance_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.compliance_fields import ComplianceFields from typing import Optional, Set @@ -32,11 +32,11 @@ class ComplianceResponse(BaseModel): compliance: Optional[ComplianceFields] = None __properties: ClassVar[List[str]] = ["status", "message", "compliance"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/container_overview_fields.py b/hyperstack/models/container_overview_fields.py index 4fe4a57..6aa4155 100644 --- a/hyperstack/models/container_overview_fields.py +++ b/hyperstack/models/container_overview_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class ContainerOverviewFields(BaseModel): cost_per_hour: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["count", "vcpus", "gpus", "ram", "cost_per_hour"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/flavor_resource.py b/hyperstack/models/contract_instance_fields.py similarity index 71% rename from hyperstack/models/flavor_resource.py rename to hyperstack/models/contract_instance_fields.py index ff2f010..6f26639 100644 --- a/hyperstack/models/flavor_resource.py +++ b/hyperstack/models/contract_instance_fields.py @@ -17,29 +17,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class FlavorResource(BaseModel): +class ContractInstanceFields(BaseModel): """ - FlavorResource + ContractInstanceFields """ # noqa: E501 id: Optional[StrictInt] = None name: Optional[StrictStr] = None - cpu: Optional[StrictInt] = None - ram: Optional[Union[StrictFloat, StrictInt]] = None - disk: Optional[StrictInt] = None - gpu: Optional[StrictStr] = None + status: Optional[StrictStr] = None + created_at: Optional[datetime] = None + flavor_name: Optional[StrictStr] = None gpu_count: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["id", "name", "cpu", "ram", "disk", "gpu", "gpu_count"] + __properties: ClassVar[List[str]] = ["id", "name", "status", "created_at", "flavor_name", "gpu_count"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FlavorResource from a JSON string""" + """Create an instance of ContractInstanceFields from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FlavorResource from a dict""" + """Create an instance of ContractInstanceFields from a dict""" if obj is None: return None @@ -88,10 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), - "cpu": obj.get("cpu"), - "ram": obj.get("ram"), - "disk": obj.get("disk"), - "gpu": obj.get("gpu"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "flavor_name": obj.get("flavor_name"), "gpu_count": obj.get("gpu_count") }) return _obj diff --git a/hyperstack/models/contract_instances_response.py b/hyperstack/models/contract_instances_response.py new file mode 100644 index 0000000..5853c24 --- /dev/null +++ b/hyperstack/models/contract_instances_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.contract_instance_fields import ContractInstanceFields +from typing import Optional, Set +from typing_extensions import Self + +class ContractInstancesResponse(BaseModel): + """ + ContractInstancesResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + instances: Optional[List[ContractInstanceFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "instances"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ContractInstancesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item in self.instances: + if _item: + _items.append(_item.to_dict()) + _dict['instances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ContractInstancesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "instances": [ContractInstanceFields.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/create_contarct_fields.py b/hyperstack/models/create_contarct_fields.py new file mode 100644 index 0000000..a1f4765 --- /dev/null +++ b/hyperstack/models/create_contarct_fields.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.discount_plan_fields import DiscountPlanFields +from typing import Optional, Set +from typing_extensions import Self + +class CreateContarctFields(BaseModel): + """ + CreateContarctFields + """ # noqa: E501 + id: Optional[StrictInt] = None + org_id: Optional[StrictInt] = None + description: Optional[StrictStr] = None + start_date: Optional[datetime] = None + end_date: Optional[datetime] = None + expiration_policy: Optional[StrictInt] = None + discount_plans: Optional[List[DiscountPlanFields]] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "org_id", "description", "start_date", "end_date", "expiration_policy", "discount_plans", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateContarctFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in discount_plans (list) + _items = [] + if self.discount_plans: + for _item in self.discount_plans: + if _item: + _items.append(_item.to_dict()) + _dict['discount_plans'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateContarctFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "org_id": obj.get("org_id"), + "description": obj.get("description"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "expiration_policy": obj.get("expiration_policy"), + "discount_plans": [DiscountPlanFields.from_dict(_item) for _item in obj["discount_plans"]] if obj.get("discount_plans") is not None else None, + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/create_contract_payload.py b/hyperstack/models/create_contract_payload.py new file mode 100644 index 0000000..4ec76d8 --- /dev/null +++ b/hyperstack/models/create_contract_payload.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.resource_payload import ResourcePayload +from typing import Optional, Set +from typing_extensions import Self + +class CreateContractPayload(BaseModel): + """ + CreateContractPayload + """ # noqa: E501 + org_id: StrictInt + description: Optional[StrictStr] = None + discount_resources: List[ResourcePayload] + start_date: Optional[datetime] = None + end_date: Optional[datetime] = None + expiration_policy: StrictInt + __properties: ClassVar[List[str]] = ["org_id", "description", "discount_resources", "start_date", "end_date", "expiration_policy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateContractPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in discount_resources (list) + _items = [] + if self.discount_resources: + for _item in self.discount_resources: + if _item: + _items.append(_item.to_dict()) + _dict['discount_resources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateContractPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "org_id": obj.get("org_id"), + "description": obj.get("description"), + "discount_resources": [ResourcePayload.from_dict(_item) for _item in obj["discount_resources"]] if obj.get("discount_resources") is not None else None, + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "expiration_policy": obj.get("expiration_policy") + }) + return _obj + + diff --git a/hyperstack/models/create_discount_response.py b/hyperstack/models/create_discount_response.py index db13f99..31b9cb8 100644 --- a/hyperstack/models/create_discount_response.py +++ b/hyperstack/models/create_discount_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.insert_discount_plan_fields import InsertDiscountPlanFields from typing import Optional, Set @@ -32,11 +32,11 @@ class CreateDiscountResponse(BaseModel): discount_plan: Optional[InsertDiscountPlanFields] = None __properties: ClassVar[List[str]] = ["status", "message", "discount_plan"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/create_discounts_payload.py b/hyperstack/models/create_discounts_payload.py index 7bb062c..4c084f8 100644 --- a/hyperstack/models/create_discounts_payload.py +++ b/hyperstack/models/create_discounts_payload.py @@ -18,8 +18,9 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.customer_payload import CustomerPayload from hyperstack.models.resource_payload import ResourcePayload from typing import Optional, Set from typing_extensions import Self @@ -28,18 +29,18 @@ class CreateDiscountsPayload(BaseModel): """ CreateDiscountsPayload """ # noqa: E501 - org_id: StrictInt + customers: List[CustomerPayload] discount_resources: List[ResourcePayload] start_date: Optional[datetime] = None end_date: Optional[datetime] = None discount_status: StrictStr - __properties: ClassVar[List[str]] = ["org_id", "discount_resources", "start_date", "end_date", "discount_status"] + __properties: ClassVar[List[str]] = ["customers", "discount_resources", "start_date", "end_date", "discount_status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -74,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in customers (list) + _items = [] + if self.customers: + for _item in self.customers: + if _item: + _items.append(_item.to_dict()) + _dict['customers'] = _items # override the default output from pydantic by calling `to_dict()` of each item in discount_resources (list) _items = [] if self.discount_resources: @@ -93,7 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "org_id": obj.get("org_id"), + "customers": [CustomerPayload.from_dict(_item) for _item in obj["customers"]] if obj.get("customers") is not None else None, "discount_resources": [ResourcePayload.from_dict(_item) for _item in obj["discount_resources"]] if obj.get("discount_resources") is not None else None, "start_date": obj.get("start_date"), "end_date": obj.get("end_date"), diff --git a/hyperstack/models/create_environment.py b/hyperstack/models/create_environment.py index e8c23b2..b4f0e4f 100644 --- a/hyperstack/models/create_environment.py +++ b/hyperstack/models/create_environment.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -26,15 +27,15 @@ class CreateEnvironment(BaseModel): """ CreateEnvironment """ # noqa: E501 - name: StrictStr - region: StrictStr + name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The name of the environment being created.") + region: StrictStr = Field(description="The geographic location of the data center where the environment is being created. To learn more about regions, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/regions).") __properties: ClassVar[List[str]] = ["name", "region"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/create_firewall_payload.py b/hyperstack/models/create_firewall_payload.py new file mode 100644 index 0000000..382fa0f --- /dev/null +++ b/hyperstack/models/create_firewall_payload.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFirewallPayload(BaseModel): + """ + CreateFirewallPayload + """ # noqa: E501 + name: StrictStr + description: Optional[StrictStr] = None + environment_id: StrictInt + __properties: ClassVar[List[str]] = ["name", "description", "environment_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateFirewallPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateFirewallPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "environment_id": obj.get("environment_id") + }) + return _obj + + diff --git a/hyperstack/models/create_firewall_rule_payload.py b/hyperstack/models/create_firewall_rule_payload.py new file mode 100644 index 0000000..3d9e1b6 --- /dev/null +++ b/hyperstack/models/create_firewall_rule_payload.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CreateFirewallRulePayload(BaseModel): + """ + CreateFirewallRulePayload + """ # noqa: E501 + direction: StrictStr + protocol: StrictStr + port_range_min: Optional[StrictInt] = None + port_range_max: Optional[StrictInt] = None + ethertype: StrictStr + remote_ip_prefix: StrictStr + __properties: ClassVar[List[str]] = ["direction", "protocol", "port_range_min", "port_range_max", "ethertype", "remote_ip_prefix"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateFirewallRulePayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateFirewallRulePayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "direction": obj.get("direction"), + "protocol": obj.get("protocol"), + "port_range_min": obj.get("port_range_min"), + "port_range_max": obj.get("port_range_max"), + "ethertype": obj.get("ethertype"), + "remote_ip_prefix": obj.get("remote_ip_prefix") + }) + return _obj + + diff --git a/hyperstack/models/create_gpu.py b/hyperstack/models/create_gpu.py index f89d469..529d650 100644 --- a/hyperstack/models/create_gpu.py +++ b/hyperstack/models/create_gpu.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,14 +28,14 @@ class CreateGPU(BaseModel): """ # noqa: E501 name: StrictStr regions: Optional[List[StrictStr]] = None - example_metadata: Optional[StrictStr] = None + example_metadata: Optional[StrictStr] = Field(default=None, description="A valid JSON string.") __properties: ClassVar[List[str]] = ["name", "regions", "example_metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/create_instances_payload.py b/hyperstack/models/create_instances_payload.py index 674b100..627a37a 100644 --- a/hyperstack/models/create_instances_payload.py +++ b/hyperstack/models/create_instances_payload.py @@ -17,8 +17,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from hyperstack.models.create_security_rule_payload import CreateSecurityRulePayload from hyperstack.models.flavor_object_fields import FlavorObjectFields from hyperstack.models.profile_object_fields import ProfileObjectFields from typing import Optional, Set @@ -28,26 +30,28 @@ class CreateInstancesPayload(BaseModel): """ CreateInstancesPayload """ # noqa: E501 - name: StrictStr - environment_name: StrictStr - image_name: Optional[StrictStr] = None - volume_name: Optional[StrictStr] = None - create_bootable_volume: Optional[StrictBool] = None - flavor_name: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The name of the virtual machine being created.") + environment_name: StrictStr = Field(description="The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) in which the virtual machine is to be created.") + image_name: Optional[StrictStr] = Field(default=None, description="The [operating system (OS) image](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/images) name designated for installation on the virtual machine.") + volume_name: Optional[StrictStr] = Field(default=None, description="The names of the volume(s) to be attached to the virtual machine being created.") + create_bootable_volume: Optional[StrictBool] = Field(default=None, description="Indicates whether to create a bootable volume for the virtual machine. When set to `true`, a bootable volume will be created; the default value is `false`.") + flavor_name: StrictStr = Field(description="The name of the GPU hardware configuration ([flavor](https://infrahub-doc.nexgencloud.com/docs/hardware/flavors)) for the virtual machines being created.") flavor: Optional[FlavorObjectFields] = None - key_name: StrictStr - user_data: Optional[StrictStr] = None - callback_url: Optional[StrictStr] = None - assign_floating_ip: Optional[StrictBool] = None + key_name: StrictStr = Field(description="The name of the existing SSH key pair to be used for secure access to the virtual machine. For additional information on SSH key pairs, [**click here**](https://infrahub-doc.nexgencloud.com/docs/getting-started/create-keypair).") + user_data: Optional[StrictStr] = Field(default=None, description="Optional initialization configuration commands to manage the configuration of a virtual machine at launch using cloud-init scripts. For more information about custom VM configuration using cloud-init, [**click here**](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/initialization-configuration).") + callback_url: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="An optional URL where actions performed on the virtual machine will be sent. For additional information on event callbacks, [**click here**](https://infrahub-doc.nexgencloud.com/docs/features/webhooks-callbacks).") + assign_floating_ip: Optional[StrictBool] = Field(default=None, description="When this field is set to `true`, it attaches a [public IP address](https://infrahub-doc.nexgencloud.com/docs/virtual-machines/public-ip) to the virtual machine, enabling internet accessibility.") + security_rules: Optional[List[CreateSecurityRulePayload]] = None profile: Optional[ProfileObjectFields] = None - count: StrictInt - __properties: ClassVar[List[str]] = ["name", "environment_name", "image_name", "volume_name", "create_bootable_volume", "flavor_name", "flavor", "key_name", "user_data", "callback_url", "assign_floating_ip", "profile", "count"] + count: StrictInt = Field(description="The number of virtual machines to be created.") + labels: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["name", "environment_name", "image_name", "volume_name", "create_bootable_volume", "flavor_name", "flavor", "key_name", "user_data", "callback_url", "assign_floating_ip", "security_rules", "profile", "count", "labels"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -85,6 +89,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of flavor if self.flavor: _dict['flavor'] = self.flavor.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in security_rules (list) + _items = [] + if self.security_rules: + for _item in self.security_rules: + if _item: + _items.append(_item.to_dict()) + _dict['security_rules'] = _items # override the default output from pydantic by calling `to_dict()` of profile if self.profile: _dict['profile'] = self.profile.to_dict() @@ -111,8 +122,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "user_data": obj.get("user_data"), "callback_url": obj.get("callback_url"), "assign_floating_ip": obj.get("assign_floating_ip"), + "security_rules": [CreateSecurityRulePayload.from_dict(_item) for _item in obj["security_rules"]] if obj.get("security_rules") is not None else None, "profile": ProfileObjectFields.from_dict(obj["profile"]) if obj.get("profile") is not None else None, - "count": obj.get("count") + "count": obj.get("count"), + "labels": obj.get("labels") }) return _obj diff --git a/hyperstack/models/create_profile_payload.py b/hyperstack/models/create_profile_payload.py index 90e98a9..0546465 100644 --- a/hyperstack/models/create_profile_payload.py +++ b/hyperstack/models/create_profile_payload.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -26,16 +27,16 @@ class CreateProfilePayload(BaseModel): """ CreateProfilePayload """ # noqa: E501 - name: StrictStr - description: Optional[StrictStr] = None - data: Dict[str, StrictStr] + name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The name of the profile being created.") + description: Optional[Annotated[str, Field(strict=True, max_length=150)]] = Field(default=None, description="The optional description for the profile being created.") + data: Dict[str, StrictStr] = Field(description="The data object which contains the configuration of the virtual machine profile being created.") __properties: ClassVar[List[str]] = ["name", "description", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/create_profile_response.py b/hyperstack/models/create_profile_response.py index a2fbdb6..0545c7a 100644 --- a/hyperstack/models/create_profile_response.py +++ b/hyperstack/models/create_profile_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.profile_fields import ProfileFields from typing import Optional, Set @@ -32,11 +32,11 @@ class CreateProfileResponse(BaseModel): profile: Optional[ProfileFields] = None __properties: ClassVar[List[str]] = ["status", "message", "profile"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/create_security_rule_payload.py b/hyperstack/models/create_security_rule_payload.py index e6f2d10..d7388cd 100644 --- a/hyperstack/models/create_security_rule_payload.py +++ b/hyperstack/models/create_security_rule_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -26,17 +26,24 @@ class CreateSecurityRulePayload(BaseModel): """ CreateSecurityRulePayload """ # noqa: E501 - direction: StrictStr - protocol: StrictStr - ethertype: StrictStr - remote_ip_prefix: StrictStr + direction: StrictStr = Field(description="The direction of traffic that the firewall rule applies to.") + protocol: StrictStr = Field(description="The network protocol associated with the rule. Call the [`GET /core/sg-rules-protocols`](https://infrahub-api-doc.nexgencloud.com/#get-/core/sg-rules-protocols) endpoint to retrieve a list of permitted network protocols.") + ethertype: StrictStr = Field(description="The Ethernet type associated with the rule.") + remote_ip_prefix: StrictStr = Field(description="The IP address range that is allowed to access the specified port. Use \"0.0.0.0/0\" to allow any IP address.") __properties: ClassVar[List[str]] = ["direction", "protocol", "ethertype", "remote_ip_prefix"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + @field_validator('protocol') + def protocol_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['any', 'ah', 'dccp', 'egp', 'esp', 'gre', 'hopopt', 'icmp', 'igmp', 'ip', 'ipip', 'ipv6-encap', 'ipv6-frag', 'ipv6-icmp', 'icmpv6', 'ipv6-nonxt', 'ipv6-opts', 'ipv6-route', 'ospf', 'pgm', 'rsvp', 'sctp', 'tcp', 'udp', 'udplite', 'vrrp']): + raise ValueError("must be one of enum values ('any', 'ah', 'dccp', 'egp', 'esp', 'gre', 'hopopt', 'icmp', 'igmp', 'ip', 'ipip', 'ipv6-encap', 'ipv6-frag', 'ipv6-icmp', 'icmpv6', 'ipv6-nonxt', 'ipv6-opts', 'ipv6-route', 'ospf', 'pgm', 'rsvp', 'sctp', 'tcp', 'udp', 'udplite', 'vrrp')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/create_update_compliance_response.py b/hyperstack/models/create_update_compliance_response.py index 5a4dc41..0b57e5c 100644 --- a/hyperstack/models/create_update_compliance_response.py +++ b/hyperstack/models/create_update_compliance_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.compliance_model_fields import ComplianceModelFields from typing import Optional, Set @@ -32,11 +32,11 @@ class CreateUpdateComplianceResponse(BaseModel): compliance: Optional[ComplianceModelFields] = None __properties: ClassVar[List[str]] = ["status", "message", "compliance"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/permission_payload.py b/hyperstack/models/create_update_permission_payload.py similarity index 84% rename from hyperstack/models/permission_payload.py rename to hyperstack/models/create_update_permission_payload.py index 34df146..395d8c1 100644 --- a/hyperstack/models/permission_payload.py +++ b/hyperstack/models/create_update_permission_payload.py @@ -17,14 +17,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class PermissionPayload(BaseModel): +class CreateUpdatePermissionPayload(BaseModel): """ - PermissionPayload + CreateUpdatePermissionPayload """ # noqa: E501 resource: StrictStr permission: StrictStr @@ -32,11 +32,11 @@ class PermissionPayload(BaseModel): endpoint: StrictStr __properties: ClassVar[List[str]] = ["resource", "permission", "method", "endpoint"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PermissionPayload from a JSON string""" + """Create an instance of CreateUpdatePermissionPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PermissionPayload from a dict""" + """Create an instance of CreateUpdatePermissionPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/permission_response.py b/hyperstack/models/create_update_permission_response_model.py similarity index 84% rename from hyperstack/models/permission_response.py rename to hyperstack/models/create_update_permission_response_model.py index 36d2cbd..f5b132f 100644 --- a/hyperstack/models/permission_response.py +++ b/hyperstack/models/create_update_permission_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.permission_fields import PermissionFields from typing import Optional, Set from typing_extensions import Self -class PermissionResponse(BaseModel): +class CreateUpdatePermissionResponseModel(BaseModel): """ - PermissionResponse + CreateUpdatePermissionResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None permission: Optional[PermissionFields] = None __properties: ClassVar[List[str]] = ["status", "message", "permission"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PermissionResponse from a JSON string""" + """Create an instance of CreateUpdatePermissionResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PermissionResponse from a dict""" + """Create an instance of CreateUpdatePermissionResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/policy_payload.py b/hyperstack/models/create_update_policy_payload.py similarity index 84% rename from hyperstack/models/policy_payload.py rename to hyperstack/models/create_update_policy_payload.py index d463711..e3d641c 100644 --- a/hyperstack/models/policy_payload.py +++ b/hyperstack/models/create_update_policy_payload.py @@ -17,14 +17,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class PolicyPayload(BaseModel): +class CreateUpdatePolicyPayload(BaseModel): """ - PolicyPayload + CreateUpdatePolicyPayload """ # noqa: E501 name: StrictStr description: StrictStr @@ -32,11 +32,11 @@ class PolicyPayload(BaseModel): permissions: List[StrictInt] __properties: ClassVar[List[str]] = ["name", "description", "is_public", "permissions"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PolicyPayload from a JSON string""" + """Create an instance of CreateUpdatePolicyPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PolicyPayload from a dict""" + """Create an instance of CreateUpdatePolicyPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/policy_response.py b/hyperstack/models/create_update_policy_response_model.py similarity index 85% rename from hyperstack/models/policy_response.py rename to hyperstack/models/create_update_policy_response_model.py index ed2b470..a8d819c 100644 --- a/hyperstack/models/policy_response.py +++ b/hyperstack/models/create_update_policy_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.policy_fields import PolicyFields from typing import Optional, Set from typing_extensions import Self -class PolicyResponse(BaseModel): +class CreateUpdatePolicyResponseModel(BaseModel): """ - PolicyResponse + CreateUpdatePolicyResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None policy: Optional[PolicyFields] = None __properties: ClassVar[List[str]] = ["status", "message", "policy"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PolicyResponse from a JSON string""" + """Create an instance of CreateUpdatePolicyResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PolicyResponse from a dict""" + """Create an instance of CreateUpdatePolicyResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/rbac_role_payload.py b/hyperstack/models/create_update_rbac_role_payload.py similarity index 84% rename from hyperstack/models/rbac_role_payload.py rename to hyperstack/models/create_update_rbac_role_payload.py index fc00f2e..fbe8577 100644 --- a/hyperstack/models/rbac_role_payload.py +++ b/hyperstack/models/create_update_rbac_role_payload.py @@ -17,14 +17,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class RBACRolePayload(BaseModel): +class CreateUpdateRbacRolePayload(BaseModel): """ - RBACRolePayload + CreateUpdateRbacRolePayload """ # noqa: E501 name: StrictStr description: StrictStr @@ -32,11 +32,11 @@ class RBACRolePayload(BaseModel): permissions: Optional[List[StrictInt]] = None __properties: ClassVar[List[str]] = ["name", "description", "policies", "permissions"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RBACRolePayload from a JSON string""" + """Create an instance of CreateUpdateRbacRolePayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RBACRolePayload from a dict""" + """Create an instance of CreateUpdateRbacRolePayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/create_volume_payload.py b/hyperstack/models/create_volume_payload.py index 95a8455..21936d8 100644 --- a/hyperstack/models/create_volume_payload.py +++ b/hyperstack/models/create_volume_payload.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -26,20 +27,20 @@ class CreateVolumePayload(BaseModel): """ CreateVolumePayload """ # noqa: E501 - name: Optional[StrictStr] = None - environment_name: Optional[StrictStr] = None - description: Optional[StrictStr] = None - volume_type: Optional[StrictStr] = None - size: Optional[StrictInt] = None - image_id: Optional[StrictInt] = None - callback_url: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The name of the volume being created.") + environment_name: StrictStr = Field(description="The name of the [environment](https://infrahub-doc.nexgencloud.com/docs/features/environments-available-features) within which the volume is being created.") + description: StrictStr = Field(description="A brief description or comment about the volume.") + volume_type: StrictStr = Field(description="Specifies the type of volume being created, which determines the storage technology it will use. Call the \"[List volume types](https://infrahub-api-doc.nexgencloud.com/#get-/core/volumes)\" endpoint to retrieve a list of available volume model types.") + size: StrictInt = Field(description="The size of the volume in GB. 1048576GB storage capacity per volume.") + image_id: Optional[StrictInt] = Field(default=None, description="The ID of the operating system image that will be associated with the volume. By providing an `image_id` in the create volume request, you will create a bootable volume.") + callback_url: Optional[Annotated[str, Field(strict=True, max_length=250)]] = Field(default=None, description="A URL that can be attached to the volume you are creating. This `callback_url` will post any action events that occur to your volume to the provided URL.") __properties: ClassVar[List[str]] = ["name", "environment_name", "description", "volume_type", "size", "image_id", "callback_url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/customer_contract_detail_response_model.py b/hyperstack/models/customer_contract_detail_response_model.py new file mode 100644 index 0000000..5259605 --- /dev/null +++ b/hyperstack/models/customer_contract_detail_response_model.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.customer_contract_fields import CustomerContractFields +from typing import Optional, Set +from typing_extensions import Self + +class CustomerContractDetailResponseModel(BaseModel): + """ + CustomerContractDetailResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + contracts: Optional[CustomerContractFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "contracts"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomerContractDetailResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of contracts + if self.contracts: + _dict['contracts'] = self.contracts.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomerContractDetailResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "contracts": CustomerContractFields.from_dict(obj["contracts"]) if obj.get("contracts") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/customer_contract_fields.py b/hyperstack/models/customer_contract_fields.py new file mode 100644 index 0000000..0105a44 --- /dev/null +++ b/hyperstack/models/customer_contract_fields.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.discount_plan_fields import DiscountPlanFields +from typing import Optional, Set +from typing_extensions import Self + +class CustomerContractFields(BaseModel): + """ + CustomerContractFields + """ # noqa: E501 + id: Optional[StrictInt] = None + org_id: Optional[StrictInt] = None + description: Optional[StrictStr] = None + start_date: Optional[datetime] = None + end_date: Optional[datetime] = None + expiration_policy: Optional[StrictInt] = None + status: Optional[StrictStr] = None + discounts: Optional[List[DiscountPlanFields]] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "org_id", "description", "start_date", "end_date", "expiration_policy", "status", "discounts", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomerContractFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in discounts (list) + _items = [] + if self.discounts: + for _item in self.discounts: + if _item: + _items.append(_item.to_dict()) + _dict['discounts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomerContractFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "org_id": obj.get("org_id"), + "description": obj.get("description"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "expiration_policy": obj.get("expiration_policy"), + "status": obj.get("status"), + "discounts": [DiscountPlanFields.from_dict(_item) for _item in obj["discounts"]] if obj.get("discounts") is not None else None, + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/customer_fields.py b/hyperstack/models/customer_fields.py new file mode 100644 index 0000000..84592f5 --- /dev/null +++ b/hyperstack/models/customer_fields.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class CustomerFields(BaseModel): + """ + CustomerFields + """ # noqa: E501 + id: Optional[StrictInt] = None + plan_type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "plan_type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomerFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomerFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "plan_type": obj.get("plan_type") + }) + return _obj + + diff --git a/hyperstack/models/customer_payload.py b/hyperstack/models/customer_payload.py new file mode 100644 index 0000000..b982398 --- /dev/null +++ b/hyperstack/models/customer_payload.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class CustomerPayload(BaseModel): + """ + CustomerPayload + """ # noqa: E501 + id: StrictInt + plan_type: StrictStr + __properties: ClassVar[List[str]] = ["id", "plan_type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CustomerPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CustomerPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "plan_type": obj.get("plan_type") + }) + return _obj + + diff --git a/hyperstack/models/dashboard_info_response.py b/hyperstack/models/dashboard_info_response.py index 4a4ed4e..1a6dff9 100644 --- a/hyperstack/models/dashboard_info_response.py +++ b/hyperstack/models/dashboard_info_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.overview_info import OverviewInfo from typing import Optional, Set @@ -32,11 +32,11 @@ class DashboardInfoResponse(BaseModel): overview: Optional[OverviewInfo] = None __properties: ClassVar[List[str]] = ["status", "message", "overview"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/deployment_fields.py b/hyperstack/models/deployment_fields.py index 3f7534b..bde2f60 100644 --- a/hyperstack/models/deployment_fields.py +++ b/hyperstack/models/deployment_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -35,11 +35,11 @@ class DeploymentFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "template", "status", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/deployment_fieldsforstartdeployments.py b/hyperstack/models/deployment_fieldsforstartdeployments.py index 447c331..2f86e63 100644 --- a/hyperstack/models/deployment_fieldsforstartdeployments.py +++ b/hyperstack/models/deployment_fieldsforstartdeployments.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -36,11 +36,11 @@ class DeploymentFieldsforstartdeployments(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "template", "status", "variables", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/deployments.py b/hyperstack/models/deployments.py index 9a1f229..b177023 100644 --- a/hyperstack/models/deployments.py +++ b/hyperstack/models/deployments.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.deployment_fields import DeploymentFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Deployments(BaseModel): deployments: Optional[List[DeploymentFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "deployments"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/detach_volumes.py b/hyperstack/models/detach_volumes.py index 758e37d..5ce544b 100644 --- a/hyperstack/models/detach_volumes.py +++ b/hyperstack/models/detach_volumes.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.attach_volume_fields import AttachVolumeFields from typing import Optional, Set @@ -32,11 +32,11 @@ class DetachVolumes(BaseModel): volume_attachments: Optional[List[AttachVolumeFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "volume_attachments"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/detach_volumes_payload.py b/hyperstack/models/detach_volumes_payload.py index dd6ff78..e679497 100644 --- a/hyperstack/models/detach_volumes_payload.py +++ b/hyperstack/models/detach_volumes_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class DetachVolumesPayload(BaseModel): volume_ids: Optional[List[StrictInt]] = None __properties: ClassVar[List[str]] = ["volume_ids"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/discount_entity_model.py b/hyperstack/models/discount_entity_model.py new file mode 100644 index 0000000..cfa27e9 --- /dev/null +++ b/hyperstack/models/discount_entity_model.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.discount_plan_fields import DiscountPlanFields +from typing import Optional, Set +from typing_extensions import Self + +class DiscountEntityModel(BaseModel): + """ + DiscountEntityModel + """ # noqa: E501 + entity: Optional[StrictStr] = None + data: Optional[List[DiscountPlanFields]] = None + __properties: ClassVar[List[str]] = ["entity", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DiscountEntityModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DiscountEntityModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entity": obj.get("entity"), + "data": [DiscountPlanFields.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/discount_fields.py b/hyperstack/models/discount_fields.py new file mode 100644 index 0000000..fcbb921 --- /dev/null +++ b/hyperstack/models/discount_fields.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DiscountFields(BaseModel): + """ + DiscountFields + """ # noqa: E501 + org_id: Optional[StrictInt] = None + org_name: Optional[StrictStr] = None + plan_type: Optional[StrictStr] = None + vm_id: Optional[StrictInt] = None + vm_name: Optional[StrictStr] = None + end_date: Optional[datetime] = None + discount_status: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["org_id", "org_name", "plan_type", "vm_id", "vm_name", "end_date", "discount_status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DiscountFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DiscountFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "org_id": obj.get("org_id"), + "org_name": obj.get("org_name"), + "plan_type": obj.get("plan_type"), + "vm_id": obj.get("vm_id"), + "vm_name": obj.get("vm_name"), + "end_date": obj.get("end_date"), + "discount_status": obj.get("discount_status") + }) + return _obj + + diff --git a/hyperstack/models/discount_plan_fields.py b/hyperstack/models/discount_plan_fields.py new file mode 100644 index 0000000..aaa99c5 --- /dev/null +++ b/hyperstack/models/discount_plan_fields.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class DiscountPlanFields(BaseModel): + """ + DiscountPlanFields + """ # noqa: E501 + id: Optional[StrictInt] = None + resource_id: Optional[StrictInt] = None + resource_name: Optional[StrictStr] = None + resource_count: Optional[StrictInt] = None + discount_type: Optional[StrictStr] = None + discount_code: Optional[StrictStr] = None + discount_percent: Optional[Union[StrictFloat, StrictInt]] = None + discount_amount: Optional[Union[StrictFloat, StrictInt]] = None + discount_status: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "resource_id", "resource_name", "resource_count", "discount_type", "discount_code", "discount_percent", "discount_amount", "discount_status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DiscountPlanFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DiscountPlanFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "resource_id": obj.get("resource_id"), + "resource_name": obj.get("resource_name"), + "resource_count": obj.get("resource_count"), + "discount_type": obj.get("discount_type"), + "discount_code": obj.get("discount_code"), + "discount_percent": obj.get("discount_percent"), + "discount_amount": obj.get("discount_amount"), + "discount_status": obj.get("discount_status") + }) + return _obj + + diff --git a/hyperstack/models/discount_resource_fields.py b/hyperstack/models/discount_resource_fields.py index e4a69e9..e1a958c 100644 --- a/hyperstack/models/discount_resource_fields.py +++ b/hyperstack/models/discount_resource_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class DiscountResourceFields(BaseModel): discount_percent: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["resource_id", "discount_percent"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/editlabelofanexisting_vm_payload.py b/hyperstack/models/editlabelofanexisting_vm_payload.py new file mode 100644 index 0000000..bfc03c2 --- /dev/null +++ b/hyperstack/models/editlabelofanexisting_vm_payload.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EditlabelofanexistingVMPayload(BaseModel): + """ + EditlabelofanexistingVMPayload + """ # noqa: E501 + labels: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EditlabelofanexistingVMPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EditlabelofanexistingVMPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "labels": obj.get("labels") + }) + return _obj + + diff --git a/hyperstack/models/environment.py b/hyperstack/models/environment.py index 207ed54..5db6ec5 100644 --- a/hyperstack/models/environment.py +++ b/hyperstack/models/environment.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.environment_fields import EnvironmentFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Environment(BaseModel): environment: Optional[EnvironmentFields] = None __properties: ClassVar[List[str]] = ["status", "message", "environment"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/environment_fields.py b/hyperstack/models/environment_fields.py index ac996f7..f9e5c59 100644 --- a/hyperstack/models/environment_fields.py +++ b/hyperstack/models/environment_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class EnvironmentFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "region", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/environment_fieldsfor_volume.py b/hyperstack/models/environment_fieldsfor_volume.py index 507cf17..520adad 100644 --- a/hyperstack/models/environment_fieldsfor_volume.py +++ b/hyperstack/models/environment_fieldsfor_volume.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class EnvironmentFieldsforVolume(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/environments.py b/hyperstack/models/environments.py index f911521..ff7c06e 100644 --- a/hyperstack/models/environments.py +++ b/hyperstack/models/environments.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.environment_fields import EnvironmentFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Environments(BaseModel): environments: Optional[List[EnvironmentFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "environments"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/error_response_model.py b/hyperstack/models/error_response_model.py index 3cd8b7e..da2a16a 100644 --- a/hyperstack/models/error_response_model.py +++ b/hyperstack/models/error_response_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class ErrorResponseModel(BaseModel): error_reason: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message", "error_reason"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/excludebillingpostpayload.py b/hyperstack/models/excludebillingpostpayload.py new file mode 100644 index 0000000..bfa590c --- /dev/null +++ b/hyperstack/models/excludebillingpostpayload.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Excludebillingpostpayload(BaseModel): + """ + Excludebillingpostpayload + """ # noqa: E501 + resource_id: StrictInt + exclude: StrictBool + __properties: ClassVar[List[str]] = ["resource_id", "exclude"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Excludebillingpostpayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Excludebillingpostpayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource_id": obj.get("resource_id"), + "exclude": obj.get("exclude") + }) + return _obj + + diff --git a/hyperstack/models/excludebillingpostresponse.py b/hyperstack/models/excludebillingpostresponse.py new file mode 100644 index 0000000..37f60cd --- /dev/null +++ b/hyperstack/models/excludebillingpostresponse.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.excludebillingpostpayload import Excludebillingpostpayload +from typing import Optional, Set +from typing_extensions import Self + +class Excludebillingpostresponse(BaseModel): + """ + Excludebillingpostresponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + data: Optional[Excludebillingpostpayload] = None + __properties: ClassVar[List[str]] = ["status", "message", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Excludebillingpostresponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Excludebillingpostresponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "data": Excludebillingpostpayload.from_dict(obj["data"]) if obj.get("data") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/organization_info_model.py b/hyperstack/models/firewall_attachment_model.py similarity index 67% rename from hyperstack/models/organization_info_model.py rename to hyperstack/models/firewall_attachment_model.py index 4a77664..b687b13 100644 --- a/hyperstack/models/organization_info_model.py +++ b/hyperstack/models/firewall_attachment_model.py @@ -18,27 +18,27 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.organization_user_model import OrganizationUserModel +from hyperstack.models.firewall_attachment_vm_model import FirewallAttachmentVMModel from typing import Optional, Set from typing_extensions import Self -class OrganizationInfoModel(BaseModel): +class FirewallAttachmentModel(BaseModel): """ - OrganizationInfoModel + FirewallAttachmentModel """ # noqa: E501 - id: StrictInt - name: StrictStr - users: Optional[List[OrganizationUserModel]] = None + id: Optional[StrictInt] = None + status: Optional[StrictStr] = None + vm: Optional[FirewallAttachmentVMModel] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["id", "name", "users", "created_at"] + __properties: ClassVar[List[str]] = ["id", "status", "vm", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationInfoModel from a JSON string""" + """Create an instance of FirewallAttachmentModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,18 +73,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in users (list) - _items = [] - if self.users: - for _item in self.users: - if _item: - _items.append(_item.to_dict()) - _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of vm + if self.vm: + _dict['vm'] = self.vm.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationInfoModel from a dict""" + """Create an instance of FirewallAttachmentModel from a dict""" if obj is None: return None @@ -93,8 +89,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), - "name": obj.get("name"), - "users": [OrganizationUserModel.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "status": obj.get("status"), + "vm": FirewallAttachmentVMModel.from_dict(obj["vm"]) if obj.get("vm") is not None else None, "created_at": obj.get("created_at") }) return _obj diff --git a/hyperstack/models/firewall_attachment_vm_model.py b/hyperstack/models/firewall_attachment_vm_model.py new file mode 100644 index 0000000..7048ae0 --- /dev/null +++ b/hyperstack/models/firewall_attachment_vm_model.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirewallAttachmentVMModel(BaseModel): + """ + FirewallAttachmentVMModel + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + flavor: Optional[StrictStr] = None + environment: Optional[StrictStr] = None + status: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "name", "flavor", "environment", "status", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallAttachmentVMModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallAttachmentVMModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "flavor": obj.get("flavor"), + "environment": obj.get("environment"), + "status": obj.get("status"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/firewall_detail_fields.py b/hyperstack/models/firewall_detail_fields.py new file mode 100644 index 0000000..d2e6207 --- /dev/null +++ b/hyperstack/models/firewall_detail_fields.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.firewall_attachment_model import FirewallAttachmentModel +from hyperstack.models.firewall_environment_fields import FirewallEnvironmentFields +from hyperstack.models.security_group_rule_fields import SecurityGroupRuleFields +from typing import Optional, Set +from typing_extensions import Self + +class FirewallDetailFields(BaseModel): + """ + FirewallDetailFields + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + environment: Optional[FirewallEnvironmentFields] = None + status: Optional[StrictStr] = None + created_at: Optional[datetime] = None + rules: Optional[List[SecurityGroupRuleFields]] = None + attachments: Optional[List[FirewallAttachmentModel]] = None + __properties: ClassVar[List[str]] = ["id", "name", "description", "environment", "status", "created_at", "rules", "attachments"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallDetailFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of environment + if self.environment: + _dict['environment'] = self.environment.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in rules (list) + _items = [] + if self.rules: + for _item in self.rules: + if _item: + _items.append(_item.to_dict()) + _dict['rules'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) + _items = [] + if self.attachments: + for _item in self.attachments: + if _item: + _items.append(_item.to_dict()) + _dict['attachments'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallDetailFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "environment": FirewallEnvironmentFields.from_dict(obj["environment"]) if obj.get("environment") is not None else None, + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "rules": [SecurityGroupRuleFields.from_dict(_item) for _item in obj["rules"]] if obj.get("rules") is not None else None, + "attachments": [FirewallAttachmentModel.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/firewall_detail_response.py b/hyperstack/models/firewall_detail_response.py new file mode 100644 index 0000000..b49cd81 --- /dev/null +++ b/hyperstack/models/firewall_detail_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.firewall_detail_fields import FirewallDetailFields +from typing import Optional, Set +from typing_extensions import Self + +class FirewallDetailResponse(BaseModel): + """ + FirewallDetailResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + firewall: Optional[FirewallDetailFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "firewall"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallDetailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of firewall + if self.firewall: + _dict['firewall'] = self.firewall.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "firewall": FirewallDetailFields.from_dict(obj["firewall"]) if obj.get("firewall") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/firewall_environment_fields.py b/hyperstack/models/firewall_environment_fields.py new file mode 100644 index 0000000..705a772 --- /dev/null +++ b/hyperstack/models/firewall_environment_fields.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FirewallEnvironmentFields(BaseModel): + """ + FirewallEnvironmentFields + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + region: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name", "region"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallEnvironmentFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallEnvironmentFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "region": obj.get("region") + }) + return _obj + + diff --git a/hyperstack/models/firewall_fields.py b/hyperstack/models/firewall_fields.py new file mode 100644 index 0000000..78b2840 --- /dev/null +++ b/hyperstack/models/firewall_fields.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.firewall_environment_fields import FirewallEnvironmentFields +from typing import Optional, Set +from typing_extensions import Self + +class FirewallFields(BaseModel): + """ + FirewallFields + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + environment: Optional[FirewallEnvironmentFields] = None + status: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "name", "description", "environment", "status", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of environment + if self.environment: + _dict['environment'] = self.environment.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "environment": FirewallEnvironmentFields.from_dict(obj["environment"]) if obj.get("environment") is not None else None, + "status": obj.get("status"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/firewall_response.py b/hyperstack/models/firewall_response.py new file mode 100644 index 0000000..7da410e --- /dev/null +++ b/hyperstack/models/firewall_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.firewall_fields import FirewallFields +from typing import Optional, Set +from typing_extensions import Self + +class FirewallResponse(BaseModel): + """ + FirewallResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + firewall: Optional[FirewallFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "firewall"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of firewall + if self.firewall: + _dict['firewall'] = self.firewall.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "firewall": FirewallFields.from_dict(obj["firewall"]) if obj.get("firewall") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/firewall_rule.py b/hyperstack/models/firewall_rule.py new file mode 100644 index 0000000..01d1aad --- /dev/null +++ b/hyperstack/models/firewall_rule.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.security_group_rule_fields import SecurityGroupRuleFields +from typing import Optional, Set +from typing_extensions import Self + +class FirewallRule(BaseModel): + """ + FirewallRule + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + firewall_rule: Optional[SecurityGroupRuleFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "firewall_rule"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallRule from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of firewall_rule + if self.firewall_rule: + _dict['firewall_rule'] = self.firewall_rule.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallRule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "firewall_rule": SecurityGroupRuleFields.from_dict(obj["firewall_rule"]) if obj.get("firewall_rule") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/firewalls_list_response.py b/hyperstack/models/firewalls_list_response.py new file mode 100644 index 0000000..4ae8c89 --- /dev/null +++ b/hyperstack/models/firewalls_list_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.firewall_detail_fields import FirewallDetailFields +from typing import Optional, Set +from typing_extensions import Self + +class FirewallsListResponse(BaseModel): + """ + FirewallsListResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + firewalls: Optional[List[FirewallDetailFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "firewalls"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FirewallsListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in firewalls (list) + _items = [] + if self.firewalls: + for _item in self.firewalls: + if _item: + _items.append(_item.to_dict()) + _dict['firewalls'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FirewallsListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "firewalls": [FirewallDetailFields.from_dict(_item) for _item in obj["firewalls"]] if obj.get("firewalls") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/flavor_admin_response.py b/hyperstack/models/flavor_admin_response.py new file mode 100644 index 0000000..b2fc8dc --- /dev/null +++ b/hyperstack/models/flavor_admin_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.flavor_admin_response_flavors import FlavorAdminResponseFlavors +from typing import Optional, Set +from typing_extensions import Self + +class FlavorAdminResponse(BaseModel): + """ + FlavorAdminResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + flavor: Optional[FlavorAdminResponseFlavors] = None + __properties: ClassVar[List[str]] = ["status", "message", "flavor"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorAdminResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of flavor + if self.flavor: + _dict['flavor'] = self.flavor.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorAdminResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "flavor": FlavorAdminResponseFlavors.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/flavor_admin_response_flavors.py b/hyperstack/models/flavor_admin_response_flavors.py new file mode 100644 index 0000000..9d30009 --- /dev/null +++ b/hyperstack/models/flavor_admin_response_flavors.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class FlavorAdminResponseFlavors(BaseModel): + """ + FlavorAdminResponseFlavors + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + description: Optional[StrictStr] = None + openstack_id: Optional[StrictStr] = None + region_id: Optional[StrictInt] = None + region: Optional[StrictStr] = None + cpu: Optional[StrictInt] = None + ram: Optional[Union[StrictFloat, StrictInt]] = None + disk: Optional[StrictInt] = None + ephemeral: Optional[StrictInt] = None + gpu: Optional[StrictStr] = None + gpu_count: Optional[StrictInt] = None + order: Optional[StrictInt] = None + is_public: Optional[StrictBool] = None + is_custom: Optional[StrictBool] = None + status: Optional[StrictStr] = None + organizations: List[StrictInt] + flavors: Optional[List[StrictStr]] = None + projects: Optional[List[StrictStr]] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "name", "description", "openstack_id", "region_id", "region", "cpu", "ram", "disk", "ephemeral", "gpu", "gpu_count", "order", "is_public", "is_custom", "status", "organizations", "flavors", "projects", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorAdminResponseFlavors from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorAdminResponseFlavors from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "openstack_id": obj.get("openstack_id"), + "region_id": obj.get("region_id"), + "region": obj.get("region"), + "cpu": obj.get("cpu"), + "ram": obj.get("ram"), + "disk": obj.get("disk"), + "ephemeral": obj.get("ephemeral"), + "gpu": obj.get("gpu"), + "gpu_count": obj.get("gpu_count"), + "order": obj.get("order"), + "is_public": obj.get("is_public"), + "is_custom": obj.get("is_custom"), + "status": obj.get("status"), + "organizations": obj.get("organizations"), + "flavors": obj.get("flavors"), + "projects": obj.get("projects"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/flavor_detail_response.py b/hyperstack/models/flavor_detail_response.py new file mode 100644 index 0000000..5f2b3d6 --- /dev/null +++ b/hyperstack/models/flavor_detail_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_flavor_detail_fields import AdminFlavorDetailFields +from typing import Optional, Set +from typing_extensions import Self + +class FlavorDetailResponse(BaseModel): + """ + FlavorDetailResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + flavor: Optional[AdminFlavorDetailFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "flavor"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorDetailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of flavor + if self.flavor: + _dict['flavor'] = self.flavor.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "flavor": AdminFlavorDetailFields.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/flavor_fields.py b/hyperstack/models/flavor_fields.py index 7940b5b..7bd4d4a 100644 --- a/hyperstack/models/flavor_fields.py +++ b/hyperstack/models/flavor_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -33,17 +33,18 @@ class FlavorFields(BaseModel): cpu: Optional[StrictInt] = None ram: Optional[Union[StrictFloat, StrictInt]] = None disk: Optional[StrictInt] = None + ephemeral: Optional[StrictInt] = None gpu: Optional[StrictStr] = None gpu_count: Optional[StrictInt] = None stock_available: Optional[StrictBool] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["id", "name", "region_name", "cpu", "ram", "disk", "gpu", "gpu_count", "stock_available", "created_at"] + __properties: ClassVar[List[str]] = ["id", "name", "region_name", "cpu", "ram", "disk", "ephemeral", "gpu", "gpu_count", "stock_available", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -96,6 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "cpu": obj.get("cpu"), "ram": obj.get("ram"), "disk": obj.get("disk"), + "ephemeral": obj.get("ephemeral"), "gpu": obj.get("gpu"), "gpu_count": obj.get("gpu_count"), "stock_available": obj.get("stock_available"), diff --git a/hyperstack/models/flavor_item_get_response.py b/hyperstack/models/flavor_item_get_response.py index 65e39d1..fdd3875 100644 --- a/hyperstack/models/flavor_item_get_response.py +++ b/hyperstack/models/flavor_item_get_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.flavor_fields import FlavorFields from typing import Optional, Set @@ -32,11 +32,11 @@ class FlavorItemGetResponse(BaseModel): flavors: Optional[List[FlavorFields]] = None __properties: ClassVar[List[str]] = ["gpu", "region_name", "flavors"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/flavor_list_response.py b/hyperstack/models/flavor_list_response.py index f652021..b5cdf2d 100644 --- a/hyperstack/models/flavor_list_response.py +++ b/hyperstack/models/flavor_list_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.flavor_item_get_response import FlavorItemGetResponse from typing import Optional, Set @@ -32,11 +32,11 @@ class FlavorListResponse(BaseModel): data: Optional[List[FlavorItemGetResponse]] = None __properties: ClassVar[List[str]] = ["status", "message", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/flavor_object_fields.py b/hyperstack/models/flavor_object_fields.py index 90ef2d2..8b79539 100644 --- a/hyperstack/models/flavor_object_fields.py +++ b/hyperstack/models/flavor_object_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class FlavorObjectFields(BaseModel): gpu_count: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["cpu", "ram", "disk", "gpu", "gpu_count"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/flavor_payload.py b/hyperstack/models/flavor_payload.py index 5a7395b..32030ee 100644 --- a/hyperstack/models/flavor_payload.py +++ b/hyperstack/models/flavor_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -36,11 +36,11 @@ class FlavorPayload(BaseModel): is_public: StrictBool __properties: ClassVar[List[str]] = ["name", "region_name", "cpu", "ram", "disk", "gpu", "gpu_count", "is_public"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/flavor_response.py b/hyperstack/models/flavor_response.py index 84c6666..eff3627 100644 --- a/hyperstack/models/flavor_response.py +++ b/hyperstack/models/flavor_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.flavor_fields import FlavorFields from typing import Optional, Set @@ -32,11 +32,11 @@ class FlavorResponse(BaseModel): flavor: Optional[FlavorFields] = None __properties: ClassVar[List[str]] = ["status", "message", "flavor"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/flavor_vm_fields.py b/hyperstack/models/flavor_vm_fields.py new file mode 100644 index 0000000..ccbbf6a --- /dev/null +++ b/hyperstack/models/flavor_vm_fields.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FlavorVMFields(BaseModel): + """ + FlavorVMFields + """ # noqa: E501 + id: Optional[StrictInt] = None + openstack_id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + host: Optional[StrictStr] = None + org_id: Optional[StrictInt] = None + status: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "openstack_id", "name", "host", "org_id", "status", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorVMFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorVMFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "openstack_id": obj.get("openstack_id"), + "name": obj.get("name"), + "host": obj.get("host"), + "org_id": obj.get("org_id"), + "status": obj.get("status"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/flavor_vms_response.py b/hyperstack/models/flavor_vms_response.py new file mode 100644 index 0000000..85abd86 --- /dev/null +++ b/hyperstack/models/flavor_vms_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.flavor_vm_fields import FlavorVMFields +from typing import Optional, Set +from typing_extensions import Self + +class FlavorVMsResponse(BaseModel): + """ + FlavorVMsResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + flavor_vms: Optional[List[FlavorVMFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "flavor_vms"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FlavorVMsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in flavor_vms (list) + _items = [] + if self.flavor_vms: + for _item in self.flavor_vms: + if _item: + _items.append(_item.to_dict()) + _dict['flavor_vms'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FlavorVMsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "flavor_vms": [FlavorVMFields.from_dict(_item) for _item in obj["flavor_vms"]] if obj.get("flavor_vms") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/future_node_model.py b/hyperstack/models/future_node_model.py index 9fb9168..5ed50a3 100644 --- a/hyperstack/models/future_node_model.py +++ b/hyperstack/models/future_node_model.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.future_node_stock_model import FutureNodeStockModel from typing import Optional, Set @@ -31,15 +31,15 @@ class FutureNodeModel(BaseModel): id: Optional[StrictInt] = None openstack_name: Optional[StrictStr] = None nexgen_name: Optional[StrictStr] = None - expected_provision_date: datetime + expected_provision_date: datetime = Field(description="Date and time in the format YYYY-MM-DD HH:mm:ss") stocks: Optional[List[FutureNodeStockModel]] = None __properties: ClassVar[List[str]] = ["id", "openstack_name", "nexgen_name", "expected_provision_date", "stocks"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/future_node_response_model.py b/hyperstack/models/future_node_response_model.py index 6c405b1..cab86f0 100644 --- a/hyperstack/models/future_node_response_model.py +++ b/hyperstack/models/future_node_response_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.future_node_model import FutureNodeModel from typing import Optional, Set @@ -31,11 +31,11 @@ class FutureNodeResponseModel(BaseModel): nodes: Optional[List[FutureNodeModel]] = None __properties: ClassVar[List[str]] = ["region", "nodes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/future_node_stock_model.py b/hyperstack/models/future_node_stock_model.py index 7f38270..9e802f3 100644 --- a/hyperstack/models/future_node_stock_model.py +++ b/hyperstack/models/future_node_stock_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class FutureNodeStockModel(BaseModel): expected_amount: StrictInt __properties: ClassVar[List[str]] = ["id", "name", "expected_amount"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/future_node_update_model.py b/hyperstack/models/future_node_update_model.py index 863a780..9e3f470 100644 --- a/hyperstack/models/future_node_update_model.py +++ b/hyperstack/models/future_node_update_model.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -34,11 +34,11 @@ class FutureNodeUpdateModel(BaseModel): expected_provision_date: datetime __properties: ClassVar[List[str]] = ["id", "region_id", "openstack_name", "nexgen_name", "expected_provision_date"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/future_nodes_stock_model.py b/hyperstack/models/future_nodes_stock_model.py index 44c074c..1ff2aff 100644 --- a/hyperstack/models/future_nodes_stock_model.py +++ b/hyperstack/models/future_nodes_stock_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.future_node_response_model import FutureNodeResponseModel from typing import Optional, Set @@ -30,11 +30,11 @@ class FutureNodesStockModel(BaseModel): future_stocks: Optional[List[FutureNodeResponseModel]] = None __properties: ClassVar[List[str]] = ["future_stocks"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/api_keygeneration.py b/hyperstack/models/generate_api_key_response_model.py similarity index 84% rename from hyperstack/models/api_keygeneration.py rename to hyperstack/models/generate_api_key_response_model.py index 7ef6e12..74eec4c 100644 --- a/hyperstack/models/api_keygeneration.py +++ b/hyperstack/models/generate_api_key_response_model.py @@ -17,25 +17,25 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class APIKeygeneration(BaseModel): +class GenerateApiKeyResponseModel(BaseModel): """ - APIKeygeneration + GenerateApiKeyResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None api_key: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message", "api_key"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of APIKeygeneration from a JSON string""" + """Create an instance of GenerateApiKeyResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of APIKeygeneration from a dict""" + """Create an instance of GenerateApiKeyResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/get_all_discount_for_all_organization_response.py b/hyperstack/models/get_all_discount_for_all_organization_response.py index 2b2b18f..1ed52ee 100644 --- a/hyperstack/models/get_all_discount_for_all_organization_response.py +++ b/hyperstack/models/get_all_discount_for_all_organization_response.py @@ -17,9 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.insert_discount_plan_fields import InsertDiscountPlanFields +from hyperstack.models.get_all_discounts_fields import GetAllDiscountsFields from typing import Optional, Set from typing_extensions import Self @@ -29,14 +29,14 @@ class GetAllDiscountForAllOrganizationResponse(BaseModel): """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - discount_plans: Optional[List[InsertDiscountPlanFields]] = None + discount_plans: Optional[List[GetAllDiscountsFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "discount_plans"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "discount_plans": [InsertDiscountPlanFields.from_dict(_item) for _item in obj["discount_plans"]] if obj.get("discount_plans") is not None else None + "discount_plans": [GetAllDiscountsFields.from_dict(_item) for _item in obj["discount_plans"]] if obj.get("discount_plans") is not None else None }) return _obj diff --git a/hyperstack/models/get_all_discounts_fields.py b/hyperstack/models/get_all_discounts_fields.py new file mode 100644 index 0000000..889681b --- /dev/null +++ b/hyperstack/models/get_all_discounts_fields.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.discount_resource_fields import DiscountResourceFields +from typing import Optional, Set +from typing_extensions import Self + +class GetAllDiscountsFields(BaseModel): + """ + GetAllDiscountsFields + """ # noqa: E501 + org_id: Optional[StrictInt] = None + org_name: Optional[StrictStr] = None + start_date: Optional[datetime] = None + end_date: Optional[datetime] = None + discount_status: Optional[StrictStr] = None + discount_resources: Optional[List[DiscountResourceFields]] = None + __properties: ClassVar[List[str]] = ["org_id", "org_name", "start_date", "end_date", "discount_status", "discount_resources"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetAllDiscountsFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in discount_resources (list) + _items = [] + if self.discount_resources: + for _item in self.discount_resources: + if _item: + _items.append(_item.to_dict()) + _dict['discount_resources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetAllDiscountsFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "org_id": obj.get("org_id"), + "org_name": obj.get("org_name"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "discount_status": obj.get("discount_status"), + "discount_resources": [DiscountResourceFields.from_dict(_item) for _item in obj["discount_resources"]] if obj.get("discount_resources") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/api_key.py b/hyperstack/models/get_api_key_response_model.py similarity index 80% rename from hyperstack/models/api_key.py rename to hyperstack/models/get_api_key_response_model.py index 47658ee..9e85f21 100644 --- a/hyperstack/models/api_key.py +++ b/hyperstack/models/get_api_key_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.api_key_fields import APIKeyFields +from hyperstack.models.api_key_fields import ApiKeyFields from typing import Optional, Set from typing_extensions import Self -class APIKey(BaseModel): +class GetApiKeyResponseModel(BaseModel): """ - APIKey + GetApiKeyResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - api_key: Optional[APIKeyFields] = None + api_key: Optional[ApiKeyFields] = None __properties: ClassVar[List[str]] = ["status", "message", "api_key"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of APIKey from a JSON string""" + """Create an instance of GetApiKeyResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of APIKey from a dict""" + """Create an instance of GetApiKeyResponseModel from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "api_key": APIKeyFields.from_dict(obj["api_key"]) if obj.get("api_key") is not None else None + "api_key": ApiKeyFields.from_dict(obj["api_key"]) if obj.get("api_key") is not None else None }) return _obj diff --git a/hyperstack/models/get_contract_detail_response_model.py b/hyperstack/models/get_contract_detail_response_model.py new file mode 100644 index 0000000..52c648e --- /dev/null +++ b/hyperstack/models/get_contract_detail_response_model.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_get_contract_detail_fields import AdminGetContractDetailFields +from hyperstack.models.discount_plan_fields import DiscountPlanFields +from typing import Optional, Set +from typing_extensions import Self + +class GetContractDetailResponseModel(BaseModel): + """ + GetContractDetailResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + contract: Optional[AdminGetContractDetailFields] = None + discount_plans: Optional[List[DiscountPlanFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "contract", "discount_plans"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetContractDetailResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of contract + if self.contract: + _dict['contract'] = self.contract.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in discount_plans (list) + _items = [] + if self.discount_plans: + for _item in self.discount_plans: + if _item: + _items.append(_item.to_dict()) + _dict['discount_plans'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetContractDetailResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "contract": AdminGetContractDetailFields.from_dict(obj["contract"]) if obj.get("contract") is not None else None, + "discount_plans": [DiscountPlanFields.from_dict(_item) for _item in obj["discount_plans"]] if obj.get("discount_plans") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/get_contract_events_response_model.py b/hyperstack/models/get_contract_events_response_model.py new file mode 100644 index 0000000..eb1d4cb --- /dev/null +++ b/hyperstack/models/get_contract_events_response_model.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_contract_event_fields import AdminContractEventFields +from typing import Optional, Set +from typing_extensions import Self + +class GetContractEventsResponseModel(BaseModel): + """ + GetContractEventsResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + contract_events: Optional[List[AdminContractEventFields]] = None + count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["status", "message", "contract_events", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetContractEventsResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in contract_events (list) + _items = [] + if self.contract_events: + for _item in self.contract_events: + if _item: + _items.append(_item.to_dict()) + _dict['contract_events'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetContractEventsResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "contract_events": [AdminContractEventFields.from_dict(_item) for _item in obj["contract_events"]] if obj.get("contract_events") is not None else None, + "count": obj.get("count") + }) + return _obj + + diff --git a/hyperstack/models/get_contracts_list_response_model.py b/hyperstack/models/get_contracts_list_response_model.py new file mode 100644 index 0000000..18962dc --- /dev/null +++ b/hyperstack/models/get_contracts_list_response_model.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.admin_contract_fields import AdminContractFields +from typing import Optional, Set +from typing_extensions import Self + +class GetContractsListResponseModel(BaseModel): + """ + GetContractsListResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + contracts: Optional[List[AdminContractFields]] = None + count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["status", "message", "contracts", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetContractsListResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in contracts (list) + _items = [] + if self.contracts: + for _item in self.contracts: + if _item: + _items.append(_item.to_dict()) + _dict['contracts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetContractsListResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "contracts": [AdminContractFields.from_dict(_item) for _item in obj["contracts"]] if obj.get("contracts") is not None else None, + "count": obj.get("count") + }) + return _obj + + diff --git a/hyperstack/models/get_customer_contracts_list_response_model.py b/hyperstack/models/get_customer_contracts_list_response_model.py new file mode 100644 index 0000000..034feae --- /dev/null +++ b/hyperstack/models/get_customer_contracts_list_response_model.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.customer_contract_fields import CustomerContractFields +from typing import Optional, Set +from typing_extensions import Self + +class GetCustomerContractsListResponseModel(BaseModel): + """ + GetCustomerContractsListResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + contracts: Optional[List[CustomerContractFields]] = None + count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["status", "message", "contracts", "count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetCustomerContractsListResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in contracts (list) + _items = [] + if self.contracts: + for _item in self.contracts: + if _item: + _items.append(_item.to_dict()) + _dict['contracts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetCustomerContractsListResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "contracts": [CustomerContractFields.from_dict(_item) for _item in obj["contracts"]] if obj.get("contracts") is not None else None, + "count": obj.get("count") + }) + return _obj + + diff --git a/hyperstack/models/get_discount_detail_response.py b/hyperstack/models/get_discount_detail_response.py new file mode 100644 index 0000000..4ab0809 --- /dev/null +++ b/hyperstack/models/get_discount_detail_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.discount_entity_model import DiscountEntityModel +from typing import Optional, Set +from typing_extensions import Self + +class GetDiscountDetailResponse(BaseModel): + """ + GetDiscountDetailResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + discounts_entity: Optional[DiscountEntityModel] = None + __properties: ClassVar[List[str]] = ["status", "message", "discounts_entity"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDiscountDetailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of discounts_entity + if self.discounts_entity: + _dict['discounts_entity'] = self.discounts_entity.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDiscountDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "discounts_entity": DiscountEntityModel.from_dict(obj["discounts_entity"]) if obj.get("discounts_entity") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/get_discount_response.py b/hyperstack/models/get_discount_response.py new file mode 100644 index 0000000..8a9862a --- /dev/null +++ b/hyperstack/models/get_discount_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.discount_fields import DiscountFields +from typing import Optional, Set +from typing_extensions import Self + +class GetDiscountResponse(BaseModel): + """ + GetDiscountResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + discount_entites: Optional[List[DiscountFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "discount_entites"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetDiscountResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in discount_entites (list) + _items = [] + if self.discount_entites: + for _item in self.discount_entites: + if _item: + _items.append(_item.to_dict()) + _dict['discount_entites'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetDiscountResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "discount_entites": [DiscountFields.from_dict(_item) for _item in obj["discount_entites"]] if obj.get("discount_entites") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/get_entity_discount_detail_response.py b/hyperstack/models/get_entity_discount_detail_response.py new file mode 100644 index 0000000..d9d9fcb --- /dev/null +++ b/hyperstack/models/get_entity_discount_detail_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.discount_plan_fields import DiscountPlanFields +from typing import Optional, Set +from typing_extensions import Self + +class GetEntityDiscountDetailResponse(BaseModel): + """ + GetEntityDiscountDetailResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + organization: Optional[List[DiscountPlanFields]] = None + virtual_machine: Optional[List[DiscountPlanFields]] = Field(default=None, alias="virtual-machine") + __properties: ClassVar[List[str]] = ["status", "message", "organization", "virtual-machine"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetEntityDiscountDetailResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in organization (list) + _items = [] + if self.organization: + for _item in self.organization: + if _item: + _items.append(_item.to_dict()) + _dict['organization'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in virtual_machine (list) + _items = [] + if self.virtual_machine: + for _item in self.virtual_machine: + if _item: + _items.append(_item.to_dict()) + _dict['virtual-machine'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetEntityDiscountDetailResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "organization": [DiscountPlanFields.from_dict(_item) for _item in obj["organization"]] if obj.get("organization") is not None else None, + "virtual-machine": [DiscountPlanFields.from_dict(_item) for _item in obj["virtual-machine"]] if obj.get("virtual-machine") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/invites.py b/hyperstack/models/get_invites_response_model.py similarity index 86% rename from hyperstack/models/invites.py rename to hyperstack/models/get_invites_response_model.py index 3913f60..e20101f 100644 --- a/hyperstack/models/invites.py +++ b/hyperstack/models/get_invites_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.invite_fields import InviteFields from typing import Optional, Set from typing_extensions import Self -class Invites(BaseModel): +class GetInvitesResponseModel(BaseModel): """ - Invites + GetInvitesResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None invites: Optional[List[InviteFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "invites"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Invites from a JSON string""" + """Create an instance of GetInvitesResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Invites from a dict""" + """Create an instance of GetInvitesResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/organization_resource_response.py b/hyperstack/models/get_organization_response_model.py similarity index 78% rename from hyperstack/models/organization_resource_response.py rename to hyperstack/models/get_organization_response_model.py index 7b5bc1a..e9ee844 100644 --- a/hyperstack/models/organization_resource_response.py +++ b/hyperstack/models/get_organization_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.organization_resources import OrganizationResources +from hyperstack.models.organization_fields import OrganizationFields from typing import Optional, Set from typing_extensions import Self -class OrganizationResourceResponse(BaseModel): +class GetOrganizationResponseModel(BaseModel): """ - OrganizationResourceResponse + GetOrganizationResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - organization: Optional[OrganizationResources] = None + organization: Optional[OrganizationFields] = None __properties: ClassVar[List[str]] = ["status", "message", "organization"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationResourceResponse from a JSON string""" + """Create an instance of GetOrganizationResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationResourceResponse from a dict""" + """Create an instance of GetOrganizationResponseModel from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "organization": OrganizationResources.from_dict(obj["organization"]) if obj.get("organization") is not None else None + "organization": OrganizationFields.from_dict(obj["organization"]) if obj.get("organization") is not None else None }) return _obj diff --git a/hyperstack/models/permissions.py b/hyperstack/models/get_permissions_response_model.py similarity index 86% rename from hyperstack/models/permissions.py rename to hyperstack/models/get_permissions_response_model.py index 6b1a43e..748ead9 100644 --- a/hyperstack/models/permissions.py +++ b/hyperstack/models/get_permissions_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.permission_fields import PermissionFields from typing import Optional, Set from typing_extensions import Self -class Permissions(BaseModel): +class GetPermissionsResponseModel(BaseModel): """ - Permissions + GetPermissionsResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None permissions: Optional[List[PermissionFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "permissions"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Permissions from a JSON string""" + """Create an instance of GetPermissionsResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Permissions from a dict""" + """Create an instance of GetPermissionsResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/policies.py b/hyperstack/models/get_policies_response_model.py similarity index 86% rename from hyperstack/models/policies.py rename to hyperstack/models/get_policies_response_model.py index 28100f9..433abe1 100644 --- a/hyperstack/models/policies.py +++ b/hyperstack/models/get_policies_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.policy_fields import PolicyFields from typing import Optional, Set from typing_extensions import Self -class Policies(BaseModel): +class GetPoliciesResponseModel(BaseModel): """ - Policies + GetPoliciesResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None policies: Optional[List[PolicyFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "policies"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Policies from a JSON string""" + """Create an instance of GetPoliciesResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Policies from a dict""" + """Create an instance of GetPoliciesResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/rbac_roles.py b/hyperstack/models/get_rbac_roles_response_model.py similarity index 81% rename from hyperstack/models/rbac_roles.py rename to hyperstack/models/get_rbac_roles_response_model.py index 965256e..f3d3656 100644 --- a/hyperstack/models/rbac_roles.py +++ b/hyperstack/models/get_rbac_roles_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.rbac_role_fields import RBACRoleFields +from hyperstack.models.rbac_role_fields import RbacRoleFields from typing import Optional, Set from typing_extensions import Self -class RBACRoles(BaseModel): +class GetRbacRolesResponseModel(BaseModel): """ - RBACRoles + GetRbacRolesResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - roles: Optional[List[RBACRoleFields]] = None + roles: Optional[List[RbacRoleFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "roles"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RBACRoles from a JSON string""" + """Create an instance of GetRbacRolesResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RBACRoles from a dict""" + """Create an instance of GetRbacRolesResponseModel from a dict""" if obj is None: return None @@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "roles": [RBACRoleFields.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None + "roles": [RbacRoleFields.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None }) return _obj diff --git a/hyperstack/models/get_token.py b/hyperstack/models/get_token_payload.py similarity index 85% rename from hyperstack/models/get_token.py rename to hyperstack/models/get_token_payload.py index 91e7132..c343d35 100644 --- a/hyperstack/models/get_token.py +++ b/hyperstack/models/get_token_payload.py @@ -17,24 +17,24 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class GetToken(BaseModel): +class GetTokenPayload(BaseModel): """ - GetToken + GetTokenPayload """ # noqa: E501 session_id: StrictStr callback_code: StrictStr __properties: ClassVar[List[str]] = ["session_id", "callback_code"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetToken from a JSON string""" + """Create an instance of GetTokenPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetToken from a dict""" + """Create an instance of GetTokenPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/permissionsfor_user_permission.py b/hyperstack/models/get_user_permissions_response_model.py similarity index 77% rename from hyperstack/models/permissionsfor_user_permission.py rename to hyperstack/models/get_user_permissions_response_model.py index ca58f10..5c84cfd 100644 --- a/hyperstack/models/permissionsfor_user_permission.py +++ b/hyperstack/models/get_user_permissions_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.permission_fieldsfor_user_permission import PermissionFieldsforUserPermission +from hyperstack.models.user_permission_fields import UserPermissionFields from typing import Optional, Set from typing_extensions import Self -class PermissionsforUserPermission(BaseModel): +class GetUserPermissionsResponseModel(BaseModel): """ - PermissionsforUserPermission + GetUserPermissionsResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - permissions: Optional[List[PermissionFieldsforUserPermission]] = None + permissions: Optional[List[UserPermissionFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "permissions"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PermissionsforUserPermission from a JSON string""" + """Create an instance of GetUserPermissionsResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PermissionsforUserPermission from a dict""" + """Create an instance of GetUserPermissionsResponseModel from a dict""" if obj is None: return None @@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "permissions": [PermissionFieldsforUserPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + "permissions": [UserPermissionFields.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None }) return _obj diff --git a/hyperstack/models/get_version_response.py b/hyperstack/models/get_version_response.py new file mode 100644 index 0000000..ca5c158 --- /dev/null +++ b/hyperstack/models/get_version_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GetVersionResponse(BaseModel): + """ + GetVersionResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + version: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "message", "version"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetVersionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetVersionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "version": obj.get("version") + }) + return _obj + + diff --git a/hyperstack/models/getcreditandthresholdinfo.py b/hyperstack/models/getcreditandthresholdinfo.py index 0b3e70a..3193040 100644 --- a/hyperstack/models/getcreditandthresholdinfo.py +++ b/hyperstack/models/getcreditandthresholdinfo.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class Getcreditandthresholdinfo(BaseModel): can_create_instance: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["credit", "threshold", "can_create_instance"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/getcreditandthresholdinfoinresponse.py b/hyperstack/models/getcreditandthresholdinfoinresponse.py index 5f03e90..04c8108 100644 --- a/hyperstack/models/getcreditandthresholdinfoinresponse.py +++ b/hyperstack/models/getcreditandthresholdinfoinresponse.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.getcreditandthresholdinfo import Getcreditandthresholdinfo from typing import Optional, Set @@ -32,11 +32,11 @@ class Getcreditandthresholdinfoinresponse(BaseModel): data: Optional[Getcreditandthresholdinfo] = None __properties: ClassVar[List[str]] = ["message", "status", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/gpu.py b/hyperstack/models/gpu.py index 2b58584..6d69eaf 100644 --- a/hyperstack/models/gpu.py +++ b/hyperstack/models/gpu.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.gpu_fields import GPUFields from typing import Optional, Set @@ -32,11 +32,11 @@ class GPU(BaseModel): gpu: Optional[GPUFields] = None __properties: ClassVar[List[str]] = ["status", "message", "gpu"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/gpu_fields.py b/hyperstack/models/gpu_fields.py index 7adbf28..02b80a2 100644 --- a/hyperstack/models/gpu_fields.py +++ b/hyperstack/models/gpu_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.gpu_region_fields import GPURegionFields from typing import Optional, Set @@ -36,11 +36,11 @@ class GPUFields(BaseModel): updated_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "regions", "example_metadata", "created_at", "updated_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/gpu_list.py b/hyperstack/models/gpu_list.py index 432950a..9b17bf7 100644 --- a/hyperstack/models/gpu_list.py +++ b/hyperstack/models/gpu_list.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.gpu_fields import GPUFields from typing import Optional, Set @@ -32,11 +32,11 @@ class GPUList(BaseModel): gpu_list: Optional[List[GPUFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "gpu_list"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/gpu_region_fields.py b/hyperstack/models/gpu_region_fields.py index 0bf3d2d..459aaed 100644 --- a/hyperstack/models/gpu_region_fields.py +++ b/hyperstack/models/gpu_region_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class GPURegionFields(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/image_fields.py b/hyperstack/models/image_fields.py index 822b360..77b1ec6 100644 --- a/hyperstack/models/image_fields.py +++ b/hyperstack/models/image_fields.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.lable_resonse import LableResonse from typing import Optional, Set from typing_extensions import Self @@ -33,13 +34,16 @@ class ImageFields(BaseModel): version: Optional[StrictStr] = None size: Optional[StrictInt] = None display_size: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name", "region_name", "type", "version", "size", "display_size"] + description: Optional[StrictStr] = None + labels: Optional[List[LableResonse]] = None + is_public: Optional[StrictBool] = None + __properties: ClassVar[List[str]] = ["id", "name", "region_name", "type", "version", "size", "display_size", "description", "labels", "is_public"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -74,6 +78,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in labels (list) + _items = [] + if self.labels: + for _item in self.labels: + if _item: + _items.append(_item.to_dict()) + _dict['labels'] = _items return _dict @classmethod @@ -92,7 +103,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type"), "version": obj.get("version"), "size": obj.get("size"), - "display_size": obj.get("display_size") + "display_size": obj.get("display_size"), + "description": obj.get("description"), + "labels": [LableResonse.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None, + "is_public": obj.get("is_public") }) return _obj diff --git a/hyperstack/models/image_get_response.py b/hyperstack/models/image_get_response.py index c877ea1..38d966f 100644 --- a/hyperstack/models/image_get_response.py +++ b/hyperstack/models/image_get_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.image_fields import ImageFields from typing import Optional, Set @@ -33,11 +33,11 @@ class ImageGetResponse(BaseModel): images: Optional[List[ImageFields]] = None __properties: ClassVar[List[str]] = ["region_name", "type", "logo", "images"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/image_logos.py b/hyperstack/models/image_logos.py index 4714558..b381742 100644 --- a/hyperstack/models/image_logos.py +++ b/hyperstack/models/image_logos.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.logo_get_response import LogoGetResponse from typing import Optional, Set @@ -32,11 +32,11 @@ class ImageLogos(BaseModel): logos: Optional[List[LogoGetResponse]] = None __properties: ClassVar[List[str]] = ["status", "message", "logos"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/images.py b/hyperstack/models/images.py index 237e125..3bf4f14 100644 --- a/hyperstack/models/images.py +++ b/hyperstack/models/images.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.image_get_response import ImageGetResponse from typing import Optional, Set @@ -32,11 +32,11 @@ class Images(BaseModel): images: Optional[List[ImageGetResponse]] = None __properties: ClassVar[List[str]] = ["status", "message", "images"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/import_keypair_payload.py b/hyperstack/models/import_keypair_payload.py index 4227c6e..c8a9a09 100644 --- a/hyperstack/models/import_keypair_payload.py +++ b/hyperstack/models/import_keypair_payload.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -26,16 +27,16 @@ class ImportKeypairPayload(BaseModel): """ ImportKeypairPayload """ # noqa: E501 - name: StrictStr - environment_name: StrictStr - public_key: StrictStr + name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The name of the key pair that is being created.") + environment_name: StrictStr = Field(description="The name of the environment where the key pair is being created.") + public_key: StrictStr = Field(description="The public key that is being used to import an SSH key pair.") __properties: ClassVar[List[str]] = ["name", "environment_name", "public_key"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/import_keypair_response.py b/hyperstack/models/import_keypair_response.py index 6866356..3531f47 100644 --- a/hyperstack/models/import_keypair_response.py +++ b/hyperstack/models/import_keypair_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.keypair_fields import KeypairFields from typing import Optional, Set @@ -32,11 +32,11 @@ class ImportKeypairResponse(BaseModel): keypair: Optional[KeypairFields] = None __properties: ClassVar[List[str]] = ["status", "message", "keypair"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/infrahub_resource_object_response.py b/hyperstack/models/infrahub_resource_object_response.py index 6cf08a2..6df71bb 100644 --- a/hyperstack/models/infrahub_resource_object_response.py +++ b/hyperstack/models/infrahub_resource_object_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from hyperstack.models.pricebook_resource_object_response import PricebookResourceObjectResponse from typing import Optional, Set @@ -41,11 +41,11 @@ class InfrahubResourceObjectResponse(BaseModel): nexgen_actual_price: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["type", "name", "infrahub_id", "status", "host", "resources", "price", "actual_price", "host_price", "actual_host_price", "nexgen_price", "nexgen_actual_price"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/insert_discount_plan_fields.py b/hyperstack/models/insert_discount_plan_fields.py index b72e175..c62f3dc 100644 --- a/hyperstack/models/insert_discount_plan_fields.py +++ b/hyperstack/models/insert_discount_plan_fields.py @@ -18,8 +18,9 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.customer_fields import CustomerFields from hyperstack.models.discount_resource_fields import DiscountResourceFields from typing import Optional, Set from typing_extensions import Self @@ -28,19 +29,18 @@ class InsertDiscountPlanFields(BaseModel): """ InsertDiscountPlanFields """ # noqa: E501 - org_id: Optional[StrictInt] = None - org_name: Optional[StrictStr] = None + customers: Optional[List[CustomerFields]] = None discount_resources: Optional[List[DiscountResourceFields]] = None start_date: Optional[datetime] = None end_date: Optional[datetime] = None discount_status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["org_id", "org_name", "discount_resources", "start_date", "end_date", "discount_status"] + __properties: ClassVar[List[str]] = ["customers", "discount_resources", "start_date", "end_date", "discount_status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -75,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in customers (list) + _items = [] + if self.customers: + for _item in self.customers: + if _item: + _items.append(_item.to_dict()) + _dict['customers'] = _items # override the default output from pydantic by calling `to_dict()` of each item in discount_resources (list) _items = [] if self.discount_resources: @@ -94,8 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "org_id": obj.get("org_id"), - "org_name": obj.get("org_name"), + "customers": [CustomerFields.from_dict(_item) for _item in obj["customers"]] if obj.get("customers") is not None else None, "discount_resources": [DiscountResourceFields.from_dict(_item) for _item in obj["discount_resources"]] if obj.get("discount_resources") is not None else None, "start_date": obj.get("start_date"), "end_date": obj.get("end_date"), diff --git a/hyperstack/models/instance.py b/hyperstack/models/instance.py index c2c5d14..b3889cc 100644 --- a/hyperstack/models/instance.py +++ b/hyperstack/models/instance.py @@ -17,9 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.instance_admin_fields import InstanceAdminFields +from hyperstack.models.instance_fields import InstanceFields from typing import Optional, Set from typing_extensions import Self @@ -29,14 +29,14 @@ class Instance(BaseModel): """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - instance: Optional[InstanceAdminFields] = None + instance: Optional[InstanceFields] = None __properties: ClassVar[List[str]] = ["status", "message", "instance"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "instance": InstanceAdminFields.from_dict(obj["instance"]) if obj.get("instance") is not None else None + "instance": InstanceFields.from_dict(obj["instance"]) if obj.get("instance") is not None else None }) return _obj diff --git a/hyperstack/models/instance_admin.py b/hyperstack/models/instance_admin.py new file mode 100644 index 0000000..15263d4 --- /dev/null +++ b/hyperstack/models/instance_admin.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.instance_admin_fields import InstanceAdminFields +from typing import Optional, Set +from typing_extensions import Self + +class InstanceAdmin(BaseModel): + """ + InstanceAdmin + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + instance: Optional[InstanceAdminFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "instance"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of instance + if self.instance: + _dict['instance'] = self.instance.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "instance": InstanceAdminFields.from_dict(obj["instance"]) if obj.get("instance") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/instance_admin_fields.py b/hyperstack/models/instance_admin_fields.py index 9292df8..f9883e8 100644 --- a/hyperstack/models/instance_admin_fields.py +++ b/hyperstack/models/instance_admin_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.instance_environment_fields import InstanceEnvironmentFields from hyperstack.models.instance_flavor_fields import InstanceFlavorFields @@ -39,6 +39,7 @@ class InstanceAdminFields(BaseModel): environment: Optional[InstanceEnvironmentFields] = None image: Optional[InstanceImageFields] = None flavor: Optional[InstanceFlavorFields] = None + os: Optional[StrictStr] = None keypair: Optional[InstanceKeypairFields] = None volume_attachments: Optional[List[VolumeAttachmentFields]] = None security_rules: Optional[List[SecurityRulesFieldsforInstance]] = None @@ -47,15 +48,19 @@ class InstanceAdminFields(BaseModel): fixed_ip: Optional[StrictStr] = None floating_ip: Optional[StrictStr] = None floating_ip_status: Optional[StrictStr] = None + locked: Optional[StrictBool] = None + contract_id: Optional[StrictInt] = None created_at: Optional[datetime] = None + labels: Optional[List[StrictStr]] = None openstack_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name", "status", "environment", "image", "flavor", "keypair", "volume_attachments", "security_rules", "power_state", "vm_state", "fixed_ip", "floating_ip", "floating_ip_status", "created_at", "openstack_id"] + host: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "name", "status", "environment", "image", "flavor", "os", "keypair", "volume_attachments", "security_rules", "power_state", "vm_state", "fixed_ip", "floating_ip", "floating_ip_status", "locked", "contract_id", "created_at", "labels", "openstack_id", "host"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -134,6 +139,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "environment": InstanceEnvironmentFields.from_dict(obj["environment"]) if obj.get("environment") is not None else None, "image": InstanceImageFields.from_dict(obj["image"]) if obj.get("image") is not None else None, "flavor": InstanceFlavorFields.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None, + "os": obj.get("os"), "keypair": InstanceKeypairFields.from_dict(obj["keypair"]) if obj.get("keypair") is not None else None, "volume_attachments": [VolumeAttachmentFields.from_dict(_item) for _item in obj["volume_attachments"]] if obj.get("volume_attachments") is not None else None, "security_rules": [SecurityRulesFieldsforInstance.from_dict(_item) for _item in obj["security_rules"]] if obj.get("security_rules") is not None else None, @@ -142,8 +148,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "fixed_ip": obj.get("fixed_ip"), "floating_ip": obj.get("floating_ip"), "floating_ip_status": obj.get("floating_ip_status"), + "locked": obj.get("locked"), + "contract_id": obj.get("contract_id"), "created_at": obj.get("created_at"), - "openstack_id": obj.get("openstack_id") + "labels": obj.get("labels"), + "openstack_id": obj.get("openstack_id"), + "host": obj.get("host") }) return _obj diff --git a/hyperstack/models/instance_environment_fields.py b/hyperstack/models/instance_environment_fields.py index e1b0d1f..da84925 100644 --- a/hyperstack/models/instance_environment_fields.py +++ b/hyperstack/models/instance_environment_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,16 +26,17 @@ class InstanceEnvironmentFields(BaseModel): """ InstanceEnvironmentFields """ # noqa: E501 + id: Optional[StrictInt] = None name: Optional[StrictStr] = None org_id: Optional[StrictInt] = None region: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["name", "org_id", "region"] + __properties: ClassVar[List[str]] = ["id", "name", "org_id", "region"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -82,6 +83,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "id": obj.get("id"), "name": obj.get("name"), "org_id": obj.get("org_id"), "region": obj.get("region") diff --git a/hyperstack/models/instance_events.py b/hyperstack/models/instance_events.py index da9a251..1dece6f 100644 --- a/hyperstack/models/instance_events.py +++ b/hyperstack/models/instance_events.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.instance_events_fields import InstanceEventsFields from typing import Optional, Set @@ -32,11 +32,11 @@ class InstanceEvents(BaseModel): instance_events: Optional[List[InstanceEventsFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "instance_events"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/instance_events_fields.py b/hyperstack/models/instance_events_fields.py index e22244a..4869292 100644 --- a/hyperstack/models/instance_events_fields.py +++ b/hyperstack/models/instance_events_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -37,11 +37,11 @@ class InstanceEventsFields(BaseModel): message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["instance_id", "user_id", "org_id", "time", "type", "reason", "object", "message"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/instance_fields.py b/hyperstack/models/instance_fields.py new file mode 100644 index 0000000..404cebc --- /dev/null +++ b/hyperstack/models/instance_fields.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.instance_environment_fields import InstanceEnvironmentFields +from hyperstack.models.instance_flavor_fields import InstanceFlavorFields +from hyperstack.models.instance_image_fields import InstanceImageFields +from hyperstack.models.instance_keypair_fields import InstanceKeypairFields +from hyperstack.models.security_rules_fieldsfor_instance import SecurityRulesFieldsforInstance +from hyperstack.models.volume_attachment_fields import VolumeAttachmentFields +from typing import Optional, Set +from typing_extensions import Self + +class InstanceFields(BaseModel): + """ + InstanceFields + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + status: Optional[StrictStr] = None + environment: Optional[InstanceEnvironmentFields] = None + image: Optional[InstanceImageFields] = None + flavor: Optional[InstanceFlavorFields] = None + os: Optional[StrictStr] = None + keypair: Optional[InstanceKeypairFields] = None + volume_attachments: Optional[List[VolumeAttachmentFields]] = None + security_rules: Optional[List[SecurityRulesFieldsforInstance]] = None + power_state: Optional[StrictStr] = None + vm_state: Optional[StrictStr] = None + fixed_ip: Optional[StrictStr] = None + floating_ip: Optional[StrictStr] = None + floating_ip_status: Optional[StrictStr] = None + locked: Optional[StrictBool] = None + contract_id: Optional[StrictInt] = None + created_at: Optional[datetime] = None + labels: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["id", "name", "status", "environment", "image", "flavor", "os", "keypair", "volume_attachments", "security_rules", "power_state", "vm_state", "fixed_ip", "floating_ip", "floating_ip_status", "locked", "contract_id", "created_at", "labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstanceFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of environment + if self.environment: + _dict['environment'] = self.environment.to_dict() + # override the default output from pydantic by calling `to_dict()` of image + if self.image: + _dict['image'] = self.image.to_dict() + # override the default output from pydantic by calling `to_dict()` of flavor + if self.flavor: + _dict['flavor'] = self.flavor.to_dict() + # override the default output from pydantic by calling `to_dict()` of keypair + if self.keypair: + _dict['keypair'] = self.keypair.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in volume_attachments (list) + _items = [] + if self.volume_attachments: + for _item in self.volume_attachments: + if _item: + _items.append(_item.to_dict()) + _dict['volume_attachments'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in security_rules (list) + _items = [] + if self.security_rules: + for _item in self.security_rules: + if _item: + _items.append(_item.to_dict()) + _dict['security_rules'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstanceFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "status": obj.get("status"), + "environment": InstanceEnvironmentFields.from_dict(obj["environment"]) if obj.get("environment") is not None else None, + "image": InstanceImageFields.from_dict(obj["image"]) if obj.get("image") is not None else None, + "flavor": InstanceFlavorFields.from_dict(obj["flavor"]) if obj.get("flavor") is not None else None, + "os": obj.get("os"), + "keypair": InstanceKeypairFields.from_dict(obj["keypair"]) if obj.get("keypair") is not None else None, + "volume_attachments": [VolumeAttachmentFields.from_dict(_item) for _item in obj["volume_attachments"]] if obj.get("volume_attachments") is not None else None, + "security_rules": [SecurityRulesFieldsforInstance.from_dict(_item) for _item in obj["security_rules"]] if obj.get("security_rules") is not None else None, + "power_state": obj.get("power_state"), + "vm_state": obj.get("vm_state"), + "fixed_ip": obj.get("fixed_ip"), + "floating_ip": obj.get("floating_ip"), + "floating_ip_status": obj.get("floating_ip_status"), + "locked": obj.get("locked"), + "contract_id": obj.get("contract_id"), + "created_at": obj.get("created_at"), + "labels": obj.get("labels") + }) + return _obj + + diff --git a/hyperstack/models/instance_flavor_fields.py b/hyperstack/models/instance_flavor_fields.py index bc501f8..d081a84 100644 --- a/hyperstack/models/instance_flavor_fields.py +++ b/hyperstack/models/instance_flavor_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -31,15 +31,16 @@ class InstanceFlavorFields(BaseModel): cpu: Optional[StrictInt] = None ram: Optional[Union[StrictFloat, StrictInt]] = None disk: Optional[StrictInt] = None + ephemeral: Optional[StrictInt] = None gpu: Optional[StrictStr] = None gpu_count: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["id", "name", "cpu", "ram", "disk", "gpu", "gpu_count"] + __properties: ClassVar[List[str]] = ["id", "name", "cpu", "ram", "disk", "ephemeral", "gpu", "gpu_count"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -91,6 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "cpu": obj.get("cpu"), "ram": obj.get("ram"), "disk": obj.get("disk"), + "ephemeral": obj.get("ephemeral"), "gpu": obj.get("gpu"), "gpu_count": obj.get("gpu_count") }) diff --git a/hyperstack/models/instance_image_fields.py b/hyperstack/models/instance_image_fields.py index dd63b6e..f810180 100644 --- a/hyperstack/models/instance_image_fields.py +++ b/hyperstack/models/instance_image_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class InstanceImageFields(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/instance_keypair_fields.py b/hyperstack/models/instance_keypair_fields.py index c9ebde8..43035eb 100644 --- a/hyperstack/models/instance_keypair_fields.py +++ b/hyperstack/models/instance_keypair_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class InstanceKeypairFields(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/instance_overview_fields.py b/hyperstack/models/instance_overview_fields.py index 502ea50..fee0f41 100644 --- a/hyperstack/models/instance_overview_fields.py +++ b/hyperstack/models/instance_overview_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class InstanceOverviewFields(BaseModel): cost_per_hour: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["count", "vcpus", "gpus", "ram", "cost_per_hour"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/instance_resize_payload.py b/hyperstack/models/instance_resize_payload.py index 4559cfb..8002860 100644 --- a/hyperstack/models/instance_resize_payload.py +++ b/hyperstack/models/instance_resize_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.flavor_object_fields import FlavorObjectFields from typing import Optional, Set @@ -31,11 +31,11 @@ class InstanceResizePayload(BaseModel): flavor: Optional[FlavorObjectFields] = None __properties: ClassVar[List[str]] = ["flavor_name", "flavor"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/instances.py b/hyperstack/models/instances.py index 236a02a..7291f51 100644 --- a/hyperstack/models/instances.py +++ b/hyperstack/models/instances.py @@ -17,9 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.instance_admin_fields import InstanceAdminFields +from hyperstack.models.instance_fields import InstanceFields from typing import Optional, Set from typing_extensions import Self @@ -29,15 +29,14 @@ class Instances(BaseModel): """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - instances: Optional[List[InstanceAdminFields]] = None - instance_count: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["status", "message", "instances", "instance_count"] + instances: Optional[List[InstanceFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "instances"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -93,8 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "instances": [InstanceAdminFields.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, - "instance_count": obj.get("instance_count") + "instances": [InstanceFields.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None }) return _obj diff --git a/hyperstack/models/instances_admin.py b/hyperstack/models/instances_admin.py new file mode 100644 index 0000000..ede046f --- /dev/null +++ b/hyperstack/models/instances_admin.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.instance_admin_fields import InstanceAdminFields +from typing import Optional, Set +from typing_extensions import Self + +class InstancesAdmin(BaseModel): + """ + InstancesAdmin + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + instances: Optional[List[InstanceAdminFields]] = None + instance_count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["status", "message", "instances", "instance_count"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstancesAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item in self.instances: + if _item: + _items.append(_item.to_dict()) + _dict['instances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstancesAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "instances": [InstanceAdminFields.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "instance_count": obj.get("instance_count") + }) + return _obj + + diff --git a/hyperstack/models/instances_summary_admin.py b/hyperstack/models/instances_summary_admin.py new file mode 100644 index 0000000..440a670 --- /dev/null +++ b/hyperstack/models/instances_summary_admin.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.instances_summary_fields import InstancesSummaryFields +from typing import Optional, Set +from typing_extensions import Self + +class InstancesSummaryAdmin(BaseModel): + """ + InstancesSummaryAdmin + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + instances: Optional[List[InstancesSummaryFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "instances"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstancesSummaryAdmin from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in instances (list) + _items = [] + if self.instances: + for _item in self.instances: + if _item: + _items.append(_item.to_dict()) + _dict['instances'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstancesSummaryAdmin from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "instances": [InstancesSummaryFields.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/instances_summary_fields.py b/hyperstack/models/instances_summary_fields.py new file mode 100644 index 0000000..27d822f --- /dev/null +++ b/hyperstack/models/instances_summary_fields.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class InstancesSummaryFields(BaseModel): + """ + InstancesSummaryFields + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + environment: Optional[StrictStr] = None + org_id: Optional[StrictInt] = None + environment_id: Optional[StrictInt] = None + image: Optional[StrictStr] = None + image_id: Optional[StrictInt] = None + flavor: Optional[StrictStr] = None + flavor_id: Optional[StrictInt] = None + keypair: Optional[StrictStr] = None + keypair_id: Optional[StrictInt] = None + fixed_ip: Optional[StrictStr] = None + floating_ip: Optional[StrictStr] = None + floating_ip_status: Optional[StrictStr] = None + status: Optional[StrictStr] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "name", "environment", "org_id", "environment_id", "image", "image_id", "flavor", "flavor_id", "keypair", "keypair_id", "fixed_ip", "floating_ip", "floating_ip_status", "status", "created_at", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InstancesSummaryFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InstancesSummaryFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "environment": obj.get("environment"), + "org_id": obj.get("org_id"), + "environment_id": obj.get("environment_id"), + "image": obj.get("image"), + "image_id": obj.get("image_id"), + "flavor": obj.get("flavor"), + "flavor_id": obj.get("flavor_id"), + "keypair": obj.get("keypair"), + "keypair_id": obj.get("keypair_id"), + "fixed_ip": obj.get("fixed_ip"), + "floating_ip": obj.get("floating_ip"), + "floating_ip_status": obj.get("floating_ip_status"), + "status": obj.get("status"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/hyperstack/models/internal_environment_fields.py b/hyperstack/models/internal_environment_fields.py index afc6be5..459d52e 100644 --- a/hyperstack/models/internal_environment_fields.py +++ b/hyperstack/models/internal_environment_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class InternalEnvironmentFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "region", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_instance_fields.py b/hyperstack/models/internal_instance_fields.py index 10596af..89bd819 100644 --- a/hyperstack/models/internal_instance_fields.py +++ b/hyperstack/models/internal_instance_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.internal_environment_fields import InternalEnvironmentFields from hyperstack.models.internal_instance_flavor_fields import InternalInstanceFlavorFields @@ -54,11 +54,11 @@ class InternalInstanceFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "openstack_id", "status", "environment", "image", "flavor", "keypair", "volume_attachments", "boot_source", "power_state", "vm_state", "fixed_ip", "floating_ip", "floating_ip_status", "user_data", "security_rules", "callback_url", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_instance_flavor_fields.py b/hyperstack/models/internal_instance_flavor_fields.py index 9d2db15..24719d2 100644 --- a/hyperstack/models/internal_instance_flavor_fields.py +++ b/hyperstack/models/internal_instance_flavor_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -38,11 +38,11 @@ class InternalInstanceFlavorFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "region_name", "cpu", "ram", "disk", "gpu", "gpu_count", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_instance_image_fields.py b/hyperstack/models/internal_instance_image_fields.py index b585d08..4140018 100644 --- a/hyperstack/models/internal_instance_image_fields.py +++ b/hyperstack/models/internal_instance_image_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class InternalInstanceImageFields(BaseModel): version: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "name", "region_name", "type", "version"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_instance_keypair_fields.py b/hyperstack/models/internal_instance_keypair_fields.py index 829a7a5..1b58443 100644 --- a/hyperstack/models/internal_instance_keypair_fields.py +++ b/hyperstack/models/internal_instance_keypair_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -35,11 +35,11 @@ class InternalInstanceKeypairFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "environment", "public_key", "fingerprint", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_instances_response.py b/hyperstack/models/internal_instances_response.py index da38cbe..d60e3ea 100644 --- a/hyperstack/models/internal_instances_response.py +++ b/hyperstack/models/internal_instances_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.internal_instance_fields import InternalInstanceFields from typing import Optional, Set @@ -32,11 +32,11 @@ class InternalInstancesResponse(BaseModel): instances: Optional[List[InternalInstanceFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "instances"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_security_rules_fields_for_instance.py b/hyperstack/models/internal_security_rules_fields_for_instance.py index 6e7468b..d157b8f 100644 --- a/hyperstack/models/internal_security_rules_fields_for_instance.py +++ b/hyperstack/models/internal_security_rules_fields_for_instance.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -38,11 +38,11 @@ class InternalSecurityRulesFieldsForInstance(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "direction", "protocol", "port_range_min", "port_range_max", "ethertype", "remote_ip_prefix", "status", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_volume_attachment_fields.py b/hyperstack/models/internal_volume_attachment_fields.py index c14433f..9b474dd 100644 --- a/hyperstack/models/internal_volume_attachment_fields.py +++ b/hyperstack/models/internal_volume_attachment_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.internal_volume_fields import InternalVolumeFields from typing import Optional, Set @@ -34,11 +34,11 @@ class InternalVolumeAttachmentFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["volume", "status", "device", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_volume_fields.py b/hyperstack/models/internal_volume_fields.py index 4119766..79eeaac 100644 --- a/hyperstack/models/internal_volume_fields.py +++ b/hyperstack/models/internal_volume_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class InternalVolumeFields(BaseModel): size: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "volume_type", "size"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/internal_volumes_response.py b/hyperstack/models/internal_volumes_response.py index 42f719d..1d13ddc 100644 --- a/hyperstack/models/internal_volumes_response.py +++ b/hyperstack/models/internal_volumes_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.internal_volume_fields import InternalVolumeFields from typing import Optional, Set @@ -32,11 +32,11 @@ class InternalVolumesResponse(BaseModel): volumes: Optional[List[InternalVolumeFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "volumes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/invite_fields.py b/hyperstack/models/invite_fields.py index df7cd98..70b5c70 100644 --- a/hyperstack/models/invite_fields.py +++ b/hyperstack/models/invite_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class InviteFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "email", "status", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/invite_user.py b/hyperstack/models/invite_user_payload.py similarity index 84% rename from hyperstack/models/invite_user.py rename to hyperstack/models/invite_user_payload.py index ebbf4ab..1153f58 100644 --- a/hyperstack/models/invite_user.py +++ b/hyperstack/models/invite_user_payload.py @@ -17,23 +17,23 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class InviteUser(BaseModel): +class InviteUserPayload(BaseModel): """ - InviteUser + InviteUserPayload """ # noqa: E501 email: StrictStr __properties: ClassVar[List[str]] = ["email"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InviteUser from a JSON string""" + """Create an instance of InviteUserPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InviteUser from a dict""" + """Create an instance of InviteUserPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/invite.py b/hyperstack/models/invite_user_response_model.py similarity index 86% rename from hyperstack/models/invite.py rename to hyperstack/models/invite_user_response_model.py index b3c81f2..065943c 100644 --- a/hyperstack/models/invite.py +++ b/hyperstack/models/invite_user_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.invite_fields import InviteFields from typing import Optional, Set from typing_extensions import Self -class Invite(BaseModel): +class InviteUserResponseModel(BaseModel): """ - Invite + InviteUserResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None invite: Optional[InviteFields] = None __properties: ClassVar[List[str]] = ["status", "message", "invite"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Invite from a JSON string""" + """Create an instance of InviteUserResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Invite from a dict""" + """Create an instance of InviteUserResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/keypair_fields.py b/hyperstack/models/keypair_fields.py index 43e3d88..79b4342 100644 --- a/hyperstack/models/keypair_fields.py +++ b/hyperstack/models/keypair_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -35,11 +35,11 @@ class KeypairFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "environment", "public_key", "fingerprint", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/keypairs.py b/hyperstack/models/keypairs.py index f422a13..949a047 100644 --- a/hyperstack/models/keypairs.py +++ b/hyperstack/models/keypairs.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.keypair_fields import KeypairFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Keypairs(BaseModel): keypairs: Optional[List[KeypairFields]] = Field(default=None, alias="Keypairs") __properties: ClassVar[List[str]] = ["status", "message", "Keypairs"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/lable_resonse.py b/hyperstack/models/lable_resonse.py new file mode 100644 index 0000000..7777eb3 --- /dev/null +++ b/hyperstack/models/lable_resonse.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class LableResonse(BaseModel): + """ + LableResonse + """ # noqa: E501 + id: Optional[StrictInt] = None + label: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LableResonse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LableResonse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "label": obj.get("label") + }) + return _obj + + diff --git a/hyperstack/models/lastdaycostfields.py b/hyperstack/models/lastdaycostfields.py index 2bba030..5889826 100644 --- a/hyperstack/models/lastdaycostfields.py +++ b/hyperstack/models/lastdaycostfields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -32,11 +32,11 @@ class Lastdaycostfields(BaseModel): total_cost: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["instances_cost", "volumes_cost", "clusters_cost", "total_cost"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/lastdaycostresponse.py b/hyperstack/models/lastdaycostresponse.py index 6125c6b..fea1ba4 100644 --- a/hyperstack/models/lastdaycostresponse.py +++ b/hyperstack/models/lastdaycostresponse.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.lastdaycostfields import Lastdaycostfields from typing import Optional, Set @@ -32,11 +32,11 @@ class Lastdaycostresponse(BaseModel): data: Optional[Lastdaycostfields] = None __properties: ClassVar[List[str]] = ["message", "status", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/logo_get_response.py b/hyperstack/models/logo_get_response.py index 21a9e8a..7d007ba 100644 --- a/hyperstack/models/logo_get_response.py +++ b/hyperstack/models/logo_get_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class LogoGetResponse(BaseModel): url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "type", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/logout.py b/hyperstack/models/logout_payload.py similarity index 85% rename from hyperstack/models/logout.py rename to hyperstack/models/logout_payload.py index c0cb09d..9b3ee29 100644 --- a/hyperstack/models/logout.py +++ b/hyperstack/models/logout_payload.py @@ -17,23 +17,23 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class Logout(BaseModel): +class LogoutPayload(BaseModel): """ - Logout + LogoutPayload """ # noqa: E501 refresh_token: StrictStr __properties: ClassVar[List[str]] = ["refresh_token"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Logout from a JSON string""" + """Create an instance of LogoutPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Logout from a dict""" + """Create an instance of LogoutPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/metric_item_fields.py b/hyperstack/models/metric_item_fields.py new file mode 100644 index 0000000..c53c502 --- /dev/null +++ b/hyperstack/models/metric_item_fields.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MetricItemFields(BaseModel): + """ + MetricItemFields + """ # noqa: E501 + unit: Optional[StrictStr] = None + columns: Optional[List[StrictStr]] = None + data: Optional[List[List[Dict[str, Any]]]] = None + __properties: ClassVar[List[str]] = ["unit", "columns", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MetricItemFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MetricItemFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "unit": obj.get("unit"), + "columns": obj.get("columns"), + "data": obj.get("data") + }) + return _obj + + diff --git a/hyperstack/models/metrics_fields.py b/hyperstack/models/metrics_fields.py new file mode 100644 index 0000000..6e51ed3 --- /dev/null +++ b/hyperstack/models/metrics_fields.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.metric_item_fields import MetricItemFields +from typing import Optional, Set +from typing_extensions import Self + +class MetricsFields(BaseModel): + """ + MetricsFields + """ # noqa: E501 + cpu: Optional[MetricItemFields] = None + memory_usages: Optional[MetricItemFields] = Field(default=None, alias="memory.usages") + network_in: Optional[MetricItemFields] = Field(default=None, alias="network.in") + network_out: Optional[MetricItemFields] = Field(default=None, alias="network.out") + disk_read: Optional[MetricItemFields] = Field(default=None, alias="disk.read") + disk_write: Optional[MetricItemFields] = Field(default=None, alias="disk.write") + __properties: ClassVar[List[str]] = ["cpu", "memory.usages", "network.in", "network.out", "disk.read", "disk.write"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MetricsFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of cpu + if self.cpu: + _dict['cpu'] = self.cpu.to_dict() + # override the default output from pydantic by calling `to_dict()` of memory_usages + if self.memory_usages: + _dict['memory.usages'] = self.memory_usages.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_in + if self.network_in: + _dict['network.in'] = self.network_in.to_dict() + # override the default output from pydantic by calling `to_dict()` of network_out + if self.network_out: + _dict['network.out'] = self.network_out.to_dict() + # override the default output from pydantic by calling `to_dict()` of disk_read + if self.disk_read: + _dict['disk.read'] = self.disk_read.to_dict() + # override the default output from pydantic by calling `to_dict()` of disk_write + if self.disk_write: + _dict['disk.write'] = self.disk_write.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MetricsFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cpu": MetricItemFields.from_dict(obj["cpu"]) if obj.get("cpu") is not None else None, + "memory.usages": MetricItemFields.from_dict(obj["memory.usages"]) if obj.get("memory.usages") is not None else None, + "network.in": MetricItemFields.from_dict(obj["network.in"]) if obj.get("network.in") is not None else None, + "network.out": MetricItemFields.from_dict(obj["network.out"]) if obj.get("network.out") is not None else None, + "disk.read": MetricItemFields.from_dict(obj["disk.read"]) if obj.get("disk.read") is not None else None, + "disk.write": MetricItemFields.from_dict(obj["disk.write"]) if obj.get("disk.write") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/new_configurations_response.py b/hyperstack/models/new_configurations_response.py index eab7cfe..4da8768 100644 --- a/hyperstack/models/new_configurations_response.py +++ b/hyperstack/models/new_configurations_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class NewConfigurationsResponse(BaseModel): var_10x: Optional[StrictInt] = Field(default=None, alias="10x") __properties: ClassVar[List[str]] = ["1x", "2x", "4x", "8x", "10x"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/new_model_response.py b/hyperstack/models/new_model_response.py index 6d4674f..301639c 100644 --- a/hyperstack/models/new_model_response.py +++ b/hyperstack/models/new_model_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.new_configurations_response import NewConfigurationsResponse from typing import Optional, Set @@ -35,11 +35,11 @@ class NewModelResponse(BaseModel): configurations: Optional[NewConfigurationsResponse] = None __properties: ClassVar[List[str]] = ["model", "available", "planned_7_days", "planned_30_days", "planned_100_days", "configurations"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/new_stock_response.py b/hyperstack/models/new_stock_response.py index 4f12ab5..c54931b 100644 --- a/hyperstack/models/new_stock_response.py +++ b/hyperstack/models/new_stock_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.new_model_response import NewModelResponse from typing import Optional, Set @@ -32,11 +32,11 @@ class NewStockResponse(BaseModel): models: Optional[List[NewModelResponse]] = None __properties: ClassVar[List[str]] = ["region", "stock-type", "models"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/new_stock_retrive_response.py b/hyperstack/models/new_stock_retrive_response.py index 0fef218..0dfb9d7 100644 --- a/hyperstack/models/new_stock_retrive_response.py +++ b/hyperstack/models/new_stock_retrive_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.new_stock_response import NewStockResponse from typing import Optional, Set @@ -30,11 +30,11 @@ class NewStockRetriveResponse(BaseModel): stocks: Optional[List[NewStockResponse]] = None __properties: ClassVar[List[str]] = ["stocks"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/new_stock_update_response_model.py b/hyperstack/models/new_stock_update_response_model.py index 1499102..74c52ca 100644 --- a/hyperstack/models/new_stock_update_response_model.py +++ b/hyperstack/models/new_stock_update_response_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class NewStockUpdateResponseModel(BaseModel): message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/node_model.py b/hyperstack/models/node_model.py index 3e3ceee..61ac58c 100644 --- a/hyperstack/models/node_model.py +++ b/hyperstack/models/node_model.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.node_stocks_payload import NodeStocksPayload from typing import Optional, Set @@ -34,14 +34,17 @@ class NodeModel(BaseModel): status: Optional[StrictStr] = None provision_date: Optional[datetime] = None sunset_date: Optional[datetime] = None + flavors: Optional[List[StrictStr]] = None + projects: Optional[List[StrictStr]] = None stocks: Optional[List[NodeStocksPayload]] = None - __properties: ClassVar[List[str]] = ["openstack_id", "openstack_name", "nexgen_name", "status", "provision_date", "sunset_date", "stocks"] + organizations: Optional[List[StrictInt]] = None + __properties: ClassVar[List[str]] = ["openstack_id", "openstack_name", "nexgen_name", "status", "provision_date", "sunset_date", "flavors", "projects", "stocks", "organizations"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -101,7 +104,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "provision_date": obj.get("provision_date"), "sunset_date": obj.get("sunset_date"), - "stocks": [NodeStocksPayload.from_dict(_item) for _item in obj["stocks"]] if obj.get("stocks") is not None else None + "flavors": obj.get("flavors"), + "projects": obj.get("projects"), + "stocks": [NodeStocksPayload.from_dict(_item) for _item in obj["stocks"]] if obj.get("stocks") is not None else None, + "organizations": obj.get("organizations") }) return _obj diff --git a/hyperstack/models/node_payload_model.py b/hyperstack/models/node_payload_model.py index af71e97..377074b 100644 --- a/hyperstack/models/node_payload_model.py +++ b/hyperstack/models/node_payload_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.node_power_usage_model import NodePowerUsageModel from typing import Optional, Set @@ -31,11 +31,11 @@ class NodePayloadModel(BaseModel): nodes: Optional[List[NodePowerUsageModel]] = None __properties: ClassVar[List[str]] = ["region", "nodes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/node_power_usage_model.py b/hyperstack/models/node_power_usage_model.py index edc1472..d91caff 100644 --- a/hyperstack/models/node_power_usage_model.py +++ b/hyperstack/models/node_power_usage_model.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.node_stocks_payload import NodeStocksPayload from hyperstack.models.power_usage_model import PowerUsageModel @@ -35,15 +35,18 @@ class NodePowerUsageModel(BaseModel): status: Optional[StrictStr] = None provision_date: Optional[datetime] = None sunset_date: Optional[datetime] = None + flavors: Optional[List[StrictStr]] = None + projects: Optional[List[StrictStr]] = None stocks: Optional[List[NodeStocksPayload]] = None + organizations: Optional[List[StrictInt]] = None power_usages: Optional[PowerUsageModel] = None - __properties: ClassVar[List[str]] = ["openstack_id", "openstack_name", "nexgen_name", "status", "provision_date", "sunset_date", "stocks", "power_usages"] + __properties: ClassVar[List[str]] = ["openstack_id", "openstack_name", "nexgen_name", "status", "provision_date", "sunset_date", "flavors", "projects", "stocks", "organizations", "power_usages"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -106,7 +109,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "provision_date": obj.get("provision_date"), "sunset_date": obj.get("sunset_date"), + "flavors": obj.get("flavors"), + "projects": obj.get("projects"), "stocks": [NodeStocksPayload.from_dict(_item) for _item in obj["stocks"]] if obj.get("stocks") is not None else None, + "organizations": obj.get("organizations"), "power_usages": PowerUsageModel.from_dict(obj["power_usages"]) if obj.get("power_usages") is not None else None }) return _obj diff --git a/hyperstack/models/node_response_model.py b/hyperstack/models/node_response_model.py index afae3a5..a6b0d56 100644 --- a/hyperstack/models/node_response_model.py +++ b/hyperstack/models/node_response_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.node_model import NodeModel from typing import Optional, Set @@ -31,11 +31,11 @@ class NodeResponseModel(BaseModel): nodes: Optional[List[NodeModel]] = None __properties: ClassVar[List[str]] = ["region", "nodes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/node_stock_payload_model.py b/hyperstack/models/node_stock_payload_model.py index 8a524b2..e633a38 100644 --- a/hyperstack/models/node_stock_payload_model.py +++ b/hyperstack/models/node_stock_payload_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.node_payload_model import NodePayloadModel from typing import Optional, Set @@ -30,11 +30,11 @@ class NodeStockPayloadModel(BaseModel): stocks: Optional[List[NodePayloadModel]] = None __properties: ClassVar[List[str]] = ["stocks"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/node_stock_response_model.py b/hyperstack/models/node_stock_response_model.py index bff9097..26a830a 100644 --- a/hyperstack/models/node_stock_response_model.py +++ b/hyperstack/models/node_stock_response_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.node_response_model import NodeResponseModel from typing import Optional, Set @@ -30,11 +30,11 @@ class NodeStockResponseModel(BaseModel): stocks: Optional[List[NodeResponseModel]] = None __properties: ClassVar[List[str]] = ["stocks"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/node_stocks_payload.py b/hyperstack/models/node_stocks_payload.py index 04d04cd..8c9d455 100644 --- a/hyperstack/models/node_stocks_payload.py +++ b/hyperstack/models/node_stocks_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -32,11 +32,11 @@ class NodeStocksPayload(BaseModel): in_use: StrictInt __properties: ClassVar[List[str]] = ["name", "type", "total", "in_use"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/organization_fields.py b/hyperstack/models/organization_fields.py new file mode 100644 index 0000000..168f534 --- /dev/null +++ b/hyperstack/models/organization_fields.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.organization_user_response_model import OrganizationUserResponseModel +from typing import Optional, Set +from typing_extensions import Self + +class OrganizationFields(BaseModel): + """ + OrganizationFields + """ # noqa: E501 + id: StrictInt + name: StrictStr + credit: Optional[StrictInt] = None + threshold: Optional[StrictInt] = None + total_instances: Optional[StrictInt] = None + total_volumes: Optional[StrictInt] = None + total_containers: Optional[StrictInt] = None + total_clusters: Optional[StrictInt] = None + users: Optional[List[OrganizationUserResponseModel]] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "name", "credit", "threshold", "total_instances", "total_volumes", "total_containers", "total_clusters", "users", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item in self.users: + if _item: + _items.append(_item.to_dict()) + _dict['users'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "credit": obj.get("credit"), + "threshold": obj.get("threshold"), + "total_instances": obj.get("total_instances"), + "total_volumes": obj.get("total_volumes"), + "total_containers": obj.get("total_containers"), + "total_clusters": obj.get("total_clusters"), + "users": [OrganizationUserResponseModel.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/organization_object_response.py b/hyperstack/models/organization_object_response.py index cb8299b..d06bc6b 100644 --- a/hyperstack/models/organization_object_response.py +++ b/hyperstack/models/organization_object_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.infrahub_resource_object_response import InfrahubResourceObjectResponse from typing import Optional, Set @@ -31,11 +31,11 @@ class OrganizationObjectResponse(BaseModel): resources: Optional[List[InfrahubResourceObjectResponse]] = None __properties: ClassVar[List[str]] = ["org_id", "resources"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/organization_user_model.py b/hyperstack/models/organization_user_response_model.py similarity index 76% rename from hyperstack/models/organization_user_model.py rename to hyperstack/models/organization_user_response_model.py index b77d662..e5b5518 100644 --- a/hyperstack/models/organization_user_model.py +++ b/hyperstack/models/organization_user_response_model.py @@ -18,15 +18,15 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.rbac_role_fieldfor_organization import RBACRoleFieldforOrganization +from hyperstack.models.rbac_role_field import RbacRoleField from typing import Optional, Set from typing_extensions import Self -class OrganizationUserModel(BaseModel): +class OrganizationUserResponseModel(BaseModel): """ - OrganizationUserModel + OrganizationUserResponseModel """ # noqa: E501 id: Optional[StrictInt] = None sub: Optional[StrictStr] = None @@ -34,15 +34,16 @@ class OrganizationUserModel(BaseModel): username: Optional[StrictStr] = None name: Optional[StrictStr] = None role: Optional[StrictStr] = None - rbac_roles: Optional[List[RBACRoleFieldforOrganization]] = None + rbac_roles: Optional[List[RbacRoleField]] = None joined_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["id", "sub", "email", "username", "name", "role", "rbac_roles", "joined_at"] + last_login: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "sub", "email", "username", "name", "role", "rbac_roles", "joined_at", "last_login"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +57,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OrganizationUserModel from a JSON string""" + """Create an instance of OrganizationUserResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -88,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OrganizationUserModel from a dict""" + """Create an instance of OrganizationUserResponseModel from a dict""" if obj is None: return None @@ -102,8 +103,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "username": obj.get("username"), "name": obj.get("name"), "role": obj.get("role"), - "rbac_roles": [RBACRoleFieldforOrganization.from_dict(_item) for _item in obj["rbac_roles"]] if obj.get("rbac_roles") is not None else None, - "joined_at": obj.get("joined_at") + "rbac_roles": [RbacRoleField.from_dict(_item) for _item in obj["rbac_roles"]] if obj.get("rbac_roles") is not None else None, + "joined_at": obj.get("joined_at"), + "last_login": obj.get("last_login") }) return _obj diff --git a/hyperstack/models/overview_info.py b/hyperstack/models/overview_info.py index d503412..e5c48a9 100644 --- a/hyperstack/models/overview_info.py +++ b/hyperstack/models/overview_info.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.container_overview_fields import ContainerOverviewFields from hyperstack.models.instance_overview_fields import InstanceOverviewFields @@ -34,11 +34,11 @@ class OverviewInfo(BaseModel): volume: Optional[VolumeOverviewFields] = None __properties: ClassVar[List[str]] = ["instance", "container", "volume"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/payment_details_fields.py b/hyperstack/models/payment_details_fields.py index 3ed4f7b..37f6495 100644 --- a/hyperstack/models/payment_details_fields.py +++ b/hyperstack/models/payment_details_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -37,11 +37,11 @@ class PaymentDetailsFields(BaseModel): updated_at: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["amount", "currency", "paid_from", "status", "gateway_response", "description", "transaction_id", "payment_id", "updated_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/payment_details_response.py b/hyperstack/models/payment_details_response.py index e0d3412..d7cca09 100644 --- a/hyperstack/models/payment_details_response.py +++ b/hyperstack/models/payment_details_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.payment_details_fields import PaymentDetailsFields from typing import Optional, Set @@ -32,11 +32,11 @@ class PaymentDetailsResponse(BaseModel): data: Optional[PaymentDetailsFields] = None __properties: ClassVar[List[str]] = ["message", "status", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/payment_initiate_fields.py b/hyperstack/models/payment_initiate_fields.py index 0860941..be6d97d 100644 --- a/hyperstack/models/payment_initiate_fields.py +++ b/hyperstack/models/payment_initiate_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class PaymentInitiateFields(BaseModel): payment_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["payment_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/payment_initiate_payload.py b/hyperstack/models/payment_initiate_payload.py index d53a7a3..1133dad 100644 --- a/hyperstack/models/payment_initiate_payload.py +++ b/hyperstack/models/payment_initiate_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class PaymentInitiatePayload(BaseModel): amount: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["amount"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/payment_initiate_response.py b/hyperstack/models/payment_initiate_response.py index 1bc56d9..2a79481 100644 --- a/hyperstack/models/payment_initiate_response.py +++ b/hyperstack/models/payment_initiate_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.payment_initiate_fields import PaymentInitiateFields from typing import Optional, Set @@ -32,11 +32,11 @@ class PaymentInitiateResponse(BaseModel): data: Optional[PaymentInitiateFields] = None __properties: ClassVar[List[str]] = ["message", "status", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/permission_fields.py b/hyperstack/models/permission_fields.py index 7721b89..381acb8 100644 --- a/hyperstack/models/permission_fields.py +++ b/hyperstack/models/permission_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -35,11 +35,11 @@ class PermissionFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "resource", "permission", "method", "endpoint", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/policy_fields.py b/hyperstack/models/policy_fields.py index d7fe882..6ee055c 100644 --- a/hyperstack/models/policy_fields.py +++ b/hyperstack/models/policy_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.policy_permission_fields import PolicyPermissionFields from typing import Optional, Set @@ -35,11 +35,11 @@ class PolicyFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "permissions", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/policy_permission_fields.py b/hyperstack/models/policy_permission_fields.py index 8a6f150..8b51677 100644 --- a/hyperstack/models/policy_permission_fields.py +++ b/hyperstack/models/policy_permission_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class PolicyPermissionFields(BaseModel): permission: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "resource", "permission"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/power_usage_model.py b/hyperstack/models/power_usage_model.py index 4a525e2..bbfeae3 100644 --- a/hyperstack/models/power_usage_model.py +++ b/hyperstack/models/power_usage_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class PowerUsageModel(BaseModel): unit: StrictStr __properties: ClassVar[List[str]] = ["value", "unit"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/pricebook_model.py b/hyperstack/models/pricebook_model.py index 1274aac..f7b55e6 100644 --- a/hyperstack/models/pricebook_model.py +++ b/hyperstack/models/pricebook_model.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -36,11 +36,11 @@ class PricebookModel(BaseModel): end_time: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "value", "original_value", "discount_applied", "start_time", "end_time"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/pricebook_resource_object_response.py b/hyperstack/models/pricebook_resource_object_response.py index 5a1997a..a83f6b4 100644 --- a/hyperstack/models/pricebook_resource_object_response.py +++ b/hyperstack/models/pricebook_resource_object_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -39,11 +39,11 @@ class PricebookResourceObjectResponse(BaseModel): nexgen_original_price: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["type", "name", "amount", "rate", "discounted_rate", "price", "actual_price", "host_price", "host_original_price", "nexgen_price", "nexgen_original_price"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/profile_fields.py b/hyperstack/models/profile_fields.py index 6b8b68c..c94db85 100644 --- a/hyperstack/models/profile_fields.py +++ b/hyperstack/models/profile_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -34,11 +34,11 @@ class ProfileFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "data", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/profile_list_response.py b/hyperstack/models/profile_list_response.py index 23cf6f2..fd453f0 100644 --- a/hyperstack/models/profile_list_response.py +++ b/hyperstack/models/profile_list_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.profile_fields import ProfileFields from typing import Optional, Set @@ -32,11 +32,11 @@ class ProfileListResponse(BaseModel): profiles: Optional[List[ProfileFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "profiles"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/profile_object_fields.py b/hyperstack/models/profile_object_fields.py index 5c45309..4d28d89 100644 --- a/hyperstack/models/profile_object_fields.py +++ b/hyperstack/models/profile_object_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class ProfileObjectFields(BaseModel): description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/rbac_role.py b/hyperstack/models/rbac_role_detail_response_model.py similarity index 80% rename from hyperstack/models/rbac_role.py rename to hyperstack/models/rbac_role_detail_response_model.py index d21f2c7..d88210e 100644 --- a/hyperstack/models/rbac_role.py +++ b/hyperstack/models/rbac_role_detail_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from hyperstack.models.rbac_role_fields import RBACRoleFields +from hyperstack.models.rbac_role_fields import RbacRoleFields from typing import Optional, Set from typing_extensions import Self -class RBACRole(BaseModel): +class RbacRoleDetailResponseModel(BaseModel): """ - RBACRole + RbacRoleDetailResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None - role: Optional[RBACRoleFields] = None + role: Optional[RbacRoleFields] = None __properties: ClassVar[List[str]] = ["status", "message", "role"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RBACRole from a JSON string""" + """Create an instance of RbacRoleDetailResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RBACRole from a dict""" + """Create an instance of RbacRoleDetailResponseModel from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status"), "message": obj.get("message"), - "role": RBACRoleFields.from_dict(obj["role"]) if obj.get("role") is not None else None + "role": RbacRoleFields.from_dict(obj["role"]) if obj.get("role") is not None else None }) return _obj diff --git a/hyperstack/models/rbac_role_fieldfor_organization.py b/hyperstack/models/rbac_role_field.py similarity index 83% rename from hyperstack/models/rbac_role_fieldfor_organization.py rename to hyperstack/models/rbac_role_field.py index 9bc6b13..24e8b9a 100644 --- a/hyperstack/models/rbac_role_fieldfor_organization.py +++ b/hyperstack/models/rbac_role_field.py @@ -17,23 +17,23 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class RBACRoleFieldforOrganization(BaseModel): +class RbacRoleField(BaseModel): """ - RBACRoleFieldforOrganization + RbacRoleField """ # noqa: E501 name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RBACRoleFieldforOrganization from a JSON string""" + """Create an instance of RbacRoleField from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RBACRoleFieldforOrganization from a dict""" + """Create an instance of RbacRoleField from a dict""" if obj is None: return None diff --git a/hyperstack/models/rbac_role_fields.py b/hyperstack/models/rbac_role_fields.py index 0da2ce4..38df3a7 100644 --- a/hyperstack/models/rbac_role_fields.py +++ b/hyperstack/models/rbac_role_fields.py @@ -18,16 +18,16 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.role_permission_fields import RolePermissionFields from hyperstack.models.role_policy_fields import RolePolicyFields from typing import Optional, Set from typing_extensions import Self -class RBACRoleFields(BaseModel): +class RbacRoleFields(BaseModel): """ - RBACRoleFields + RbacRoleFields """ # noqa: E501 id: Optional[StrictInt] = None name: Optional[StrictStr] = None @@ -37,11 +37,11 @@ class RBACRoleFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "policies", "permissions", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RBACRoleFields from a JSON string""" + """Create an instance of RbacRoleFields from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -94,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RBACRoleFields from a dict""" + """Create an instance of RbacRoleFields from a dict""" if obj is None: return None diff --git a/hyperstack/models/refresh_token.py b/hyperstack/models/refresh_token_payload.py similarity index 85% rename from hyperstack/models/refresh_token.py rename to hyperstack/models/refresh_token_payload.py index da20efc..8d0d77a 100644 --- a/hyperstack/models/refresh_token.py +++ b/hyperstack/models/refresh_token_payload.py @@ -17,24 +17,24 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class RefreshToken(BaseModel): +class RefreshTokenPayload(BaseModel): """ - RefreshToken + RefreshTokenPayload """ # noqa: E501 id_token: StrictStr refresh_token: StrictStr __properties: ClassVar[List[str]] = ["id_token", "refresh_token"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RefreshToken from a JSON string""" + """Create an instance of RefreshTokenPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RefreshToken from a dict""" + """Create an instance of RefreshTokenPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/region_fields.py b/hyperstack/models/region_fields.py index 493c822..ea50274 100644 --- a/hyperstack/models/region_fields.py +++ b/hyperstack/models/region_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class RegionFields(BaseModel): description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "name", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/region_payload.py b/hyperstack/models/region_payload.py index 77560ef..741af45 100644 --- a/hyperstack/models/region_payload.py +++ b/hyperstack/models/region_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class RegionPayload(BaseModel): description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/region_response.py b/hyperstack/models/region_response.py index 019b87b..9ded938 100644 --- a/hyperstack/models/region_response.py +++ b/hyperstack/models/region_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.region_fields import RegionFields from typing import Optional, Set @@ -32,11 +32,11 @@ class RegionResponse(BaseModel): region: Optional[RegionFields] = None __properties: ClassVar[List[str]] = ["status", "message", "region"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/regions.py b/hyperstack/models/regions.py index 6466c11..0025567 100644 --- a/hyperstack/models/regions.py +++ b/hyperstack/models/regions.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.region_fields import RegionFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Regions(BaseModel): regions: Optional[List[RegionFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "regions"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/remove_member_from_organization_response_model.py b/hyperstack/models/remove_member_from_organization_response_model.py new file mode 100644 index 0000000..948aaa6 --- /dev/null +++ b/hyperstack/models/remove_member_from_organization_response_model.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RemoveMemberFromOrganizationResponseModel(BaseModel): + """ + RemoveMemberFromOrganizationResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RemoveMemberFromOrganizationResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RemoveMemberFromOrganizationResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message") + }) + return _obj + + diff --git a/hyperstack/models/removemember.py b/hyperstack/models/remove_member_payload.py similarity index 84% rename from hyperstack/models/removemember.py rename to hyperstack/models/remove_member_payload.py index 2b55c72..0424ce4 100644 --- a/hyperstack/models/removemember.py +++ b/hyperstack/models/remove_member_payload.py @@ -17,23 +17,23 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class Removemember(BaseModel): +class RemoveMemberPayload(BaseModel): """ - Removemember + RemoveMemberPayload """ # noqa: E501 email: StrictStr __properties: ClassVar[List[str]] = ["email"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Removemember from a JSON string""" + """Create an instance of RemoveMemberPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Removemember from a dict""" + """Create an instance of RemoveMemberPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/request_console.py b/hyperstack/models/request_console.py index 45d560c..1e10413 100644 --- a/hyperstack/models/request_console.py +++ b/hyperstack/models/request_console.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class RequestConsole(BaseModel): url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/resource_payload.py b/hyperstack/models/resource_payload.py index 73531a2..17b3aeb 100644 --- a/hyperstack/models/resource_payload.py +++ b/hyperstack/models/resource_payload.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -27,14 +27,17 @@ class ResourcePayload(BaseModel): ResourcePayload """ # noqa: E501 resource_id: StrictInt - discount_percent: Union[StrictFloat, StrictInt] - __properties: ClassVar[List[str]] = ["resource_id", "discount_percent"] + discount_percent: Optional[Union[StrictFloat, StrictInt]] = None + discount_type: StrictStr + discount_amount: Optional[Union[StrictFloat, StrictInt]] = None + resource_count: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["resource_id", "discount_percent", "discount_type", "discount_amount", "resource_count"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -82,7 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "resource_id": obj.get("resource_id"), - "discount_percent": obj.get("discount_percent") + "discount_percent": obj.get("discount_percent"), + "discount_type": obj.get("discount_type"), + "discount_amount": obj.get("discount_amount"), + "resource_count": obj.get("resource_count") }) return _obj diff --git a/hyperstack/models/response_model.py b/hyperstack/models/response_model.py index 76bbfe9..25e02f4 100644 --- a/hyperstack/models/response_model.py +++ b/hyperstack/models/response_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class ResponseModel(BaseModel): message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/role_permission_fields.py b/hyperstack/models/role_permission_fields.py index 5844edc..92ca60c 100644 --- a/hyperstack/models/role_permission_fields.py +++ b/hyperstack/models/role_permission_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class RolePermissionFields(BaseModel): permission: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "resource", "permission"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/role_policy_fields.py b/hyperstack/models/role_policy_fields.py index 09ef906..497cc25 100644 --- a/hyperstack/models/role_policy_fields.py +++ b/hyperstack/models/role_policy_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class RolePolicyFields(BaseModel): description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "name", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/security_group_rule.py b/hyperstack/models/security_group_rule.py index 06101e0..ff0fbdd 100644 --- a/hyperstack/models/security_group_rule.py +++ b/hyperstack/models/security_group_rule.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.security_group_rule_fields import SecurityGroupRuleFields from typing import Optional, Set @@ -32,11 +32,11 @@ class SecurityGroupRule(BaseModel): security_rule: Optional[SecurityGroupRuleFields] = None __properties: ClassVar[List[str]] = ["status", "message", "security_rule"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/security_group_rule_fields.py b/hyperstack/models/security_group_rule_fields.py index 9ee85b7..ca267e3 100644 --- a/hyperstack/models/security_group_rule_fields.py +++ b/hyperstack/models/security_group_rule_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -38,11 +38,11 @@ class SecurityGroupRuleFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "direction", "protocol", "port_range_min", "port_range_max", "ethertype", "remote_ip_prefix", "status", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/security_rules_fieldsfor_instance.py b/hyperstack/models/security_rules_fieldsfor_instance.py index d9cd1cc..7d6764d 100644 --- a/hyperstack/models/security_rules_fieldsfor_instance.py +++ b/hyperstack/models/security_rules_fieldsfor_instance.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -38,11 +38,11 @@ class SecurityRulesFieldsforInstance(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "direction", "protocol", "port_range_min", "port_range_max", "ethertype", "remote_ip_prefix", "status", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/security_rules_protocol_fields.py b/hyperstack/models/security_rules_protocol_fields.py index ef4493f..0221fe3 100644 --- a/hyperstack/models/security_rules_protocol_fields.py +++ b/hyperstack/models/security_rules_protocol_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class SecurityRulesProtocolFields(BaseModel): protocols: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["status", "message", "protocols"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/set_defaults_payload.py b/hyperstack/models/set_defaults_payload.py new file mode 100644 index 0000000..f78f399 --- /dev/null +++ b/hyperstack/models/set_defaults_payload.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SetDefaultsPayload(BaseModel): + """ + SetDefaultsPayload + """ # noqa: E501 + flavors: List[StrictInt] + images: List[StrictInt] + __properties: ClassVar[List[str]] = ["flavors", "images"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetDefaultsPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetDefaultsPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "flavors": obj.get("flavors"), + "images": obj.get("images") + }) + return _obj + + diff --git a/hyperstack/models/single_visibility_user_response.py b/hyperstack/models/single_visibility_user_response.py index 33d1b1d..2097b1f 100644 --- a/hyperstack/models/single_visibility_user_response.py +++ b/hyperstack/models/single_visibility_user_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictInt +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class SingleVisibilityUserResponse(BaseModel): stock_visible: StrictBool __properties: ClassVar[List[str]] = ["id", "user_id", "stock_visible"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/start_deployment.py b/hyperstack/models/start_deployment.py index 65fd846..2db4e17 100644 --- a/hyperstack/models/start_deployment.py +++ b/hyperstack/models/start_deployment.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.deployment_fieldsforstartdeployments import DeploymentFieldsforstartdeployments from typing import Optional, Set @@ -32,11 +32,11 @@ class StartDeployment(BaseModel): deployment: Optional[DeploymentFieldsforstartdeployments] = None __properties: ClassVar[List[str]] = ["status", "message", "deployment"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/start_deployment_payload.py b/hyperstack/models/start_deployment_payload.py index 5dd04e0..9b305c7 100644 --- a/hyperstack/models/start_deployment_payload.py +++ b/hyperstack/models/start_deployment_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -32,11 +32,11 @@ class StartDeploymentPayload(BaseModel): variables: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["name", "description", "template_id", "variables"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/stock_visibility_user_list_response.py b/hyperstack/models/stock_visibility_user_list_response.py index 4c9c77a..cc3f4a3 100644 --- a/hyperstack/models/stock_visibility_user_list_response.py +++ b/hyperstack/models/stock_visibility_user_list_response.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.single_visibility_user_response import SingleVisibilityUserResponse from typing import Optional, Set @@ -32,11 +32,11 @@ class StockVisibilityUserListResponse(BaseModel): users: Optional[List[SingleVisibilityUserResponse]] = None __properties: ClassVar[List[str]] = ["status", "message", "users"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/stock_visibility_user_payload.py b/hyperstack/models/stock_visibility_user_payload.py index b10005f..b6b6208 100644 --- a/hyperstack/models/stock_visibility_user_payload.py +++ b/hyperstack/models/stock_visibility_user_payload.py @@ -17,8 +17,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -26,14 +26,14 @@ class StockVisibilityUserPayload(BaseModel): """ StockVisibilityUserPayload """ # noqa: E501 - user_ids: Optional[List[StrictInt]] = None + user_ids: List[StrictInt] __properties: ClassVar[List[str]] = ["user_ids"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/success_response_model.py b/hyperstack/models/success_response_model.py index fb2b4f4..b9b435c 100644 --- a/hyperstack/models/success_response_model.py +++ b/hyperstack/models/success_response_model.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class SuccessResponseModel(BaseModel): message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["status", "message"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/template.py b/hyperstack/models/template.py index 229b9bc..bffaab8 100644 --- a/hyperstack/models/template.py +++ b/hyperstack/models/template.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.template_fields import TemplateFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Template(BaseModel): template: Optional[TemplateFields] = None __properties: ClassVar[List[str]] = ["status", "message", "template"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/template_fields.py b/hyperstack/models/template_fields.py index aeb947b..8b8e73a 100644 --- a/hyperstack/models/template_fields.py +++ b/hyperstack/models/template_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -35,11 +35,11 @@ class TemplateFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "content", "is_public", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/templates.py b/hyperstack/models/templates.py index 7fe534c..c5f0415 100644 --- a/hyperstack/models/templates.py +++ b/hyperstack/models/templates.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.template_fields import TemplateFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Templates(BaseModel): templates: Optional[List[TemplateFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "templates"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/token_fields.py b/hyperstack/models/token_fields.py index 9ddd208..10fe6f9 100644 --- a/hyperstack/models/token_fields.py +++ b/hyperstack/models/token_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class TokenFields(BaseModel): refresh_token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["access_token", "id_token", "refresh_token"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/update_contract_payload.py b/hyperstack/models/update_contract_payload.py new file mode 100644 index 0000000..62735ed --- /dev/null +++ b/hyperstack/models/update_contract_payload.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.resource_payload import ResourcePayload +from typing import Optional, Set +from typing_extensions import Self + +class UpdateContractPayload(BaseModel): + """ + UpdateContractPayload + """ # noqa: E501 + description: Optional[StrictStr] = None + discount_resources: List[ResourcePayload] + start_date: Optional[datetime] = None + end_date: Optional[datetime] = None + expiration_policy: StrictInt + __properties: ClassVar[List[str]] = ["description", "discount_resources", "start_date", "end_date", "expiration_policy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateContractPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in discount_resources (list) + _items = [] + if self.discount_resources: + for _item in self.discount_resources: + if _item: + _items.append(_item.to_dict()) + _dict['discount_resources'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateContractPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "description": obj.get("description"), + "discount_resources": [ResourcePayload.from_dict(_item) for _item in obj["discount_resources"]] if obj.get("discount_resources") is not None else None, + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "expiration_policy": obj.get("expiration_policy") + }) + return _obj + + diff --git a/hyperstack/models/update_discounts_payload.py b/hyperstack/models/update_discounts_payload.py index 62f04bb..6ee0a82 100644 --- a/hyperstack/models/update_discounts_payload.py +++ b/hyperstack/models/update_discounts_payload.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.resource_payload import ResourcePayload from typing import Optional, Set @@ -34,11 +34,11 @@ class UpdateDiscountsPayload(BaseModel): discount_status: StrictStr __properties: ClassVar[List[str]] = ["discount_resources", "start_date", "end_date", "discount_status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/update_discounts_status_payload.py b/hyperstack/models/update_discounts_status_payload.py index de9c920..294ac84 100644 --- a/hyperstack/models/update_discounts_status_payload.py +++ b/hyperstack/models/update_discounts_status_payload.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -29,11 +29,11 @@ class UpdateDiscountsStatusPayload(BaseModel): discount_status: StrictStr __properties: ClassVar[List[str]] = ["discount_status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/update_environment.py b/hyperstack/models/update_environment.py index 4423ce0..807dc49 100644 --- a/hyperstack/models/update_environment.py +++ b/hyperstack/models/update_environment.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -26,14 +27,14 @@ class UpdateEnvironment(BaseModel): """ UpdateEnvironment """ # noqa: E501 - name: StrictStr + name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The new name of the environment.") __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/update_gpu.py b/hyperstack/models/update_gpu.py index 9a7e02a..fb4243c 100644 --- a/hyperstack/models/update_gpu.py +++ b/hyperstack/models/update_gpu.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,14 +28,14 @@ class UpdateGPU(BaseModel): """ # noqa: E501 name: Optional[StrictStr] = None regions: Optional[List[StrictStr]] = None - example_metadata: Optional[StrictStr] = None + example_metadata: Optional[StrictStr] = Field(default=None, description="A valid JSON string.") __properties: ClassVar[List[str]] = ["name", "regions", "example_metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/update_keypair_name.py b/hyperstack/models/update_keypair_name.py index ea0c2e7..c248ae0 100644 --- a/hyperstack/models/update_keypair_name.py +++ b/hyperstack/models/update_keypair_name.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -26,14 +27,14 @@ class UpdateKeypairName(BaseModel): """ UpdateKeypairName """ # noqa: E501 - name: StrictStr + name: Annotated[str, Field(strict=True, max_length=50)] = Field(description="The new key pair name.") __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/update_keypairnameresponse.py b/hyperstack/models/update_keypairnameresponse.py index 9e8e811..6016810 100644 --- a/hyperstack/models/update_keypairnameresponse.py +++ b/hyperstack/models/update_keypairnameresponse.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.keypair_fields import KeypairFields from typing import Optional, Set @@ -32,11 +32,11 @@ class UpdateKeypairnameresponse(BaseModel): keypair: Optional[KeypairFields] = None __properties: ClassVar[List[str]] = ["status", "message", "keypair"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/update_organization_payload.py b/hyperstack/models/update_organization_payload.py new file mode 100644 index 0000000..d692dbc --- /dev/null +++ b/hyperstack/models/update_organization_payload.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpdateOrganizationPayload(BaseModel): + """ + UpdateOrganizationPayload + """ # noqa: E501 + name: StrictStr + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateOrganizationPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateOrganizationPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/hyperstack/models/update_organization_response_model.py b/hyperstack/models/update_organization_response_model.py new file mode 100644 index 0000000..73e5aac --- /dev/null +++ b/hyperstack/models/update_organization_response_model.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UpdateOrganizationResponseModel(BaseModel): + """ + UpdateOrganizationResponseModel + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["status", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateOrganizationResponseModel from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateOrganizationResponseModel from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message") + }) + return _obj + + diff --git a/hyperstack/models/update_template.py b/hyperstack/models/update_template.py index eda80bb..98fd56d 100644 --- a/hyperstack/models/update_template.py +++ b/hyperstack/models/update_template.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class UpdateTemplate(BaseModel): is_public: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["name", "description", "is_public"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/user_default_choice_for_admin_fields.py b/hyperstack/models/user_default_choice_for_admin_fields.py new file mode 100644 index 0000000..936aec5 --- /dev/null +++ b/hyperstack/models/user_default_choice_for_admin_fields.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserDefaultChoiceForAdminFields(BaseModel): + """ + UserDefaultChoiceForAdminFields + """ # noqa: E501 + id: Optional[StrictInt] = None + region_name: Optional[StrictStr] = None + flavor_id: Optional[StrictInt] = None + image_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "region_name", "flavor_id", "image_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDefaultChoiceForAdminFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDefaultChoiceForAdminFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "region_name": obj.get("region_name"), + "flavor_id": obj.get("flavor_id"), + "image_id": obj.get("image_id") + }) + return _obj + + diff --git a/hyperstack/models/user_default_choice_for_user_fields.py b/hyperstack/models/user_default_choice_for_user_fields.py new file mode 100644 index 0000000..17a923a --- /dev/null +++ b/hyperstack/models/user_default_choice_for_user_fields.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UserDefaultChoiceForUserFields(BaseModel): + """ + UserDefaultChoiceForUserFields + """ # noqa: E501 + region_id: Optional[StrictInt] = None + environment_id: Optional[StrictInt] = None + keypair_id: Optional[StrictInt] = None + flavor_id: Optional[StrictInt] = None + image_id: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["region_id", "environment_id", "keypair_id", "flavor_id", "image_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDefaultChoiceForUserFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDefaultChoiceForUserFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "region_id": obj.get("region_id"), + "environment_id": obj.get("environment_id"), + "keypair_id": obj.get("keypair_id"), + "flavor_id": obj.get("flavor_id"), + "image_id": obj.get("image_id") + }) + return _obj + + diff --git a/hyperstack/models/user_default_choices_for_admin_response.py b/hyperstack/models/user_default_choices_for_admin_response.py new file mode 100644 index 0000000..d70397e --- /dev/null +++ b/hyperstack/models/user_default_choices_for_admin_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.user_default_choice_for_admin_fields import UserDefaultChoiceForAdminFields +from typing import Optional, Set +from typing_extensions import Self + +class UserDefaultChoicesForAdminResponse(BaseModel): + """ + UserDefaultChoicesForAdminResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + user_default_choices: Optional[List[UserDefaultChoiceForAdminFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "user_default_choices"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDefaultChoicesForAdminResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in user_default_choices (list) + _items = [] + if self.user_default_choices: + for _item in self.user_default_choices: + if _item: + _items.append(_item.to_dict()) + _dict['user_default_choices'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDefaultChoicesForAdminResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "user_default_choices": [UserDefaultChoiceForAdminFields.from_dict(_item) for _item in obj["user_default_choices"]] if obj.get("user_default_choices") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/user_default_choices_for_user_response.py b/hyperstack/models/user_default_choices_for_user_response.py new file mode 100644 index 0000000..eb59ff1 --- /dev/null +++ b/hyperstack/models/user_default_choices_for_user_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.user_default_choice_for_user_fields import UserDefaultChoiceForUserFields +from typing import Optional, Set +from typing_extensions import Self + +class UserDefaultChoicesForUserResponse(BaseModel): + """ + UserDefaultChoicesForUserResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + user_default_choices: Optional[List[UserDefaultChoiceForUserFields]] = None + __properties: ClassVar[List[str]] = ["status", "message", "user_default_choices"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserDefaultChoicesForUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in user_default_choices (list) + _items = [] + if self.user_default_choices: + for _item in self.user_default_choices: + if _item: + _items.append(_item.to_dict()) + _dict['user_default_choices'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserDefaultChoicesForUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "user_default_choices": [UserDefaultChoiceForUserFields.from_dict(_item) for _item in obj["user_default_choices"]] if obj.get("user_default_choices") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/permission_fieldsfor_user_permission.py b/hyperstack/models/user_permission_fields.py similarity index 83% rename from hyperstack/models/permission_fieldsfor_user_permission.py rename to hyperstack/models/user_permission_fields.py index 2d634f0..0ffb21d 100644 --- a/hyperstack/models/permission_fieldsfor_user_permission.py +++ b/hyperstack/models/user_permission_fields.py @@ -17,25 +17,25 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class PermissionFieldsforUserPermission(BaseModel): +class UserPermissionFields(BaseModel): """ - PermissionFieldsforUserPermission + UserPermissionFields """ # noqa: E501 id: Optional[StrictInt] = None resource: Optional[StrictStr] = None permission: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "resource", "permission"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PermissionFieldsforUserPermission from a JSON string""" + """Create an instance of UserPermissionFields from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PermissionFieldsforUserPermission from a dict""" + """Create an instance of UserPermissionFields from a dict""" if obj is None: return None diff --git a/hyperstack/models/user_transfer_payload.py b/hyperstack/models/user_transfer_payload.py new file mode 100644 index 0000000..07c4a74 --- /dev/null +++ b/hyperstack/models/user_transfer_payload.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UserTransferPayload(BaseModel): + """ + UserTransferPayload + """ # noqa: E501 + org_id: StrictInt + role: StrictStr + __properties: ClassVar[List[str]] = ["org_id", "role"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserTransferPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserTransferPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "org_id": obj.get("org_id"), + "role": obj.get("role") + }) + return _obj + + diff --git a/hyperstack/models/userinfopostpayload.py b/hyperstack/models/userinfopostpayload.py new file mode 100644 index 0000000..4f7df68 --- /dev/null +++ b/hyperstack/models/userinfopostpayload.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class Userinfopostpayload(BaseModel): + """ + Userinfopostpayload + """ # noqa: E501 + business: StrictBool + name: Optional[StrictStr] = None + email: Optional[StrictStr] = None + company_name: Optional[StrictStr] = None + vat_number: Optional[StrictStr] = None + phone: Optional[StrictStr] = None + billing_address1: Optional[StrictStr] = None + billing_address2: Optional[StrictStr] = None + zip_code: StrictStr + country: StrictStr + state: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["business", "name", "email", "company_name", "vat_number", "phone", "billing_address1", "billing_address2", "zip_code", "country", "state"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Userinfopostpayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Userinfopostpayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "business": obj.get("business"), + "name": obj.get("name"), + "email": obj.get("email"), + "company_name": obj.get("company_name"), + "vat_number": obj.get("vat_number"), + "phone": obj.get("phone"), + "billing_address1": obj.get("billing_address1"), + "billing_address2": obj.get("billing_address2"), + "zip_code": obj.get("zip_code"), + "country": obj.get("country"), + "state": obj.get("state") + }) + return _obj + + diff --git a/hyperstack/models/users_info_fields.py b/hyperstack/models/users_info_fields.py new file mode 100644 index 0000000..6512981 --- /dev/null +++ b/hyperstack/models/users_info_fields.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class UsersInfoFields(BaseModel): + """ + UsersInfoFields + """ # noqa: E501 + id: Optional[StrictInt] = None + organization_id: Optional[StrictInt] = None + name: Optional[StrictStr] = None + email: Optional[StrictStr] = None + business: Optional[StrictBool] = None + company_name: Optional[StrictStr] = None + vat_number: Optional[StrictStr] = None + phone: Optional[StrictStr] = None + billing_address1: Optional[StrictStr] = None + billing_address2: Optional[StrictStr] = None + zip_code: Optional[StrictStr] = None + country: Optional[StrictStr] = None + state: Optional[StrictStr] = None + created_at: Optional[datetime] = None + __properties: ClassVar[List[str]] = ["id", "organization_id", "name", "email", "business", "company_name", "vat_number", "phone", "billing_address1", "billing_address2", "zip_code", "country", "state", "created_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UsersInfoFields from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UsersInfoFields from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "name": obj.get("name"), + "email": obj.get("email"), + "business": obj.get("business"), + "company_name": obj.get("company_name"), + "vat_number": obj.get("vat_number"), + "phone": obj.get("phone"), + "billing_address1": obj.get("billing_address1"), + "billing_address2": obj.get("billing_address2"), + "zip_code": obj.get("zip_code"), + "country": obj.get("country"), + "state": obj.get("state"), + "created_at": obj.get("created_at") + }) + return _obj + + diff --git a/hyperstack/models/users_info_list_response.py b/hyperstack/models/users_info_list_response.py new file mode 100644 index 0000000..9627922 --- /dev/null +++ b/hyperstack/models/users_info_list_response.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hyperstack.models.users_info_fields import UsersInfoFields +from typing import Optional, Set +from typing_extensions import Self + +class UsersInfoListResponse(BaseModel): + """ + UsersInfoListResponse + """ # noqa: E501 + status: Optional[StrictBool] = None + message: Optional[StrictStr] = None + users_info: Optional[UsersInfoFields] = None + __properties: ClassVar[List[str]] = ["status", "message", "users_info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UsersInfoListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of users_info + if self.users_info: + _dict['users_info'] = self.users_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UsersInfoListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "message": obj.get("message"), + "users_info": UsersInfoFields.from_dict(obj["users_info"]) if obj.get("users_info") is not None else None + }) + return _obj + + diff --git a/hyperstack/models/api_key_payload.py b/hyperstack/models/verify_api_key_payload.py similarity index 84% rename from hyperstack/models/api_key_payload.py rename to hyperstack/models/verify_api_key_payload.py index 6080593..e0f865b 100644 --- a/hyperstack/models/api_key_payload.py +++ b/hyperstack/models/verify_api_key_payload.py @@ -17,23 +17,23 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class APIKeyPayload(BaseModel): +class VerifyApiKeyPayload(BaseModel): """ - APIKeyPayload + VerifyApiKeyPayload """ # noqa: E501 api_key: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["api_key"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -47,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of APIKeyPayload from a JSON string""" + """Create an instance of VerifyApiKeyPayload from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of APIKeyPayload from a dict""" + """Create an instance of VerifyApiKeyPayload from a dict""" if obj is None: return None diff --git a/hyperstack/models/api_key_verify_response.py b/hyperstack/models/verify_api_key_response_model.py similarity index 85% rename from hyperstack/models/api_key_verify_response.py rename to hyperstack/models/verify_api_key_response_model.py index efba9fe..44a2124 100644 --- a/hyperstack/models/api_key_verify_response.py +++ b/hyperstack/models/verify_api_key_response_model.py @@ -17,26 +17,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.api_key_verify_fields import ApiKeyVerifyFields from typing import Optional, Set from typing_extensions import Self -class ApiKeyVerifyResponse(BaseModel): +class VerifyApiKeyResponseModel(BaseModel): """ - ApiKeyVerifyResponse + VerifyApiKeyResponseModel """ # noqa: E501 status: Optional[StrictBool] = None message: Optional[StrictStr] = None api_key: Optional[ApiKeyVerifyFields] = None __properties: ClassVar[List[str]] = ["status", "message", "api_key"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ApiKeyVerifyResponse from a JSON string""" + """Create an instance of VerifyApiKeyResponseModel from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ApiKeyVerifyResponse from a dict""" + """Create an instance of VerifyApiKeyResponseModel from a dict""" if obj is None: return None diff --git a/hyperstack/models/vncurl.py b/hyperstack/models/vncurl.py index 614a651..db559a6 100644 --- a/hyperstack/models/vncurl.py +++ b/hyperstack/models/vncurl.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.vncurl_fields import VNCURLFields from typing import Optional, Set @@ -32,11 +32,11 @@ class VNCURL(BaseModel): vnc_url: Optional[VNCURLFields] = None __properties: ClassVar[List[str]] = ["status", "message", "vnc_url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/vncurl_fields.py b/hyperstack/models/vncurl_fields.py index a68e36c..724f9dd 100644 --- a/hyperstack/models/vncurl_fields.py +++ b/hyperstack/models/vncurl_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,11 +30,11 @@ class VNCURLFields(BaseModel): vnc_url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "vnc_url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/volume.py b/hyperstack/models/volume.py index 8e2be15..b13393a 100644 --- a/hyperstack/models/volume.py +++ b/hyperstack/models/volume.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.volume_fields import VolumeFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Volume(BaseModel): volume: Optional[VolumeFields] = None __properties: ClassVar[List[str]] = ["status", "message", "volume"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/volume_attachment_fields.py b/hyperstack/models/volume_attachment_fields.py index 16e3657..1f902c9 100644 --- a/hyperstack/models/volume_attachment_fields.py +++ b/hyperstack/models/volume_attachment_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.volume_fieldsfor_instance import VolumeFieldsforInstance from typing import Optional, Set @@ -34,11 +34,11 @@ class VolumeAttachmentFields(BaseModel): created_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["volume", "status", "device", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/volume_fields.py b/hyperstack/models/volume_fields.py index 48dbe3c..5dcb1aa 100644 --- a/hyperstack/models/volume_fields.py +++ b/hyperstack/models/volume_fields.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.environment_fieldsfor_volume import EnvironmentFieldsforVolume from typing import Optional, Set @@ -42,11 +42,11 @@ class VolumeFields(BaseModel): updated_at: Optional[datetime] = None __properties: ClassVar[List[str]] = ["id", "name", "environment", "description", "volume_type", "size", "status", "bootable", "image_id", "callback_url", "created_at", "updated_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/volume_fieldsfor_instance.py b/hyperstack/models/volume_fieldsfor_instance.py index 8d1ba31..da49a31 100644 --- a/hyperstack/models/volume_fieldsfor_instance.py +++ b/hyperstack/models/volume_fieldsfor_instance.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,11 @@ class VolumeFieldsforInstance(BaseModel): size: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["id", "name", "description", "volume_type", "size"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/volume_overview_fields.py b/hyperstack/models/volume_overview_fields.py index 86546a7..38b8091 100644 --- a/hyperstack/models/volume_overview_fields.py +++ b/hyperstack/models/volume_overview_fields.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictFloat, StrictInt +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class VolumeOverviewFields(BaseModel): cost_per_hour: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["count", "using", "cost_per_hour"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/volume_types.py b/hyperstack/models/volume_types.py index a4bd032..61825f2 100644 --- a/hyperstack/models/volume_types.py +++ b/hyperstack/models/volume_types.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,11 +31,11 @@ class VolumeTypes(BaseModel): volume_types: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["status", "message", "volume_types"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack/models/volumes.py b/hyperstack/models/volumes.py index fa0acfe..5724414 100644 --- a/hyperstack/models/volumes.py +++ b/hyperstack/models/volumes.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from hyperstack.models.volume_fields import VolumeFields from typing import Optional, Set @@ -32,11 +32,11 @@ class Volumes(BaseModel): volumes: Optional[List[VolumeFields]] = None __properties: ClassVar[List[str]] = ["status", "message", "volumes"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: diff --git a/hyperstack_README.md b/hyperstack_README.md deleted file mode 100644 index e048a13..0000000 --- a/hyperstack_README.md +++ /dev/null @@ -1,406 +0,0 @@ -# hyperstack -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - -The `hyperstack` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 3.7+ - -## Installation & Usage - -This python library package is generated without supporting files like setup.py or requirements files - -To be able to use it, you will need these dependencies in your own package that uses this library: - -* urllib3 >= 1.25.3 -* python-dateutil -* pydantic - -## Getting Started - -In your own code, to use this library to connect and interact with hyperstack, -you can run the following: - -```python - -import hyperstack -from hyperstack.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = hyperstack.Configuration( - host = "https://infrahub-api.nexgencloud.com/v1" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: apiKey -configuration.api_key['apiKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['apiKey'] = 'Bearer' - -# Configure API key authorization: accessToken -configuration.api_key['accessToken'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['accessToken'] = 'Bearer' - - -# Enter a context with an instance of the API client -with hyperstack.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hyperstack.PricebookApi(api_client) - - try: - api_response = api_instance.retrive_pricebook() - print("The response of PricebookApi->retrive_pricebook:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling PricebookApi->retrive_pricebook: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://infrahub-api.nexgencloud.com/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*PricebookApi* | [**retrive_pricebook**](hyperstack/docs/PricebookApi.md#retrive_pricebook) | **GET** /pricebook | -*AliveApi* | [**get_alive**](hyperstack/docs/AliveApi.md#get_alive) | **GET** /billing/alive | GET: Alive -*ApiKeyApi* | [**generate_api_key**](hyperstack/docs/ApiKeyApi.md#generate_api_key) | **POST** /api-key/generate | Generate API Key -*ApiKeyApi* | [**get_api_key**](hyperstack/docs/ApiKeyApi.md#get_api_key) | **GET** /api-key | Get API Key -*AssigningMemberRoleApi* | [**assign_rbac_roles**](hyperstack/docs/AssigningMemberRoleApi.md#assign_rbac_roles) | **PUT** /auth/users/{user_id}/assign-roles | Assign RBAC Roles -*AssigningMemberRoleApi* | [**remove_role_from_a_user**](hyperstack/docs/AssigningMemberRoleApi.md#remove_role_from_a_user) | **DELETE** /auth/users/{user_id}/roles | Remove role from a user -*AuthApi* | [**auth_user_information**](hyperstack/docs/AuthApi.md#auth_user_information) | **GET** /auth/me | Get me information -*BillingApi* | [**get_last_day_cost**](hyperstack/docs/BillingApi.md#get_last_day_cost) | **GET** /billing/billing/last-day-cost | GET: Last Day Cost -*BillingApi* | [**get_usage**](hyperstack/docs/BillingApi.md#get_usage) | **GET** /billing/billing/usage | GET: Billing usage -*CallbacksApi* | [**attach_a_callback_to_a_volume**](hyperstack/docs/CallbacksApi.md#attach_a_callback_to_a_volume) | **POST** /core/volumes/{id}/attach-callback | Attach a callback to a volume -*CallbacksApi* | [**attach_a_callback_to_an_instance**](hyperstack/docs/CallbacksApi.md#attach_a_callback_to_an_instance) | **POST** /core/virtual-machines/{id}/attach-callback | Attach a callback to an instance -*CallbacksApi* | [**delete_a_callback_url_for_an_instance**](hyperstack/docs/CallbacksApi.md#delete_a_callback_url_for_an_instance) | **DELETE** /core/virtual-machines/{id}/delete-callback | Delete a callback URL for an instance -*CallbacksApi* | [**delete_callback_url_for_a_volume**](hyperstack/docs/CallbacksApi.md#delete_callback_url_for_a_volume) | **DELETE** /core/volumes/{id}/delete-callback | Delete callback URL for a volume -*CallbacksApi* | [**update_a_callback_url**](hyperstack/docs/CallbacksApi.md#update_a_callback_url) | **PUT** /core/virtual-machines/{id}/update-callback | Update a callback URL -*CallbacksApi* | [**update_callback_url_for_volume**](hyperstack/docs/CallbacksApi.md#update_callback_url_for_volume) | **PUT** /core/volumes/{id}/update-callback | Update callback URL for volume -*ComplianceApi* | [**create_compliance**](hyperstack/docs/ComplianceApi.md#create_compliance) | **POST** /core/compliance | Create Compliance -*ComplianceApi* | [**delete_a_compliance**](hyperstack/docs/ComplianceApi.md#delete_a_compliance) | **DELETE** /core/compliance/{gpu_model} | Delete a compliance -*ComplianceApi* | [**get_compliance_list**](hyperstack/docs/ComplianceApi.md#get_compliance_list) | **GET** /core/compliance | Get Compliance List -*ComplianceApi* | [**update_a_compliance**](hyperstack/docs/ComplianceApi.md#update_a_compliance) | **PUT** /core/compliance | Update a compliance -*CreditApi* | [**check_balance_as_an_organization**](hyperstack/docs/CreditApi.md#check_balance_as_an_organization) | **GET** /billing/user-credit/credit | GET: View credit and threshold -*DashboardApi* | [**get_instances_containers_and_volumes_overview**](hyperstack/docs/DashboardApi.md#get_instances_containers_and_volumes_overview) | **GET** /core/dashboard | Get Instances, Containers and Volumes Overview -*DeploymentApi* | [**delete_deployment**](hyperstack/docs/DeploymentApi.md#delete_deployment) | **DELETE** /core/marketplace/deployments/{id} | Delete Deployment -*DeploymentApi* | [**details_of_deployment_by_id**](hyperstack/docs/DeploymentApi.md#details_of_deployment_by_id) | **GET** /core/marketplace/deployments/{id} | Details of Deployment by ID -*DeploymentApi* | [**list_deployments**](hyperstack/docs/DeploymentApi.md#list_deployments) | **GET** /core/marketplace/deployments | List Deployments -*DeploymentApi* | [**start_deployment**](hyperstack/docs/DeploymentApi.md#start_deployment) | **POST** /core/marketplace/deployments | Start Deployment -*EnvironmentApi* | [**create_environment**](hyperstack/docs/EnvironmentApi.md#create_environment) | **POST** /core/environments | Create Environment -*EnvironmentApi* | [**delete_an_environment**](hyperstack/docs/EnvironmentApi.md#delete_an_environment) | **DELETE** /core/environments/{id} | Delete an environment -*EnvironmentApi* | [**get_an_environment_details**](hyperstack/docs/EnvironmentApi.md#get_an_environment_details) | **GET** /core/environments/{id} | Get an environment detail -*EnvironmentApi* | [**list_environments**](hyperstack/docs/EnvironmentApi.md#list_environments) | **GET** /core/environments | List Environments -*EnvironmentApi* | [**update_an_environment**](hyperstack/docs/EnvironmentApi.md#update_an_environment) | **PUT** /core/environments/{id} | Update Environment -*FlavorApi* | [**retrieve_flavors**](hyperstack/docs/FlavorApi.md#retrieve_flavors) | **GET** /core/flavors | Retrieve Flavors -*FloatingIpApi* | [**attach_floating_ip_to_instance**](hyperstack/docs/FloatingIpApi.md#attach_floating_ip_to_instance) | **POST** /core/virtual-machines/{id}/attach-floatingip | Attach Floating IP to Instance -*FloatingIpApi* | [**detach_floating_ip_to_instance**](hyperstack/docs/FloatingIpApi.md#detach_floating_ip_to_instance) | **POST** /core/virtual-machines/{id}/detach-floatingip | Detach Floating IP to Instance -*GpuApi* | [**get_gpu_list**](hyperstack/docs/GpuApi.md#get_gpu_list) | **GET** /core/gpus | Get GPU List -*ImageApi* | [**retrieve_images**](hyperstack/docs/ImageApi.md#retrieve_images) | **GET** /core/images | Retrieve Images -*InviteApi* | [**delete_invite**](hyperstack/docs/InviteApi.md#delete_invite) | **DELETE** /auth/invites/{id} | Delete Invite -*InviteApi* | [**invite_an_user_to_organization**](hyperstack/docs/InviteApi.md#invite_an_user_to_organization) | **POST** /auth/invites | Invite an user to organization -*InviteApi* | [**list_invites**](hyperstack/docs/InviteApi.md#list_invites) | **GET** /auth/invites | List Invites -*KeypairApi* | [**delete_keypair**](hyperstack/docs/KeypairApi.md#delete_keypair) | **DELETE** /core/keypair/{id} | Delete Keypair -*KeypairApi* | [**import_keypair**](hyperstack/docs/KeypairApi.md#import_keypair) | **POST** /core/keypairs | Import Keypair -*KeypairApi* | [**retrieve_user_keypairs**](hyperstack/docs/KeypairApi.md#retrieve_user_keypairs) | **GET** /core/keypairs | Retrieve Keypairs -*KeypairApi* | [**update_keypair_name**](hyperstack/docs/KeypairApi.md#update_keypair_name) | **PUT** /core/keypair/{id} | Update Keypair name -*OrganizationApi* | [**get_organization_info**](hyperstack/docs/OrganizationApi.md#get_organization_info) | **GET** /auth/organizations | Organization Info -*OrganizationApi* | [**remove_a_member_from_organization**](hyperstack/docs/OrganizationApi.md#remove_a_member_from_organization) | **POST** /auth/organizations/remove-member | Remove a member from organization -*PaymentApi* | [**get_details**](hyperstack/docs/PaymentApi.md#get_details) | **GET** /billing/payment/payment-details | GET: View payment details -*PaymentApi* | [**post_payment**](hyperstack/docs/PaymentApi.md#post_payment) | **POST** /billing/payment/payment-initiate | POST: Initiate payment -*PermissionApi* | [**list_permissions**](hyperstack/docs/PermissionApi.md#list_permissions) | **GET** /auth/permissions | List Permissions -*PolicyApi* | [**list_policies**](hyperstack/docs/PolicyApi.md#list_policies) | **GET** /auth/policies | List Policies -*ProfileApi* | [**create_profile**](hyperstack/docs/ProfileApi.md#create_profile) | **POST** /core/profiles | Create a profile -*ProfileApi* | [**delete_profile**](hyperstack/docs/ProfileApi.md#delete_profile) | **DELETE** /core/profiles/{id} | Delete Profile -*ProfileApi* | [**get_a_profile_detail**](hyperstack/docs/ProfileApi.md#get_a_profile_detail) | **GET** /core/profiles/{id} | Get a Profile Detail -*ProfileApi* | [**get_profile_list**](hyperstack/docs/ProfileApi.md#get_profile_list) | **GET** /core/profiles | Get Profile List -*RbacRoleApi* | [**create_rbac_role**](hyperstack/docs/RbacRoleApi.md#create_rbac_role) | **POST** /auth/roles | Create RBAC Role -*RbacRoleApi* | [**delete_a_rbac_role**](hyperstack/docs/RbacRoleApi.md#delete_a_rbac_role) | **DELETE** /auth/roles/{id} | Delete a RBAC Role -*RbacRoleApi* | [**get_a_rbac_role_detail**](hyperstack/docs/RbacRoleApi.md#get_a_rbac_role_detail) | **GET** /auth/roles/{id} | Get a RBAC Role Detail -*RbacRoleApi* | [**list_rbac_roles**](hyperstack/docs/RbacRoleApi.md#list_rbac_roles) | **GET** /auth/roles | List RBAC Roles -*RbacRoleApi* | [**update_a_rbac_role**](hyperstack/docs/RbacRoleApi.md#update_a_rbac_role) | **PUT** /auth/roles/{id} | Update a RBAC Role -*RegionApi* | [**getting_regions**](hyperstack/docs/RegionApi.md#getting_regions) | **GET** /core/regions | Getting regions -*SecurityRulesApi* | [**retrieve_security_rule_protocols**](hyperstack/docs/SecurityRulesApi.md#retrieve_security_rule_protocols) | **GET** /core/sg-rules-protocols | Retrieve Security Rule Protocols -*StockApi* | [**retrieve_stocks**](hyperstack/docs/StockApi.md#retrieve_stocks) | **GET** /core/stocks | -*TemplateApi* | [**create_template**](hyperstack/docs/TemplateApi.md#create_template) | **POST** /core/marketplace/templates | Create Template -*TemplateApi* | [**delete_a_template**](hyperstack/docs/TemplateApi.md#delete_a_template) | **DELETE** /core/marketplace/templates/{id} | Delete a Template -*TemplateApi* | [**details_of_a_template_by_id**](hyperstack/docs/TemplateApi.md#details_of_a_template_by_id) | **GET** /core/marketplace/templates/{id} | Details of a Template by ID -*TemplateApi* | [**list_templates**](hyperstack/docs/TemplateApi.md#list_templates) | **GET** /core/marketplace/templates | List Templates -*TemplateApi* | [**update_template**](hyperstack/docs/TemplateApi.md#update_template) | **PUT** /core/marketplace/templates/{id} | Update Template -*UserPermissionApi* | [**list_current_user_permissions**](hyperstack/docs/UserPermissionApi.md#list_current_user_permissions) | **GET** /auth/users/me/permissions | List Current User Permissions -*UserPermissionApi* | [**list_user_permissions**](hyperstack/docs/UserPermissionApi.md#list_user_permissions) | **GET** /auth/users/{id}/permissions | List User Permissions -*VirtualMachineApi* | [**add_security_rule**](hyperstack/docs/VirtualMachineApi.md#add_security_rule) | **POST** /core/virtual-machines/{id}/sg-rules | Add Security Rule -*VirtualMachineApi* | [**create_instances**](hyperstack/docs/VirtualMachineApi.md#create_instances) | **POST** /core/virtual-machines | Create Instances -*VirtualMachineApi* | [**delete_a_security_rule**](hyperstack/docs/VirtualMachineApi.md#delete_a_security_rule) | **DELETE** /core/virtual-machines/{virtual_machine_id}/sg-rules/{sg_rule_id} | Delete a security group rule -*VirtualMachineApi* | [**delete_an_instance**](hyperstack/docs/VirtualMachineApi.md#delete_an_instance) | **DELETE** /core/virtual-machines/{id} | Delete an instance -*VirtualMachineApi* | [**get_an_instance_details**](hyperstack/docs/VirtualMachineApi.md#get_an_instance_details) | **GET** /core/virtual-machines/{id} | Get an instance details -*VirtualMachineApi* | [**hard_reboot_instance**](hyperstack/docs/VirtualMachineApi.md#hard_reboot_instance) | **GET** /core/virtual-machines/{id}/hard-reboot | Hard Reboot Instance -*VirtualMachineApi* | [**hibernate_instance**](hyperstack/docs/VirtualMachineApi.md#hibernate_instance) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate | Hibernate Instance -*VirtualMachineApi* | [**list_instances**](hyperstack/docs/VirtualMachineApi.md#list_instances) | **GET** /core/virtual-machines | List Instances -*VirtualMachineApi* | [**resize_virtual_machine**](hyperstack/docs/VirtualMachineApi.md#resize_virtual_machine) | **POST** /core/virtual-machines/{virtual_machine_id}/resize | Resize Virtual Machine -*VirtualMachineApi* | [**restore_instance_from_hibernation**](hyperstack/docs/VirtualMachineApi.md#restore_instance_from_hibernation) | **GET** /core/virtual-machines/{virtual_machine_id}/hibernate-restore | Restore Instance from Hibernation -*VirtualMachineApi* | [**retrieved_metrics_successfully**](hyperstack/docs/VirtualMachineApi.md#retrieved_metrics_successfully) | **GET** /core/virtual-machines/{virtual_machine_id}/metrics | Get instance metrics -*VirtualMachineApi* | [**start_instance**](hyperstack/docs/VirtualMachineApi.md#start_instance) | **GET** /core/virtual-machines/{id}/start | Start Instance -*VirtualMachineApi* | [**stop_instance**](hyperstack/docs/VirtualMachineApi.md#stop_instance) | **GET** /core/virtual-machines/{id}/stop | Stop Instance -*VirtualMachineEventsApi* | [**fetch_all_of_the_instance_events**](hyperstack/docs/VirtualMachineEventsApi.md#fetch_all_of_the_instance_events) | **GET** /core/virtual-machines/{virtual_machine_id}/events | Fetch all of the instance events -*VncUrlApi* | [**get_vnc_console_link**](hyperstack/docs/VncUrlApi.md#get_vnc_console_link) | **GET** /core/virtual-machines/{virtual_machine_id}/console/{job_id} | Get VNC Console Link -*VncUrlApi* | [**request_console**](hyperstack/docs/VncUrlApi.md#request_console) | **GET** /core/virtual-machines/{id}/request-console | Request Instance Console -*VolumeApi* | [**create_volume**](hyperstack/docs/VolumeApi.md#create_volume) | **POST** /core/volumes | Create Volume -*VolumeApi* | [**delete_volume**](hyperstack/docs/VolumeApi.md#delete_volume) | **DELETE** /core/volumes/{id} | Delete Volume -*VolumeApi* | [**get_volume_types**](hyperstack/docs/VolumeApi.md#get_volume_types) | **GET** /core/volume-types | GET Volume Types -*VolumeApi* | [**list_volumes**](hyperstack/docs/VolumeApi.md#list_volumes) | **GET** /core/volumes | List Volumes -*VolumeAttachmentApi* | [**attach_volumes**](hyperstack/docs/VolumeAttachmentApi.md#attach_volumes) | **POST** /core/virtual-machines/{virtual_machine_id}/attach-volumes | Attach Volumes -*VolumeAttachmentApi* | [**detach_volumes**](hyperstack/docs/VolumeAttachmentApi.md#detach_volumes) | **POST** /core/virtual-machines/{virtual_machine_id}/detach-volumes | Detach Volumes - - -## Documentation For Models - - - [APIKey](hyperstack/docs/APIKey.md) - - [APIKeyFields](hyperstack/docs/APIKeyFields.md) - - [APIKeyGeneration](hyperstack/docs/APIKeyGeneration.md) - - [APIKeyPayload](hyperstack/docs/APIKeyPayload.md) - - [AdminAddOrganizationPayload](hyperstack/docs/AdminAddOrganizationPayload.md) - - [AdminCreditPostPayload](hyperstack/docs/AdminCreditPostPayload.md) - - [AdminRechargeHistoryFields](hyperstack/docs/AdminRechargeHistoryFields.md) - - [AdminRechargeHistoryResponse](hyperstack/docs/AdminRechargeHistoryResponse.md) - - [AdminThresholdPostPayload](hyperstack/docs/AdminThresholdPostPayload.md) - - [ApiKeyVerifyFields](hyperstack/docs/ApiKeyVerifyFields.md) - - [ApiKeyVerifyResponse](hyperstack/docs/ApiKeyVerifyResponse.md) - - [AssignRBACRolePayload](hyperstack/docs/AssignRBACRolePayload.md) - - [AttachCallbackPayload](hyperstack/docs/AttachCallbackPayload.md) - - [AttachCallbackResponse](hyperstack/docs/AttachCallbackResponse.md) - - [AttachVolumeFields](hyperstack/docs/AttachVolumeFields.md) - - [AttachVolumes](hyperstack/docs/AttachVolumes.md) - - [AttachVolumesPayload](hyperstack/docs/AttachVolumesPayload.md) - - [BillingMetricesFields](hyperstack/docs/BillingMetricesFields.md) - - [BillingMetricesResponse](hyperstack/docs/BillingMetricesResponse.md) - - [BillingResponse](hyperstack/docs/BillingResponse.md) - - [ClusterResource](hyperstack/docs/ClusterResource.md) - - [ComplianceFields](hyperstack/docs/ComplianceFields.md) - - [ComplianceModelFields](hyperstack/docs/ComplianceModelFields.md) - - [CompliancePayload](hyperstack/docs/CompliancePayload.md) - - [ComplianceResponse](hyperstack/docs/ComplianceResponse.md) - - [ContainerOverviewFields](hyperstack/docs/ContainerOverviewFields.md) - - [ContainerResource](hyperstack/docs/ContainerResource.md) - - [CreateDiscountResponse](hyperstack/docs/CreateDiscountResponse.md) - - [CreateDiscountsPayload](hyperstack/docs/CreateDiscountsPayload.md) - - [CreateEnvironment](hyperstack/docs/CreateEnvironment.md) - - [CreateGPU](hyperstack/docs/CreateGPU.md) - - [CreateInstancesPayload](hyperstack/docs/CreateInstancesPayload.md) - - [CreateProfilePayload](hyperstack/docs/CreateProfilePayload.md) - - [CreateProfileResponse](hyperstack/docs/CreateProfileResponse.md) - - [CreateSecurityRulePayload](hyperstack/docs/CreateSecurityRulePayload.md) - - [CreateUpdateComplianceResponse](hyperstack/docs/CreateUpdateComplianceResponse.md) - - [CreateVolumePayload](hyperstack/docs/CreateVolumePayload.md) - - [DashboardInfoResponse](hyperstack/docs/DashboardInfoResponse.md) - - [DeploymentFields](hyperstack/docs/DeploymentFields.md) - - [DeploymentFieldsForStartDeployments](hyperstack/docs/DeploymentFieldsForStartDeployments.md) - - [Deployments](hyperstack/docs/Deployments.md) - - [DetachVolumes](hyperstack/docs/DetachVolumes.md) - - [DetachVolumesPayload](hyperstack/docs/DetachVolumesPayload.md) - - [DiscountDetailResponse](hyperstack/docs/DiscountDetailResponse.md) - - [DiscountResourceFields](hyperstack/docs/DiscountResourceFields.md) - - [Environment](hyperstack/docs/Environment.md) - - [EnvironmentFields](hyperstack/docs/EnvironmentFields.md) - - [EnvironmentFieldsForVolume](hyperstack/docs/EnvironmentFieldsForVolume.md) - - [Environments](hyperstack/docs/Environments.md) - - [EnvrionmentResources](hyperstack/docs/EnvrionmentResources.md) - - [ErrorResponseModel](hyperstack/docs/ErrorResponseModel.md) - - [FlavorFields](hyperstack/docs/FlavorFields.md) - - [FlavorItemGetResponse](hyperstack/docs/FlavorItemGetResponse.md) - - [FlavorListResponse](hyperstack/docs/FlavorListResponse.md) - - [FlavorObjectFields](hyperstack/docs/FlavorObjectFields.md) - - [FlavorPayload](hyperstack/docs/FlavorPayload.md) - - [FlavorResource](hyperstack/docs/FlavorResource.md) - - [FlavorResponse](hyperstack/docs/FlavorResponse.md) - - [FutureNodeModel](hyperstack/docs/FutureNodeModel.md) - - [FutureNodeResponseModel](hyperstack/docs/FutureNodeResponseModel.md) - - [FutureNodeStockModel](hyperstack/docs/FutureNodeStockModel.md) - - [FutureNodeUpdateModel](hyperstack/docs/FutureNodeUpdateModel.md) - - [FutureNodesStockModel](hyperstack/docs/FutureNodesStockModel.md) - - [GPU](hyperstack/docs/GPU.md) - - [GPUFields](hyperstack/docs/GPUFields.md) - - [GPUList](hyperstack/docs/GPUList.md) - - [GPURegionFields](hyperstack/docs/GPURegionFields.md) - - [GetAllDiscountForAllOrganizationResponse](hyperstack/docs/GetAllDiscountForAllOrganizationResponse.md) - - [GetCreditAndThresholdInfo](hyperstack/docs/GetCreditAndThresholdInfo.md) - - [GetCreditAndThresholdInfoInResponse](hyperstack/docs/GetCreditAndThresholdInfoInResponse.md) - - [GetToken](hyperstack/docs/GetToken.md) - - [GetTokenResponse](hyperstack/docs/GetTokenResponse.md) - - [ImageFields](hyperstack/docs/ImageFields.md) - - [ImageGetResponse](hyperstack/docs/ImageGetResponse.md) - - [ImageLogos](hyperstack/docs/ImageLogos.md) - - [Images](hyperstack/docs/Images.md) - - [ImportKeypairPayload](hyperstack/docs/ImportKeypairPayload.md) - - [ImportKeypairResponse](hyperstack/docs/ImportKeypairResponse.md) - - [InfrahubResourceObjectResponse](hyperstack/docs/InfrahubResourceObjectResponse.md) - - [InsertDiscountPlanFields](hyperstack/docs/InsertDiscountPlanFields.md) - - [Instance](hyperstack/docs/Instance.md) - - [InstanceAdminFields](hyperstack/docs/InstanceAdminFields.md) - - [InstanceEnvironmentFields](hyperstack/docs/InstanceEnvironmentFields.md) - - [InstanceEvents](hyperstack/docs/InstanceEvents.md) - - [InstanceEventsFields](hyperstack/docs/InstanceEventsFields.md) - - [InstanceFlavorFields](hyperstack/docs/InstanceFlavorFields.md) - - [InstanceImageFields](hyperstack/docs/InstanceImageFields.md) - - [InstanceKeypairFields](hyperstack/docs/InstanceKeypairFields.md) - - [InstanceOverviewFields](hyperstack/docs/InstanceOverviewFields.md) - - [InstanceResizePayload](hyperstack/docs/InstanceResizePayload.md) - - [InstanceResources](hyperstack/docs/InstanceResources.md) - - [Instances](hyperstack/docs/Instances.md) - - [InternalEnvironmentFields](hyperstack/docs/InternalEnvironmentFields.md) - - [InternalInstanceFields](hyperstack/docs/InternalInstanceFields.md) - - [InternalInstanceFlavorFields](hyperstack/docs/InternalInstanceFlavorFields.md) - - [InternalInstanceImageFields](hyperstack/docs/InternalInstanceImageFields.md) - - [InternalInstanceKeypairFields](hyperstack/docs/InternalInstanceKeypairFields.md) - - [InternalInstancesResponse](hyperstack/docs/InternalInstancesResponse.md) - - [InternalSecurityRulesFieldsForInstance](hyperstack/docs/InternalSecurityRulesFieldsForInstance.md) - - [InternalVolumeAttachmentFields](hyperstack/docs/InternalVolumeAttachmentFields.md) - - [InternalVolumeFields](hyperstack/docs/InternalVolumeFields.md) - - [InternalVolumesResponse](hyperstack/docs/InternalVolumesResponse.md) - - [Invite](hyperstack/docs/Invite.md) - - [InviteFields](hyperstack/docs/InviteFields.md) - - [InviteUser](hyperstack/docs/InviteUser.md) - - [Invites](hyperstack/docs/Invites.md) - - [KeypairFields](hyperstack/docs/KeypairFields.md) - - [Keypairs](hyperstack/docs/Keypairs.md) - - [LastDayCostFields](hyperstack/docs/LastDayCostFields.md) - - [LastDayCostResponse](hyperstack/docs/LastDayCostResponse.md) - - [LogoGetResponse](hyperstack/docs/LogoGetResponse.md) - - [Logout](hyperstack/docs/Logout.md) - - [NewConfigurationsResponse](hyperstack/docs/NewConfigurationsResponse.md) - - [NewModelResponse](hyperstack/docs/NewModelResponse.md) - - [NewStockResponse](hyperstack/docs/NewStockResponse.md) - - [NewStockRetriveResponse](hyperstack/docs/NewStockRetriveResponse.md) - - [NewStockUpdateResponseModel](hyperstack/docs/NewStockUpdateResponseModel.md) - - [NodeModel](hyperstack/docs/NodeModel.md) - - [NodePayloadModel](hyperstack/docs/NodePayloadModel.md) - - [NodePowerUsageModel](hyperstack/docs/NodePowerUsageModel.md) - - [NodeResponseModel](hyperstack/docs/NodeResponseModel.md) - - [NodeStockPayloadModel](hyperstack/docs/NodeStockPayloadModel.md) - - [NodeStockResponseModel](hyperstack/docs/NodeStockResponseModel.md) - - [NodeStocksPayload](hyperstack/docs/NodeStocksPayload.md) - - [OrganizationInfoModel](hyperstack/docs/OrganizationInfoModel.md) - - [OrganizationModel](hyperstack/docs/OrganizationModel.md) - - [OrganizationObjectResponse](hyperstack/docs/OrganizationObjectResponse.md) - - [OrganizationResourceList](hyperstack/docs/OrganizationResourceList.md) - - [OrganizationResourceResponse](hyperstack/docs/OrganizationResourceResponse.md) - - [OrganizationResources](hyperstack/docs/OrganizationResources.md) - - [OrganizationResponseModel](hyperstack/docs/OrganizationResponseModel.md) - - [OrganizationUserModel](hyperstack/docs/OrganizationUserModel.md) - - [OrganizationsResponseModel](hyperstack/docs/OrganizationsResponseModel.md) - - [OverviewInfo](hyperstack/docs/OverviewInfo.md) - - [PaymentDetailsFields](hyperstack/docs/PaymentDetailsFields.md) - - [PaymentDetailsResponse](hyperstack/docs/PaymentDetailsResponse.md) - - [PaymentInitiateFields](hyperstack/docs/PaymentInitiateFields.md) - - [PaymentInitiatePayload](hyperstack/docs/PaymentInitiatePayload.md) - - [PaymentInitiateResponse](hyperstack/docs/PaymentInitiateResponse.md) - - [PermissionFields](hyperstack/docs/PermissionFields.md) - - [PermissionFieldsForUserPermission](hyperstack/docs/PermissionFieldsForUserPermission.md) - - [PermissionPayload](hyperstack/docs/PermissionPayload.md) - - [PermissionResponse](hyperstack/docs/PermissionResponse.md) - - [Permissions](hyperstack/docs/Permissions.md) - - [PermissionsForUserPermission](hyperstack/docs/PermissionsForUserPermission.md) - - [Policies](hyperstack/docs/Policies.md) - - [PolicyFields](hyperstack/docs/PolicyFields.md) - - [PolicyPayload](hyperstack/docs/PolicyPayload.md) - - [PolicyPermissionFields](hyperstack/docs/PolicyPermissionFields.md) - - [PolicyResponse](hyperstack/docs/PolicyResponse.md) - - [PowerUsageModel](hyperstack/docs/PowerUsageModel.md) - - [PricebookModel](hyperstack/docs/PricebookModel.md) - - [PricebookResourceObjectResponse](hyperstack/docs/PricebookResourceObjectResponse.md) - - [ProfileFields](hyperstack/docs/ProfileFields.md) - - [ProfileListResponse](hyperstack/docs/ProfileListResponse.md) - - [ProfileObjectFields](hyperstack/docs/ProfileObjectFields.md) - - [RBACRole](hyperstack/docs/RBACRole.md) - - [RBACRoleFieldForOrganization](hyperstack/docs/RBACRoleFieldForOrganization.md) - - [RBACRoleFields](hyperstack/docs/RBACRoleFields.md) - - [RBACRolePayload](hyperstack/docs/RBACRolePayload.md) - - [RBACRoles](hyperstack/docs/RBACRoles.md) - - [RefreshToken](hyperstack/docs/RefreshToken.md) - - [RegionFields](hyperstack/docs/RegionFields.md) - - [RegionPayload](hyperstack/docs/RegionPayload.md) - - [RegionResponse](hyperstack/docs/RegionResponse.md) - - [Regions](hyperstack/docs/Regions.md) - - [RemoveMember](hyperstack/docs/RemoveMember.md) - - [RemoveMemberResponse](hyperstack/docs/RemoveMemberResponse.md) - - [RequestConsole](hyperstack/docs/RequestConsole.md) - - [RequestLoginDataResponse](hyperstack/docs/RequestLoginDataResponse.md) - - [RequestLoginResponse](hyperstack/docs/RequestLoginResponse.md) - - [ResourcePayload](hyperstack/docs/ResourcePayload.md) - - [ResponseModel](hyperstack/docs/ResponseModel.md) - - [RolePermissionFields](hyperstack/docs/RolePermissionFields.md) - - [RolePolicyFields](hyperstack/docs/RolePolicyFields.md) - - [SecurityGroupRule](hyperstack/docs/SecurityGroupRule.md) - - [SecurityGroupRuleFields](hyperstack/docs/SecurityGroupRuleFields.md) - - [SecurityRulesFieldsForInstance](hyperstack/docs/SecurityRulesFieldsForInstance.md) - - [SecurityRulesProtocolFields](hyperstack/docs/SecurityRulesProtocolFields.md) - - [SingleVisibilityUserResponse](hyperstack/docs/SingleVisibilityUserResponse.md) - - [StartDeployment](hyperstack/docs/StartDeployment.md) - - [StartDeploymentPayload](hyperstack/docs/StartDeploymentPayload.md) - - [StockVisibilityUserListResponse](hyperstack/docs/StockVisibilityUserListResponse.md) - - [StockVisibilityUserPayload](hyperstack/docs/StockVisibilityUserPayload.md) - - [SuccessResponseModel](hyperstack/docs/SuccessResponseModel.md) - - [Template](hyperstack/docs/Template.md) - - [TemplateFields](hyperstack/docs/TemplateFields.md) - - [Templates](hyperstack/docs/Templates.md) - - [TokenFields](hyperstack/docs/TokenFields.md) - - [UpdateDiscountsPayload](hyperstack/docs/UpdateDiscountsPayload.md) - - [UpdateDiscountsStatusPayload](hyperstack/docs/UpdateDiscountsStatusPayload.md) - - [UpdateEnvironment](hyperstack/docs/UpdateEnvironment.md) - - [UpdateGPU](hyperstack/docs/UpdateGPU.md) - - [UpdateKeypairName](hyperstack/docs/UpdateKeypairName.md) - - [UpdateKeypairNameResponse](hyperstack/docs/UpdateKeypairNameResponse.md) - - [UpdateTemplate](hyperstack/docs/UpdateTemplate.md) - - [UserFields](hyperstack/docs/UserFields.md) - - [UserInfoResponse](hyperstack/docs/UserInfoResponse.md) - - [VNCURL](hyperstack/docs/VNCURL.md) - - [VNCURLFields](hyperstack/docs/VNCURLFields.md) - - [Volume](hyperstack/docs/Volume.md) - - [VolumeAttachmentFields](hyperstack/docs/VolumeAttachmentFields.md) - - [VolumeFields](hyperstack/docs/VolumeFields.md) - - [VolumeFieldsForInstance](hyperstack/docs/VolumeFieldsForInstance.md) - - [VolumeOverviewFields](hyperstack/docs/VolumeOverviewFields.md) - - [VolumeResource](hyperstack/docs/VolumeResource.md) - - [VolumeTypes](hyperstack/docs/VolumeTypes.md) - - [Volumes](hyperstack/docs/Volumes.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### accessToken - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - - -### apiKey - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -## Author - - - - diff --git a/openapi/config.yaml b/openapi/config.yaml index 0369cc6..9e42c5c 100644 --- a/openapi/config.yaml +++ b/openapi/config.yaml @@ -3,4 +3,4 @@ inputSpec: /local/openapi/api.json outputDir: /local/ additionalProperties: packageName: hyperstack - packageVersion: 1.0.0 + packageVersion: 1.1.0 diff --git a/pyproject.toml b/pyproject.toml index a59d995..fafd106 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "hyperstack" -version = "3.0.1" +version = "1.1.0" description = "Infrahub-API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 4d9dca2..f44cbb8 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "hyperstack" -VERSION = "3.0.1" +VERSION = "1.1.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/test/test_add_update_flavor_organization_payload.py b/test/test_add_update_flavor_organization_payload.py new file mode 100644 index 0000000..f00b56c --- /dev/null +++ b/test/test_add_update_flavor_organization_payload.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.add_update_flavor_organization_payload import AddUpdateFlavorOrganizationPayload + +class TestAddUpdateFlavorOrganizationPayload(unittest.TestCase): + """AddUpdateFlavorOrganizationPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddUpdateFlavorOrganizationPayload: + """Test AddUpdateFlavorOrganizationPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddUpdateFlavorOrganizationPayload` + """ + model = AddUpdateFlavorOrganizationPayload() + if include_optional: + return AddUpdateFlavorOrganizationPayload( + name = '', + description = '', + openstack_id = '', + region_id = 56, + cpu = 56, + ram = 1.337, + disk = 56, + ephemeral = 56, + gpu_id = 56, + gpu_count = 56, + is_public = True, + organizations = [ + 56 + ] + ) + else: + return AddUpdateFlavorOrganizationPayload( + name = '', + openstack_id = '', + region_id = 56, + cpu = 56, + ram = 1.337, + disk = 56, + gpu_id = 56, + gpu_count = 56, + is_public = True, + organizations = [ + 56 + ], + ) + """ + + def testAddUpdateFlavorOrganizationPayload(self): + """Test AddUpdateFlavorOrganizationPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_add_user_info_success_response_model.py b/test/test_add_user_info_success_response_model.py new file mode 100644 index 0000000..41e2612 --- /dev/null +++ b/test/test_add_user_info_success_response_model.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.add_user_info_success_response_model import AddUserInfoSuccessResponseModel + +class TestAddUserInfoSuccessResponseModel(unittest.TestCase): + """AddUserInfoSuccessResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AddUserInfoSuccessResponseModel: + """Test AddUserInfoSuccessResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AddUserInfoSuccessResponseModel` + """ + model = AddUserInfoSuccessResponseModel() + if include_optional: + return AddUserInfoSuccessResponseModel( + status = True, + message = '', + data = hyperstack.models.users_info_fields.UsersInfoFields( + id = 56, + organization_id = 56, + name = '', + email = '', + business = True, + company_name = '', + vat_number = '', + phone = '', + billing_address1 = '', + billing_address2 = '', + zip_code = '', + country = '', + state = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return AddUserInfoSuccessResponseModel( + ) + """ + + def testAddUserInfoSuccessResponseModel(self): + """Test AddUserInfoSuccessResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_add_update_image_organization_payload.py b/test/test_admin_add_update_image_organization_payload.py new file mode 100644 index 0000000..d65b927 --- /dev/null +++ b/test/test_admin_add_update_image_organization_payload.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_add_update_image_organization_payload import AdminAddUpdateImageOrganizationPayload + +class TestAdminAddUpdateImageOrganizationPayload(unittest.TestCase): + """AdminAddUpdateImageOrganizationPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminAddUpdateImageOrganizationPayload: + """Test AdminAddUpdateImageOrganizationPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminAddUpdateImageOrganizationPayload` + """ + model = AdminAddUpdateImageOrganizationPayload() + if include_optional: + return AdminAddUpdateImageOrganizationPayload( + name = '', + openstack_id = '', + region_id = 56, + type = '', + version = '', + size = 56, + is_public = True, + description = '', + labels = [ + '' + ], + organizations = [ + 56 + ] + ) + else: + return AdminAddUpdateImageOrganizationPayload( + name = '', + openstack_id = '', + region_id = 56, + type = '', + version = '', + size = 56, + is_public = True, + organizations = [ + 56 + ], + ) + """ + + def testAdminAddUpdateImageOrganizationPayload(self): + """Test AdminAddUpdateImageOrganizationPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_bootstrap_environment_payload.py b/test/test_admin_bootstrap_environment_payload.py new file mode 100644 index 0000000..ba81f69 --- /dev/null +++ b/test/test_admin_bootstrap_environment_payload.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_bootstrap_environment_payload import AdminBootstrapEnvironmentPayload + +class TestAdminBootstrapEnvironmentPayload(unittest.TestCase): + """AdminBootstrapEnvironmentPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminBootstrapEnvironmentPayload: + """Test AdminBootstrapEnvironmentPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminBootstrapEnvironmentPayload` + """ + model = AdminBootstrapEnvironmentPayload() + if include_optional: + return AdminBootstrapEnvironmentPayload( + org_id = 56 + ) + else: + return AdminBootstrapEnvironmentPayload( + org_id = 56, + ) + """ + + def testAdminBootstrapEnvironmentPayload(self): + """Test AdminBootstrapEnvironmentPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_cluster_resource.py b/test/test_admin_cluster_resource.py new file mode 100644 index 0000000..661bd4f --- /dev/null +++ b/test/test_admin_cluster_resource.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_cluster_resource import AdminClusterResource + +class TestAdminClusterResource(unittest.TestCase): + """AdminClusterResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminClusterResource: + """Test AdminClusterResource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminClusterResource` + """ + model = AdminClusterResource() + if include_optional: + return AdminClusterResource( + id = 56, + name = '', + kubernetes_version = '', + status = '', + master_count = 56, + node_count = 56, + node_flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + enable_public_ip = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminClusterResource( + ) + """ + + def testAdminClusterResource(self): + """Test AdminClusterResource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_container_resource.py b/test/test_admin_container_resource.py new file mode 100644 index 0000000..1a8dce6 --- /dev/null +++ b/test/test_admin_container_resource.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_container_resource import AdminContainerResource + +class TestAdminContainerResource(unittest.TestCase): + """AdminContainerResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminContainerResource: + """Test AdminContainerResource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminContainerResource` + """ + model = AdminContainerResource() + if include_optional: + return AdminContainerResource( + id = 56, + name = '', + flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + status = '', + image = '', + fixed_ip = '', + floating_ip = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminContainerResource( + ) + """ + + def testAdminContainerResource(self): + """Test AdminContainerResource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_contract_event_fields.py b/test/test_admin_contract_event_fields.py new file mode 100644 index 0000000..7281c87 --- /dev/null +++ b/test/test_admin_contract_event_fields.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_contract_event_fields import AdminContractEventFields + +class TestAdminContractEventFields(unittest.TestCase): + """AdminContractEventFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminContractEventFields: + """Test AdminContractEventFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminContractEventFields` + """ + model = AdminContractEventFields() + if include_optional: + return AdminContractEventFields( + id = 56, + user_id = 56, + org_id = 56, + time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + type = '', + reason = '', + message = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminContractEventFields( + ) + """ + + def testAdminContractEventFields(self): + """Test AdminContractEventFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_contract_fields.py b/test/test_admin_contract_fields.py new file mode 100644 index 0000000..89d29b2 --- /dev/null +++ b/test/test_admin_contract_fields.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_contract_fields import AdminContractFields + +class TestAdminContractFields(unittest.TestCase): + """AdminContractFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminContractFields: + """Test AdminContractFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminContractFields` + """ + model = AdminContractFields() + if include_optional: + return AdminContractFields( + id = 56, + org_name = '', + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + status = '', + gpu_name = '', + percent = 1.337, + amount = 1.337, + discount_type = '', + resource_count = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminContractFields( + ) + """ + + def testAdminContractFields(self): + """Test AdminContractFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_count_resources_organization.py b/test/test_admin_count_resources_organization.py new file mode 100644 index 0000000..9f2cd7c --- /dev/null +++ b/test/test_admin_count_resources_organization.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_count_resources_organization import AdminCountResourcesOrganization + +class TestAdminCountResourcesOrganization(unittest.TestCase): + """AdminCountResourcesOrganization unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminCountResourcesOrganization: + """Test AdminCountResourcesOrganization + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminCountResourcesOrganization` + """ + model = AdminCountResourcesOrganization() + if include_optional: + return AdminCountResourcesOrganization( + organization_id = 56, + total_instances = 56, + total_volumes = 56, + total_containers = 56, + total_clusters = 56 + ) + else: + return AdminCountResourcesOrganization( + ) + """ + + def testAdminCountResourcesOrganization(self): + """Test AdminCountResourcesOrganization""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_count_resources_organizations.py b/test/test_admin_count_resources_organizations.py new file mode 100644 index 0000000..c0c2828 --- /dev/null +++ b/test/test_admin_count_resources_organizations.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_count_resources_organizations import AdminCountResourcesOrganizations + +class TestAdminCountResourcesOrganizations(unittest.TestCase): + """AdminCountResourcesOrganizations unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminCountResourcesOrganizations: + """Test AdminCountResourcesOrganizations + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminCountResourcesOrganizations` + """ + model = AdminCountResourcesOrganizations() + if include_optional: + return AdminCountResourcesOrganizations( + resources = [ + hyperstack.models.admin_count_resources_organization.AdminCountResourcesOrganization( + organization_id = 56, + total_instances = 56, + total_volumes = 56, + total_containers = 56, + total_clusters = 56, ) + ] + ) + else: + return AdminCountResourcesOrganizations( + ) + """ + + def testAdminCountResourcesOrganizations(self): + """Test AdminCountResourcesOrganizations""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_create_contract_response_model.py b/test/test_admin_create_contract_response_model.py new file mode 100644 index 0000000..0492cc5 --- /dev/null +++ b/test/test_admin_create_contract_response_model.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_create_contract_response_model import AdminCreateContractResponseModel + +class TestAdminCreateContractResponseModel(unittest.TestCase): + """AdminCreateContractResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminCreateContractResponseModel: + """Test AdminCreateContractResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminCreateContractResponseModel` + """ + model = AdminCreateContractResponseModel() + if include_optional: + return AdminCreateContractResponseModel( + status = True, + message = '', + contract = hyperstack.models.create_contarct_fields.CreateContarctFields( + id = 56, + org_id = 56, + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + discount_plans = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return AdminCreateContractResponseModel( + ) + """ + + def testAdminCreateContractResponseModel(self): + """Test AdminCreateContractResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_envrionment_resources.py b/test/test_admin_envrionment_resources.py new file mode 100644 index 0000000..51a564d --- /dev/null +++ b/test/test_admin_envrionment_resources.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_envrionment_resources import AdminEnvrionmentResources + +class TestAdminEnvrionmentResources(unittest.TestCase): + """AdminEnvrionmentResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminEnvrionmentResources: + """Test AdminEnvrionmentResources + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminEnvrionmentResources` + """ + model = AdminEnvrionmentResources() + if include_optional: + return AdminEnvrionmentResources( + id = 56, + name = '', + region = '', + instances = [ + hyperstack.models.admin_instance_resources.AdminInstanceResources( + id = 56, + name = '', + openstack_id = '', + host = '', + status = '', + flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + image_id = 56, + volume_id = 56, + keypair_name = '', + fixed_ip = '', + floating_ip = '', + contract_id = 56, + floating_ip_status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + volumes = [ + hyperstack.models.admin_volume_resource.AdminVolumeResource( + id = 56, + name = '', + openstack_id = '', + type = '', + size = 56, + status = '', + bootable = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + containers = [ + hyperstack.models.admin_container_resource.AdminContainerResource( + id = 56, + name = '', + flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + status = '', + image = '', + fixed_ip = '', + floating_ip = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + clusters = [ + hyperstack.models.admin_cluster_resource.AdminClusterResource( + id = 56, + name = '', + kubernetes_version = '', + status = '', + master_count = 56, + node_count = 56, + node_flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + enable_public_ip = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminEnvrionmentResources( + ) + """ + + def testAdminEnvrionmentResources(self): + """Test AdminEnvrionmentResources""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_flavor_detail_fields.py b/test/test_admin_flavor_detail_fields.py new file mode 100644 index 0000000..d87a4fc --- /dev/null +++ b/test/test_admin_flavor_detail_fields.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_flavor_detail_fields import AdminFlavorDetailFields + +class TestAdminFlavorDetailFields(unittest.TestCase): + """AdminFlavorDetailFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminFlavorDetailFields: + """Test AdminFlavorDetailFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminFlavorDetailFields` + """ + model = AdminFlavorDetailFields() + if include_optional: + return AdminFlavorDetailFields( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_flavor_detail_node_fields.AdminFlavorDetailNodeFields( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + projects = [ + '' + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + org_ids = [ + 56 + ], + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminFlavorDetailFields( + ) + """ + + def testAdminFlavorDetailFields(self): + """Test AdminFlavorDetailFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_flavor_detail_node_fields.py b/test/test_admin_flavor_detail_node_fields.py new file mode 100644 index 0000000..ca324b6 --- /dev/null +++ b/test/test_admin_flavor_detail_node_fields.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_flavor_detail_node_fields import AdminFlavorDetailNodeFields + +class TestAdminFlavorDetailNodeFields(unittest.TestCase): + """AdminFlavorDetailNodeFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminFlavorDetailNodeFields: + """Test AdminFlavorDetailNodeFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminFlavorDetailNodeFields` + """ + model = AdminFlavorDetailNodeFields() + if include_optional: + return AdminFlavorDetailNodeFields( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + projects = [ + '' + ] + ) + else: + return AdminFlavorDetailNodeFields( + ) + """ + + def testAdminFlavorDetailNodeFields(self): + """Test AdminFlavorDetailNodeFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_flavor_resource.py b/test/test_admin_flavor_resource.py new file mode 100644 index 0000000..31a8d1d --- /dev/null +++ b/test/test_admin_flavor_resource.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_flavor_resource import AdminFlavorResource + +class TestAdminFlavorResource(unittest.TestCase): + """AdminFlavorResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminFlavorResource: + """Test AdminFlavorResource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminFlavorResource` + """ + model = AdminFlavorResource() + if include_optional: + return AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminFlavorResource( + ) + """ + + def testAdminFlavorResource(self): + """Test AdminFlavorResource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_flavor_resources_list.py b/test/test_admin_flavor_resources_list.py new file mode 100644 index 0000000..5cb0050 --- /dev/null +++ b/test/test_admin_flavor_resources_list.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_flavor_resources_list import AdminFlavorResourcesList + +class TestAdminFlavorResourcesList(unittest.TestCase): + """AdminFlavorResourcesList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminFlavorResourcesList: + """Test AdminFlavorResourcesList + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminFlavorResourcesList` + """ + model = AdminFlavorResourcesList() + if include_optional: + return AdminFlavorResourcesList( + status = True, + message = '', + flavors = [ + hyperstack.models.admin_flavor_resource.AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return AdminFlavorResourcesList( + ) + """ + + def testAdminFlavorResourcesList(self): + """Test AdminFlavorResourcesList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_get_contract_detail_fields.py b/test/test_admin_get_contract_detail_fields.py new file mode 100644 index 0000000..dcd61df --- /dev/null +++ b/test/test_admin_get_contract_detail_fields.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_get_contract_detail_fields import AdminGetContractDetailFields + +class TestAdminGetContractDetailFields(unittest.TestCase): + """AdminGetContractDetailFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminGetContractDetailFields: + """Test AdminGetContractDetailFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminGetContractDetailFields` + """ + model = AdminGetContractDetailFields() + if include_optional: + return AdminGetContractDetailFields( + id = 56, + org_id = 56, + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminGetContractDetailFields( + ) + """ + + def testAdminGetContractDetailFields(self): + """Test AdminGetContractDetailFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_get_version_response.py b/test/test_admin_get_version_response.py new file mode 100644 index 0000000..c890c17 --- /dev/null +++ b/test/test_admin_get_version_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_get_version_response import AdminGetVersionResponse + +class TestAdminGetVersionResponse(unittest.TestCase): + """AdminGetVersionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminGetVersionResponse: + """Test AdminGetVersionResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminGetVersionResponse` + """ + model = AdminGetVersionResponse() + if include_optional: + return AdminGetVersionResponse( + status = True, + message = '', + version = '' + ) + else: + return AdminGetVersionResponse( + ) + """ + + def testAdminGetVersionResponse(self): + """Test AdminGetVersionResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_hibernation_restoration_payload_model.py b/test/test_admin_hibernation_restoration_payload_model.py new file mode 100644 index 0000000..bb2f4aa --- /dev/null +++ b/test/test_admin_hibernation_restoration_payload_model.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_hibernation_restoration_payload_model import AdminHibernationRestorationPayloadModel + +class TestAdminHibernationRestorationPayloadModel(unittest.TestCase): + """AdminHibernationRestorationPayloadModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminHibernationRestorationPayloadModel: + """Test AdminHibernationRestorationPayloadModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminHibernationRestorationPayloadModel` + """ + model = AdminHibernationRestorationPayloadModel() + if include_optional: + return AdminHibernationRestorationPayloadModel( + org_id = 56, + vm_name = '', + vm_id = 56, + status = '' + ) + else: + return AdminHibernationRestorationPayloadModel( + org_id = 56, + vm_name = '', + vm_id = 56, + status = '', + ) + """ + + def testAdminHibernationRestorationPayloadModel(self): + """Test AdminHibernationRestorationPayloadModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_image_admin_fields.py b/test/test_admin_image_admin_fields.py new file mode 100644 index 0000000..c4d3d1f --- /dev/null +++ b/test/test_admin_image_admin_fields.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_image_admin_fields import AdminImageAdminFields + +class TestAdminImageAdminFields(unittest.TestCase): + """AdminImageAdminFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminImageAdminFields: + """Test AdminImageAdminFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminImageAdminFields` + """ + model = AdminImageAdminFields() + if include_optional: + return AdminImageAdminFields( + id = 56, + name = '', + openstack_id = '', + region_id = 56, + region_name = '', + type = '', + version = '', + size = 56, + is_public = True, + description = '', + labels = [ + hyperstack.models.lable_resonse.LableResonse( + id = 56, + label = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminImageAdminFields( + ) + """ + + def testAdminImageAdminFields(self): + """Test AdminImageAdminFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_image_admin_response.py b/test/test_admin_image_admin_response.py new file mode 100644 index 0000000..056f158 --- /dev/null +++ b/test/test_admin_image_admin_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_image_admin_response import AdminImageAdminResponse + +class TestAdminImageAdminResponse(unittest.TestCase): + """AdminImageAdminResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminImageAdminResponse: + """Test AdminImageAdminResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminImageAdminResponse` + """ + model = AdminImageAdminResponse() + if include_optional: + return AdminImageAdminResponse( + status = True, + message = '', + image = hyperstack.models.admin_image_admin_response_image.AdminImageAdminResponseImage( + id = 56, + name = '', + openstack_id = '', + region_id = 56, + region_name = '', + type = '', + version = '', + size = 56, + is_public = True, + description = '', + labels = [ + hyperstack.models.lable_resonse.LableResonse( + id = 56, + label = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ) + else: + return AdminImageAdminResponse( + ) + """ + + def testAdminImageAdminResponse(self): + """Test AdminImageAdminResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_image_admin_response_image.py b/test/test_admin_image_admin_response_image.py new file mode 100644 index 0000000..808d6a5 --- /dev/null +++ b/test/test_admin_image_admin_response_image.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_image_admin_response_image import AdminImageAdminResponseImage + +class TestAdminImageAdminResponseImage(unittest.TestCase): + """AdminImageAdminResponseImage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminImageAdminResponseImage: + """Test AdminImageAdminResponseImage + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminImageAdminResponseImage` + """ + model = AdminImageAdminResponseImage() + if include_optional: + return AdminImageAdminResponseImage( + id = 56, + name = '', + openstack_id = '', + region_id = 56, + region_name = '', + type = '', + version = '', + size = 56, + is_public = True, + description = '', + labels = [ + hyperstack.models.lable_resonse.LableResonse( + id = 56, + label = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ] + ) + else: + return AdminImageAdminResponseImage( + organizations = [ + 56 + ], + ) + """ + + def testAdminImageAdminResponseImage(self): + """Test AdminImageAdminResponseImage""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_image_list_admin_response.py b/test/test_admin_image_list_admin_response.py new file mode 100644 index 0000000..5445c1f --- /dev/null +++ b/test/test_admin_image_list_admin_response.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_image_list_admin_response import AdminImageListAdminResponse + +class TestAdminImageListAdminResponse(unittest.TestCase): + """AdminImageListAdminResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminImageListAdminResponse: + """Test AdminImageListAdminResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminImageListAdminResponse` + """ + model = AdminImageListAdminResponse() + if include_optional: + return AdminImageListAdminResponse( + status = True, + message = '', + data = [ + hyperstack.models.admin_image_admin_fields.AdminImageAdminFields( + id = 56, + name = '', + openstack_id = '', + region_id = 56, + region_name = '', + type = '', + version = '', + size = 56, + is_public = True, + description = '', + labels = [ + hyperstack.models.lable_resonse.LableResonse( + id = 56, + label = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return AdminImageListAdminResponse( + ) + """ + + def testAdminImageListAdminResponse(self): + """Test AdminImageListAdminResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_instance_resources.py b/test/test_admin_instance_resources.py new file mode 100644 index 0000000..1a32dca --- /dev/null +++ b/test/test_admin_instance_resources.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_instance_resources import AdminInstanceResources + +class TestAdminInstanceResources(unittest.TestCase): + """AdminInstanceResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminInstanceResources: + """Test AdminInstanceResources + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminInstanceResources` + """ + model = AdminInstanceResources() + if include_optional: + return AdminInstanceResources( + id = 56, + name = '', + openstack_id = '', + host = '', + status = '', + flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + image_id = 56, + volume_id = 56, + keypair_name = '', + fixed_ip = '', + floating_ip = '', + contract_id = 56, + floating_ip_status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminInstanceResources( + ) + """ + + def testAdminInstanceResources(self): + """Test AdminInstanceResources""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_node_resource.py b/test/test_admin_node_resource.py new file mode 100644 index 0000000..7278cb2 --- /dev/null +++ b/test/test_admin_node_resource.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_node_resource import AdminNodeResource + +class TestAdminNodeResource(unittest.TestCase): + """AdminNodeResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminNodeResource: + """Test AdminNodeResource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminNodeResource` + """ + model = AdminNodeResource() + if include_optional: + return AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ] + ) + else: + return AdminNodeResource( + ) + """ + + def testAdminNodeResource(self): + """Test AdminNodeResource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_resource_list.py b/test/test_admin_organization_resource_list.py similarity index 53% rename from test/test_organization_resource_list.py rename to test/test_admin_organization_resource_list.py index 4b0516d..6dbdeb0 100644 --- a/test/test_organization_resource_list.py +++ b/test/test_admin_organization_resource_list.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organization_resource_list import OrganizationResourceList +from hyperstack.models.admin_organization_resource_list import AdminOrganizationResourceList -class TestOrganizationResourceList(unittest.TestCase): - """OrganizationResourceList unit test stubs""" +class TestAdminOrganizationResourceList(unittest.TestCase): + """AdminOrganizationResourceList unit test stubs""" def setUp(self): pass @@ -25,52 +25,79 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationResourceList: - """Test OrganizationResourceList + def make_instance(self, include_optional) -> AdminOrganizationResourceList: + """Test AdminOrganizationResourceList include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationResourceList` + # uncomment below to create an instance of `AdminOrganizationResourceList` """ - model = OrganizationResourceList() + model = AdminOrganizationResourceList() if include_optional: - return OrganizationResourceList( + return AdminOrganizationResourceList( status = True, message = '', organizations = [ - hyperstack.models.organization_resources.OrganizationResources( + hyperstack.models.admin_organization_resources.AdminOrganizationResources( organization_id = 56, environments = [ - hyperstack.models.envrionment_resources.EnvrionmentResources( + hyperstack.models.admin_envrionment_resources.AdminEnvrionmentResources( id = 56, name = '', region = '', instances = [ - hyperstack.models.instance_resources.InstanceResources( + hyperstack.models.admin_instance_resources.AdminInstanceResources( id = 56, name = '', + openstack_id = '', host = '', status = '', - flavor = hyperstack.models.flavor_resource.FlavorResource( + flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( id = 56, + openstack_id = '', name = '', + region_name = '', cpu = 56, ram = 1.337, disk = 56, gpu = '', - gpu_count = 56, ), + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), image_id = 56, volume_id = 56, keypair_name = '', fixed_ip = '', floating_ip = '', + contract_id = 56, floating_ip_status = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], volumes = [ - hyperstack.models.volume_resource.VolumeResource( + hyperstack.models.admin_volume_resource.AdminVolumeResource( id = 56, name = '', + openstack_id = '', type = '', size = 56, status = '', @@ -78,7 +105,7 @@ def make_instance(self, include_optional) -> OrganizationResourceList: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], containers = [ - hyperstack.models.container_resource.ContainerResource( + hyperstack.models.admin_container_resource.AdminContainerResource( id = 56, name = '', status = '', @@ -88,21 +115,30 @@ def make_instance(self, include_optional) -> OrganizationResourceList: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], clusters = [ - hyperstack.models.cluster_resource.ClusterResource( + hyperstack.models.admin_cluster_resource.AdminClusterResource( id = 56, name = '', kubernetes_version = '', status = '', master_count = 56, node_count = 56, - node_flavor = hyperstack.models.flavor_resource.FlavorResource( + node_flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( id = 56, + openstack_id = '', name = '', + region_name = '', cpu = 56, ram = 1.337, disk = 56, gpu = '', - gpu_count = 56, ), + status = '', + gpu_count = 56, + stock_available = True, + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), enable_public_ip = True, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], @@ -111,12 +147,12 @@ def make_instance(self, include_optional) -> OrganizationResourceList: ] ) else: - return OrganizationResourceList( + return AdminOrganizationResourceList( ) """ - def testOrganizationResourceList(self): - """Test OrganizationResourceList""" + def testAdminOrganizationResourceList(self): + """Test AdminOrganizationResourceList""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_organization_resource_response.py b/test/test_admin_organization_resource_response.py similarity index 52% rename from test/test_organization_resource_response.py rename to test/test_admin_organization_resource_response.py index 02078ea..c748028 100644 --- a/test/test_organization_resource_response.py +++ b/test/test_admin_organization_resource_response.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organization_resource_response import OrganizationResourceResponse +from hyperstack.models.admin_organization_resource_response import AdminOrganizationResourceResponse -class TestOrganizationResourceResponse(unittest.TestCase): - """OrganizationResourceResponse unit test stubs""" +class TestAdminOrganizationResourceResponse(unittest.TestCase): + """AdminOrganizationResourceResponse unit test stubs""" def setUp(self): pass @@ -25,51 +25,78 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationResourceResponse: - """Test OrganizationResourceResponse + def make_instance(self, include_optional) -> AdminOrganizationResourceResponse: + """Test AdminOrganizationResourceResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationResourceResponse` + # uncomment below to create an instance of `AdminOrganizationResourceResponse` """ - model = OrganizationResourceResponse() + model = AdminOrganizationResourceResponse() if include_optional: - return OrganizationResourceResponse( + return AdminOrganizationResourceResponse( status = True, message = '', - organization = hyperstack.models.organization_resources.OrganizationResources( + organization = hyperstack.models.admin_organization_resources.AdminOrganizationResources( organization_id = 56, environments = [ - hyperstack.models.envrionment_resources.EnvrionmentResources( + hyperstack.models.admin_envrionment_resources.AdminEnvrionmentResources( id = 56, name = '', region = '', instances = [ - hyperstack.models.instance_resources.InstanceResources( + hyperstack.models.admin_instance_resources.AdminInstanceResources( id = 56, name = '', + openstack_id = '', host = '', status = '', - flavor = hyperstack.models.flavor_resource.FlavorResource( + flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( id = 56, + openstack_id = '', name = '', + region_name = '', cpu = 56, ram = 1.337, disk = 56, gpu = '', - gpu_count = 56, ), + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), image_id = 56, volume_id = 56, keypair_name = '', fixed_ip = '', floating_ip = '', + contract_id = 56, floating_ip_status = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], volumes = [ - hyperstack.models.volume_resource.VolumeResource( + hyperstack.models.admin_volume_resource.AdminVolumeResource( id = 56, name = '', + openstack_id = '', type = '', size = 56, status = '', @@ -77,7 +104,7 @@ def make_instance(self, include_optional) -> OrganizationResourceResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], containers = [ - hyperstack.models.container_resource.ContainerResource( + hyperstack.models.admin_container_resource.AdminContainerResource( id = 56, name = '', status = '', @@ -87,21 +114,30 @@ def make_instance(self, include_optional) -> OrganizationResourceResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], clusters = [ - hyperstack.models.cluster_resource.ClusterResource( + hyperstack.models.admin_cluster_resource.AdminClusterResource( id = 56, name = '', kubernetes_version = '', status = '', master_count = 56, node_count = 56, - node_flavor = hyperstack.models.flavor_resource.FlavorResource( + node_flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( id = 56, + openstack_id = '', name = '', + region_name = '', cpu = 56, ram = 1.337, disk = 56, gpu = '', - gpu_count = 56, ), + status = '', + gpu_count = 56, + stock_available = True, + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), enable_public_ip = True, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], @@ -109,12 +145,12 @@ def make_instance(self, include_optional) -> OrganizationResourceResponse: ], ) ) else: - return OrganizationResourceResponse( + return AdminOrganizationResourceResponse( ) """ - def testOrganizationResourceResponse(self): - """Test OrganizationResourceResponse""" + def testAdminOrganizationResourceResponse(self): + """Test AdminOrganizationResourceResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_organization_resources.py b/test/test_admin_organization_resources.py similarity index 52% rename from test/test_organization_resources.py rename to test/test_admin_organization_resources.py index 8de847c..3894d4e 100644 --- a/test/test_organization_resources.py +++ b/test/test_admin_organization_resources.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organization_resources import OrganizationResources +from hyperstack.models.admin_organization_resources import AdminOrganizationResources -class TestOrganizationResources(unittest.TestCase): - """OrganizationResources unit test stubs""" +class TestAdminOrganizationResources(unittest.TestCase): + """AdminOrganizationResources unit test stubs""" def setUp(self): pass @@ -25,48 +25,75 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationResources: - """Test OrganizationResources + def make_instance(self, include_optional) -> AdminOrganizationResources: + """Test AdminOrganizationResources include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationResources` + # uncomment below to create an instance of `AdminOrganizationResources` """ - model = OrganizationResources() + model = AdminOrganizationResources() if include_optional: - return OrganizationResources( + return AdminOrganizationResources( organization_id = 56, environments = [ - hyperstack.models.envrionment_resources.EnvrionmentResources( + hyperstack.models.admin_envrionment_resources.AdminEnvrionmentResources( id = 56, name = '', region = '', instances = [ - hyperstack.models.instance_resources.InstanceResources( + hyperstack.models.admin_instance_resources.AdminInstanceResources( id = 56, name = '', + openstack_id = '', host = '', status = '', - flavor = hyperstack.models.flavor_resource.FlavorResource( + flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( id = 56, + openstack_id = '', name = '', + region_name = '', cpu = 56, ram = 1.337, disk = 56, gpu = '', - gpu_count = 56, ), + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_node_resource.AdminNodeResource( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + organizations = [ + 56 + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), image_id = 56, volume_id = 56, keypair_name = '', fixed_ip = '', floating_ip = '', + contract_id = 56, floating_ip_status = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], volumes = [ - hyperstack.models.volume_resource.VolumeResource( + hyperstack.models.admin_volume_resource.AdminVolumeResource( id = 56, name = '', + openstack_id = '', type = '', size = 56, status = '', @@ -74,7 +101,7 @@ def make_instance(self, include_optional) -> OrganizationResources: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], containers = [ - hyperstack.models.container_resource.ContainerResource( + hyperstack.models.admin_container_resource.AdminContainerResource( id = 56, name = '', status = '', @@ -84,21 +111,30 @@ def make_instance(self, include_optional) -> OrganizationResources: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], clusters = [ - hyperstack.models.cluster_resource.ClusterResource( + hyperstack.models.admin_cluster_resource.AdminClusterResource( id = 56, name = '', kubernetes_version = '', status = '', master_count = 56, node_count = 56, - node_flavor = hyperstack.models.flavor_resource.FlavorResource( + node_flavor = hyperstack.models.admin_flavor_resource.AdminFlavorResource( id = 56, + openstack_id = '', name = '', + region_name = '', cpu = 56, ram = 1.337, disk = 56, gpu = '', - gpu_count = 56, ), + status = '', + gpu_count = 56, + stock_available = True, + is_public = True, + is_custom = True, + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), enable_public_ip = True, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], @@ -106,12 +142,12 @@ def make_instance(self, include_optional) -> OrganizationResources: ] ) else: - return OrganizationResources( + return AdminOrganizationResources( ) """ - def testOrganizationResources(self): - """Test OrganizationResources""" + def testAdminOrganizationResources(self): + """Test AdminOrganizationResources""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_organization_response_model.py b/test/test_admin_organization_response_model.py similarity index 55% rename from test/test_organization_response_model.py rename to test/test_admin_organization_response_model.py index 26a8916..6322fa4 100644 --- a/test/test_organization_response_model.py +++ b/test/test_admin_organization_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organization_response_model import OrganizationResponseModel +from hyperstack.models.admin_organization_response_model import AdminOrganizationResponseModel -class TestOrganizationResponseModel(unittest.TestCase): - """OrganizationResponseModel unit test stubs""" +class TestAdminOrganizationResponseModel(unittest.TestCase): + """AdminOrganizationResponseModel unit test stubs""" def setUp(self): pass @@ -25,23 +25,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationResponseModel: - """Test OrganizationResponseModel + def make_instance(self, include_optional) -> AdminOrganizationResponseModel: + """Test AdminOrganizationResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationResponseModel` + # uncomment below to create an instance of `AdminOrganizationResponseModel` """ - model = OrganizationResponseModel() + model = AdminOrganizationResponseModel() if include_optional: - return OrganizationResponseModel( + return AdminOrganizationResponseModel( status = True, message = '', - organizations = hyperstack.models.organization_info_model.OrganizationInfoModel( + organizations = hyperstack.models.organization_fields.OrganizationFields( id = 56, name = '', + credit = 56, + threshold = 56, + total_instances = 56, + total_volumes = 56, + total_containers = 56, + total_clusters = 56, users = [ - hyperstack.models.organization_user_model.OrganizationUserModel( + hyperstack.models.organization_user_response_model.OrganizationUserResponseModel( id = 56, sub = '', email = '', @@ -49,20 +55,21 @@ def make_instance(self, include_optional) -> OrganizationResponseModel: name = '', role = '', rbac_roles = [ - hyperstack.models.rbac_role_fieldfor_organization.RBACRoleFieldforOrganization( + hyperstack.models.rbac_role_field.RbacRoleField( name = '', ) ], - joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ) else: - return OrganizationResponseModel( + return AdminOrganizationResponseModel( ) """ - def testOrganizationResponseModel(self): - """Test OrganizationResponseModel""" + def testAdminOrganizationResponseModel(self): + """Test AdminOrganizationResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_admin_organization_summary_fields.py b/test/test_admin_organization_summary_fields.py new file mode 100644 index 0000000..aeb1f87 --- /dev/null +++ b/test/test_admin_organization_summary_fields.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_organization_summary_fields import AdminOrganizationSummaryFields + +class TestAdminOrganizationSummaryFields(unittest.TestCase): + """AdminOrganizationSummaryFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminOrganizationSummaryFields: + """Test AdminOrganizationSummaryFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminOrganizationSummaryFields` + """ + model = AdminOrganizationSummaryFields() + if include_optional: + return AdminOrganizationSummaryFields( + id = 56, + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminOrganizationSummaryFields( + id = 56, + name = '', + ) + """ + + def testAdminOrganizationSummaryFields(self): + """Test AdminOrganizationSummaryFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organizations_response_model.py b/test/test_admin_organizations_response_model.py similarity index 57% rename from test/test_organizations_response_model.py rename to test/test_admin_organizations_response_model.py index 5c8a87f..0050747 100644 --- a/test/test_organizations_response_model.py +++ b/test/test_admin_organizations_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organizations_response_model import OrganizationsResponseModel +from hyperstack.models.admin_organizations_response_model import AdminOrganizationsResponseModel -class TestOrganizationsResponseModel(unittest.TestCase): - """OrganizationsResponseModel unit test stubs""" +class TestAdminOrganizationsResponseModel(unittest.TestCase): + """AdminOrganizationsResponseModel unit test stubs""" def setUp(self): pass @@ -25,24 +25,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationsResponseModel: - """Test OrganizationsResponseModel + def make_instance(self, include_optional) -> AdminOrganizationsResponseModel: + """Test AdminOrganizationsResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationsResponseModel` + # uncomment below to create an instance of `AdminOrganizationsResponseModel` """ - model = OrganizationsResponseModel() + model = AdminOrganizationsResponseModel() if include_optional: - return OrganizationsResponseModel( + return AdminOrganizationsResponseModel( status = True, message = '', organizations = [ - hyperstack.models.organization_info_model.OrganizationInfoModel( + hyperstack.models.organization_fields.OrganizationFields( id = 56, name = '', + credit = 56, + threshold = 56, + total_instances = 56, + total_volumes = 56, + total_containers = 56, + total_clusters = 56, users = [ - hyperstack.models.organization_user_model.OrganizationUserModel( + hyperstack.models.organization_user_response_model.OrganizationUserResponseModel( id = 56, sub = '', email = '', @@ -50,21 +56,23 @@ def make_instance(self, include_optional) -> OrganizationsResponseModel: name = '', role = '', rbac_roles = [ - hyperstack.models.rbac_role_fieldfor_organization.RBACRoleFieldforOrganization( + hyperstack.models.rbac_role_field.RbacRoleField( name = '', ) ], - joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ] + ], + organization_count = 56 ) else: - return OrganizationsResponseModel( + return AdminOrganizationsResponseModel( ) """ - def testOrganizationsResponseModel(self): - """Test OrganizationsResponseModel""" + def testAdminOrganizationsResponseModel(self): + """Test AdminOrganizationsResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_admin_organizations_summary_response_model.py b/test/test_admin_organizations_summary_response_model.py new file mode 100644 index 0000000..67d4b0a --- /dev/null +++ b/test/test_admin_organizations_summary_response_model.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_organizations_summary_response_model import AdminOrganizationsSummaryResponseModel + +class TestAdminOrganizationsSummaryResponseModel(unittest.TestCase): + """AdminOrganizationsSummaryResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminOrganizationsSummaryResponseModel: + """Test AdminOrganizationsSummaryResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminOrganizationsSummaryResponseModel` + """ + model = AdminOrganizationsSummaryResponseModel() + if include_optional: + return AdminOrganizationsSummaryResponseModel( + status = True, + message = '', + organizations = [ + hyperstack.models.admin_organization_summary_fields.AdminOrganizationSummaryFields( + id = 56, + name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return AdminOrganizationsSummaryResponseModel( + ) + """ + + def testAdminOrganizationsSummaryResponseModel(self): + """Test AdminOrganizationsSummaryResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_user_fields.py b/test/test_admin_user_fields.py new file mode 100644 index 0000000..7e1be1a --- /dev/null +++ b/test/test_admin_user_fields.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_user_fields import AdminUserFields + +class TestAdminUserFields(unittest.TestCase): + """AdminUserFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminUserFields: + """Test AdminUserFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminUserFields` + """ + model = AdminUserFields() + if include_optional: + return AdminUserFields( + id = 56, + username = '', + email = '', + org_id = 56, + org_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return AdminUserFields( + id = 56, + username = '', + email = '', + org_id = 56, + org_name = '', + ) + """ + + def testAdminUserFields(self): + """Test AdminUserFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_user_response_model.py b/test/test_admin_user_response_model.py new file mode 100644 index 0000000..ac44d0a --- /dev/null +++ b/test/test_admin_user_response_model.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_user_response_model import AdminUserResponseModel + +class TestAdminUserResponseModel(unittest.TestCase): + """AdminUserResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminUserResponseModel: + """Test AdminUserResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminUserResponseModel` + """ + model = AdminUserResponseModel() + if include_optional: + return AdminUserResponseModel( + status = True, + message = '', + user = hyperstack.models.admin_user_fields.AdminUserFields( + id = 56, + username = '', + email = '', + org_id = 56, + org_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return AdminUserResponseModel( + ) + """ + + def testAdminUserResponseModel(self): + """Test AdminUserResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_users_response_model.py b/test/test_admin_users_response_model.py new file mode 100644 index 0000000..ae0c31f --- /dev/null +++ b/test/test_admin_users_response_model.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_users_response_model import AdminUsersResponseModel + +class TestAdminUsersResponseModel(unittest.TestCase): + """AdminUsersResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminUsersResponseModel: + """Test AdminUsersResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminUsersResponseModel` + """ + model = AdminUsersResponseModel() + if include_optional: + return AdminUsersResponseModel( + status = True, + message = '', + users = [ + hyperstack.models.admin_user_fields.AdminUserFields( + id = 56, + username = '', + email = '', + org_id = 56, + org_name = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return AdminUsersResponseModel( + ) + """ + + def testAdminUsersResponseModel(self): + """Test AdminUsersResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_admin_version_response_model.py b/test/test_admin_version_response_model.py new file mode 100644 index 0000000..5f1e78a --- /dev/null +++ b/test/test_admin_version_response_model.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.admin_version_response_model import AdminVersionResponseModel + +class TestAdminVersionResponseModel(unittest.TestCase): + """AdminVersionResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AdminVersionResponseModel: + """Test AdminVersionResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AdminVersionResponseModel` + """ + model = AdminVersionResponseModel() + if include_optional: + return AdminVersionResponseModel( + status = True, + message = '', + version = '' + ) + else: + return AdminVersionResponseModel( + ) + """ + + def testAdminVersionResponseModel(self): + """Test AdminVersionResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_volume_resource.py b/test/test_admin_volume_resource.py similarity index 66% rename from test/test_volume_resource.py rename to test/test_admin_volume_resource.py index 8d8b450..553a964 100644 --- a/test/test_volume_resource.py +++ b/test/test_admin_volume_resource.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.volume_resource import VolumeResource +from hyperstack.models.admin_volume_resource import AdminVolumeResource -class TestVolumeResource(unittest.TestCase): - """VolumeResource unit test stubs""" +class TestAdminVolumeResource(unittest.TestCase): + """AdminVolumeResource unit test stubs""" def setUp(self): pass @@ -25,18 +25,19 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> VolumeResource: - """Test VolumeResource + def make_instance(self, include_optional) -> AdminVolumeResource: + """Test AdminVolumeResource include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `VolumeResource` + # uncomment below to create an instance of `AdminVolumeResource` """ - model = VolumeResource() + model = AdminVolumeResource() if include_optional: - return VolumeResource( + return AdminVolumeResource( id = 56, name = '', + openstack_id = '', type = '', size = 56, status = '', @@ -44,12 +45,12 @@ def make_instance(self, include_optional) -> VolumeResource: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return VolumeResource( + return AdminVolumeResource( ) """ - def testVolumeResource(self): - """Test VolumeResource""" + def testAdminVolumeResource(self): + """Test AdminVolumeResource""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_adminpaymenthistoryfields.py b/test/test_adminpaymenthistoryfields.py new file mode 100644 index 0000000..148c743 --- /dev/null +++ b/test/test_adminpaymenthistoryfields.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.adminpaymenthistoryfields import Adminpaymenthistoryfields + +class TestAdminpaymenthistoryfields(unittest.TestCase): + """Adminpaymenthistoryfields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Adminpaymenthistoryfields: + """Test Adminpaymenthistoryfields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Adminpaymenthistoryfields` + """ + model = Adminpaymenthistoryfields() + if include_optional: + return Adminpaymenthistoryfields( + amount = 1.337, + medium = '', + status = '', + transaction_id = '', + payment_id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return Adminpaymenthistoryfields( + ) + """ + + def testAdminpaymenthistoryfields(self): + """Test Adminpaymenthistoryfields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_adminpaymenthistoryresponse.py b/test/test_adminpaymenthistoryresponse.py new file mode 100644 index 0000000..4ad0dc9 --- /dev/null +++ b/test/test_adminpaymenthistoryresponse.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.adminpaymenthistoryresponse import Adminpaymenthistoryresponse + +class TestAdminpaymenthistoryresponse(unittest.TestCase): + """Adminpaymenthistoryresponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Adminpaymenthistoryresponse: + """Test Adminpaymenthistoryresponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Adminpaymenthistoryresponse` + """ + model = Adminpaymenthistoryresponse() + if include_optional: + return Adminpaymenthistoryresponse( + message = '', + status = True, + payments = [ + hyperstack.models.adminpaymenthistoryfields.Adminpaymenthistoryfields( + amount = 1.337, + medium = '', + status = '', + transaction_id = '', + payment_id = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return Adminpaymenthistoryresponse( + ) + """ + + def testAdminpaymenthistoryresponse(self): + """Test Adminpaymenthistoryresponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_key_fields.py b/test/test_api_key_fields.py index 2b28b7f..50cb4d6 100644 --- a/test/test_api_key_fields.py +++ b/test/test_api_key_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.api_key_fields import APIKeyFields +from hyperstack.models.api_key_fields import ApiKeyFields -class TestAPIKeyFields(unittest.TestCase): - """APIKeyFields unit test stubs""" +class TestApiKeyFields(unittest.TestCase): + """ApiKeyFields unit test stubs""" def setUp(self): pass @@ -25,25 +25,25 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> APIKeyFields: - """Test APIKeyFields + def make_instance(self, include_optional) -> ApiKeyFields: + """Test ApiKeyFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `APIKeyFields` + # uncomment below to create an instance of `ApiKeyFields` """ - model = APIKeyFields() + model = ApiKeyFields() if include_optional: - return APIKeyFields( + return ApiKeyFields( key = '' ) else: - return APIKeyFields( + return ApiKeyFields( ) """ - def testAPIKeyFields(self): - """Test APIKeyFields""" + def testApiKeyFields(self): + """Test ApiKeyFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_assign_rbac_role_payload.py b/test/test_assign_rbac_role_payload.py index fab72b1..b48b029 100644 --- a/test/test_assign_rbac_role_payload.py +++ b/test/test_assign_rbac_role_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.assign_rbac_role_payload import AssignRBACRolePayload +from hyperstack.models.assign_rbac_role_payload import AssignRbacRolePayload -class TestAssignRBACRolePayload(unittest.TestCase): - """AssignRBACRolePayload unit test stubs""" +class TestAssignRbacRolePayload(unittest.TestCase): + """AssignRbacRolePayload unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> AssignRBACRolePayload: - """Test AssignRBACRolePayload + def make_instance(self, include_optional) -> AssignRbacRolePayload: + """Test AssignRbacRolePayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `AssignRBACRolePayload` + # uncomment below to create an instance of `AssignRbacRolePayload` """ - model = AssignRBACRolePayload() + model = AssignRbacRolePayload() if include_optional: - return AssignRBACRolePayload( + return AssignRbacRolePayload( role_id = 56 ) else: - return AssignRBACRolePayload( + return AssignRbacRolePayload( role_id = 56, ) """ - def testAssignRBACRolePayload(self): - """Test AssignRBACRolePayload""" + def testAssignRbacRolePayload(self): + """Test AssignRbacRolePayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_attach_firewall_with_vm.py b/test/test_attach_firewall_with_vm.py new file mode 100644 index 0000000..1cc63f5 --- /dev/null +++ b/test/test_attach_firewall_with_vm.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.attach_firewall_with_vm import AttachFirewallWithVM + +class TestAttachFirewallWithVM(unittest.TestCase): + """AttachFirewallWithVM unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AttachFirewallWithVM: + """Test AttachFirewallWithVM + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AttachFirewallWithVM` + """ + model = AttachFirewallWithVM() + if include_optional: + return AttachFirewallWithVM( + vms = [ + 56 + ] + ) + else: + return AttachFirewallWithVM( + vms = [ + 56 + ], + ) + """ + + def testAttachFirewallWithVM(self): + """Test AttachFirewallWithVM""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attach_firewalls_to_vm_payload.py b/test/test_attach_firewalls_to_vm_payload.py new file mode 100644 index 0000000..c21cdc7 --- /dev/null +++ b/test/test_attach_firewalls_to_vm_payload.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.attach_firewalls_to_vm_payload import AttachFirewallsToVMPayload + +class TestAttachFirewallsToVMPayload(unittest.TestCase): + """AttachFirewallsToVMPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AttachFirewallsToVMPayload: + """Test AttachFirewallsToVMPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AttachFirewallsToVMPayload` + """ + model = AttachFirewallsToVMPayload() + if include_optional: + return AttachFirewallsToVMPayload( + firewalls = [ + 56 + ] + ) + else: + return AttachFirewallsToVMPayload( + firewalls = [ + 56 + ], + ) + """ + + def testAttachFirewallsToVMPayload(self): + """Test AttachFirewallsToVMPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_token_response.py b/test/test_auth_get_token_response_model.py similarity index 60% rename from test/test_get_token_response.py rename to test/test_auth_get_token_response_model.py index f31fe36..830335d 100644 --- a/test/test_get_token_response.py +++ b/test/test_auth_get_token_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.get_token_response import GetTokenResponse +from hyperstack.models.auth_get_token_response_model import AuthGetTokenResponseModel -class TestGetTokenResponse(unittest.TestCase): - """GetTokenResponse unit test stubs""" +class TestAuthGetTokenResponseModel(unittest.TestCase): + """AuthGetTokenResponseModel unit test stubs""" def setUp(self): pass @@ -25,30 +25,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> GetTokenResponse: - """Test GetTokenResponse + def make_instance(self, include_optional) -> AuthGetTokenResponseModel: + """Test AuthGetTokenResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `GetTokenResponse` + # uncomment below to create an instance of `AuthGetTokenResponseModel` """ - model = GetTokenResponse() + model = AuthGetTokenResponseModel() if include_optional: - return GetTokenResponse( + return AuthGetTokenResponseModel( status = True, message = '', token = hyperstack.models.token_fields.TokenFields( access_token = '', id_token = '', - refresh_token = '', ) + refresh_token = '', ), + first_login = True ) else: - return GetTokenResponse( + return AuthGetTokenResponseModel( ) """ - def testGetTokenResponse(self): - """Test GetTokenResponse""" + def testAuthGetTokenResponseModel(self): + """Test AuthGetTokenResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_request_login_data_response.py b/test/test_auth_request_login_fields.py similarity index 60% rename from test/test_request_login_data_response.py rename to test/test_auth_request_login_fields.py index 2d4abdb..e4c54ff 100644 --- a/test/test_request_login_data_response.py +++ b/test/test_auth_request_login_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.request_login_data_response import RequestLoginDataResponse +from hyperstack.models.auth_request_login_fields import AuthRequestLoginFields -class TestRequestLoginDataResponse(unittest.TestCase): - """RequestLoginDataResponse unit test stubs""" +class TestAuthRequestLoginFields(unittest.TestCase): + """AuthRequestLoginFields unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RequestLoginDataResponse: - """Test RequestLoginDataResponse + def make_instance(self, include_optional) -> AuthRequestLoginFields: + """Test AuthRequestLoginFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RequestLoginDataResponse` + # uncomment below to create an instance of `AuthRequestLoginFields` """ - model = RequestLoginDataResponse() + model = AuthRequestLoginFields() if include_optional: - return RequestLoginDataResponse( + return AuthRequestLoginFields( authorization_url = '', session_id = '' ) else: - return RequestLoginDataResponse( + return AuthRequestLoginFields( ) """ - def testRequestLoginDataResponse(self): - """Test RequestLoginDataResponse""" + def testAuthRequestLoginFields(self): + """Test AuthRequestLoginFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_request_login_response.py b/test/test_auth_request_login_response_model.py similarity index 57% rename from test/test_request_login_response.py rename to test/test_auth_request_login_response_model.py index f049abc..d49158d 100644 --- a/test/test_request_login_response.py +++ b/test/test_auth_request_login_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.request_login_response import RequestLoginResponse +from hyperstack.models.auth_request_login_response_model import AuthRequestLoginResponseModel -class TestRequestLoginResponse(unittest.TestCase): - """RequestLoginResponse unit test stubs""" +class TestAuthRequestLoginResponseModel(unittest.TestCase): + """AuthRequestLoginResponseModel unit test stubs""" def setUp(self): pass @@ -25,29 +25,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RequestLoginResponse: - """Test RequestLoginResponse + def make_instance(self, include_optional) -> AuthRequestLoginResponseModel: + """Test AuthRequestLoginResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RequestLoginResponse` + # uncomment below to create an instance of `AuthRequestLoginResponseModel` """ - model = RequestLoginResponse() + model = AuthRequestLoginResponseModel() if include_optional: - return RequestLoginResponse( + return AuthRequestLoginResponseModel( status = True, message = '', - data = hyperstack.models.request_login_data_response.RequestLoginDataResponse( + data = hyperstack.models.auth_request_login_fields.AuthRequestLoginFields( authorization_url = '', session_id = '', ) ) else: - return RequestLoginResponse( + return AuthRequestLoginResponseModel( ) """ - def testRequestLoginResponse(self): - """Test RequestLoginResponse""" + def testAuthRequestLoginResponseModel(self): + """Test AuthRequestLoginResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_user_fields.py b/test/test_auth_user_fields.py similarity index 68% rename from test/test_user_fields.py rename to test/test_auth_user_fields.py index 8f27a15..fc06db3 100644 --- a/test/test_user_fields.py +++ b/test/test_auth_user_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.user_fields import UserFields +from hyperstack.models.auth_user_fields import AuthUserFields -class TestUserFields(unittest.TestCase): - """UserFields unit test stubs""" +class TestAuthUserFields(unittest.TestCase): + """AuthUserFields unit test stubs""" def setUp(self): pass @@ -25,28 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> UserFields: - """Test UserFields + def make_instance(self, include_optional) -> AuthUserFields: + """Test AuthUserFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `UserFields` + # uncomment below to create an instance of `AuthUserFields` """ - model = UserFields() + model = AuthUserFields() if include_optional: - return UserFields( + return AuthUserFields( email = '', name = '', username = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return UserFields( + return AuthUserFields( ) """ - def testUserFields(self): - """Test UserFields""" + def testAuthUserFields(self): + """Test AuthUserFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_user_info_response.py b/test/test_auth_user_info_response_model.py similarity index 62% rename from test/test_user_info_response.py rename to test/test_auth_user_info_response_model.py index a467874..e5d6caa 100644 --- a/test/test_user_info_response.py +++ b/test/test_auth_user_info_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.user_info_response import UserInfoResponse +from hyperstack.models.auth_user_info_response_model import AuthUserInfoResponseModel -class TestUserInfoResponse(unittest.TestCase): - """UserInfoResponse unit test stubs""" +class TestAuthUserInfoResponseModel(unittest.TestCase): + """AuthUserInfoResponseModel unit test stubs""" def setUp(self): pass @@ -25,31 +25,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> UserInfoResponse: - """Test UserInfoResponse + def make_instance(self, include_optional) -> AuthUserInfoResponseModel: + """Test AuthUserInfoResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `UserInfoResponse` + # uncomment below to create an instance of `AuthUserInfoResponseModel` """ - model = UserInfoResponse() + model = AuthUserInfoResponseModel() if include_optional: - return UserInfoResponse( + return AuthUserInfoResponseModel( status = True, message = '', - user = hyperstack.models.user_fields.UserFields( + user = hyperstack.models.auth_user_fields.AuthUserFields( email = '', name = '', username = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ) else: - return UserInfoResponse( + return AuthUserInfoResponseModel( ) """ - def testUserInfoResponse(self): - """Test UserInfoResponse""" + def testAuthUserInfoResponseModel(self): + """Test AuthUserInfoResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_billingimmuneresources.py b/test/test_billingimmuneresources.py new file mode 100644 index 0000000..e53acc7 --- /dev/null +++ b/test/test_billingimmuneresources.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.billingimmuneresources import Billingimmuneresources + +class TestBillingimmuneresources(unittest.TestCase): + """Billingimmuneresources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Billingimmuneresources: + """Test Billingimmuneresources + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Billingimmuneresources` + """ + model = Billingimmuneresources() + if include_optional: + return Billingimmuneresources( + resource_id = 56, + resource_type = '', + organization_id = 56 + ) + else: + return Billingimmuneresources( + ) + """ + + def testBillingimmuneresources(self): + """Test Billingimmuneresources""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_billingimmuneresourcesresponse.py b/test/test_billingimmuneresourcesresponse.py new file mode 100644 index 0000000..455873d --- /dev/null +++ b/test/test_billingimmuneresourcesresponse.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.billingimmuneresourcesresponse import Billingimmuneresourcesresponse + +class TestBillingimmuneresourcesresponse(unittest.TestCase): + """Billingimmuneresourcesresponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Billingimmuneresourcesresponse: + """Test Billingimmuneresourcesresponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Billingimmuneresourcesresponse` + """ + model = Billingimmuneresourcesresponse() + if include_optional: + return Billingimmuneresourcesresponse( + status = True, + message = '', + data = [ + hyperstack.models.billingimmuneresources.Billingimmuneresources( + resource_id = 56, + resource_type = '', + organization_id = 56, ) + ] + ) + else: + return Billingimmuneresourcesresponse( + ) + """ + + def testBillingimmuneresourcesresponse(self): + """Test Billingimmuneresourcesresponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_billingmetricesfields.py b/test/test_billingmetricesfields.py index be60ca3..fd2f275 100644 --- a/test/test_billingmetricesfields.py +++ b/test/test_billingmetricesfields.py @@ -44,7 +44,8 @@ def make_instance(self, include_optional) -> Billingmetricesfields: terminate_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), total_up_time = 1.337, total_bill = 1.337, - active = True + active = True, + exclude_billing = True ) else: return Billingmetricesfields( diff --git a/test/test_billingmetricesresponse.py b/test/test_billingmetricesresponse.py index 53479af..8b9d0cb 100644 --- a/test/test_billingmetricesresponse.py +++ b/test/test_billingmetricesresponse.py @@ -48,7 +48,8 @@ def make_instance(self, include_optional) -> Billingmetricesresponse: terminate_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), total_up_time = 1.337, total_bill = 1.337, - active = True, ) + active = True, + exclude_billing = True, ) ] ) else: diff --git a/test/test_callbacks_api.py b/test/test_callbacks_api.py index 4fdd695..08592cc 100644 --- a/test/test_callbacks_api.py +++ b/test/test_callbacks_api.py @@ -26,45 +26,45 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_attach_a_callback_to_a_volume(self) -> None: - """Test case for attach_a_callback_to_a_volume + def test_attach_callback_to_virtual_machine(self) -> None: + """Test case for attach_callback_to_virtual_machine - Attach a callback to a volume + Attach callback to virtual machine """ pass - def test_attach_a_callback_to_an_instance(self) -> None: - """Test case for attach_a_callback_to_an_instance + def test_attach_callback_to_volume(self) -> None: + """Test case for attach_callback_to_volume - Attach a callback to an instance + Attach callback to volume """ pass - def test_delete_a_callback_url_for_an_instance(self) -> None: - """Test case for delete_a_callback_url_for_an_instance + def test_delete_virtual_machine_callback(self) -> None: + """Test case for delete_virtual_machine_callback - Delete a callback URL for an instance + Delete virtual machine callback """ pass - def test_delete_callback_url_for_a_volume(self) -> None: - """Test case for delete_callback_url_for_a_volume + def test_delete_volume_callback(self) -> None: + """Test case for delete_volume_callback - Delete callback URL for a volume + Delete volume callback """ pass - def test_update_a_callback_url(self) -> None: - """Test case for update_a_callback_url + def test_update_virtual_machine_callback(self) -> None: + """Test case for update_virtual_machine_callback - Update a callback URL + Update virtual machine callback """ pass - def test_update_callback_url_for_volume(self) -> None: - """Test case for update_callback_url_for_volume + def test_update_volume_callback(self) -> None: + """Test case for update_volume_callback - Update callback URL for volume + Update volume callback """ pass diff --git a/test/test_api_key.py b/test/test_common_response_model.py similarity index 61% rename from test/test_api_key.py rename to test/test_common_response_model.py index b3cc04b..d97b8a3 100644 --- a/test/test_api_key.py +++ b/test/test_common_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.api_key import APIKey +from hyperstack.models.common_response_model import CommonResponseModel -class TestAPIKey(unittest.TestCase): - """APIKey unit test stubs""" +class TestCommonResponseModel(unittest.TestCase): + """CommonResponseModel unit test stubs""" def setUp(self): pass @@ -25,28 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> APIKey: - """Test APIKey + def make_instance(self, include_optional) -> CommonResponseModel: + """Test CommonResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `APIKey` + # uncomment below to create an instance of `CommonResponseModel` """ - model = APIKey() + model = CommonResponseModel() if include_optional: - return APIKey( + return CommonResponseModel( status = True, - message = '', - api_key = hyperstack.models.api_key_fields.APIKeyFields( - key = '', ) + message = '' ) else: - return APIKey( + return CommonResponseModel( ) """ - def testAPIKey(self): - """Test APIKey""" + def testCommonResponseModel(self): + """Test CommonResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_compliance_api.py b/test/test_compliance_api.py index 420c50c..4ab2367 100644 --- a/test/test_compliance_api.py +++ b/test/test_compliance_api.py @@ -29,7 +29,7 @@ def tearDown(self) -> None: def test_create_compliance(self) -> None: """Test case for create_compliance - Create Compliance + Create compliance """ pass @@ -40,10 +40,10 @@ def test_delete_a_compliance(self) -> None: """ pass - def test_get_compliance_list(self) -> None: - """Test case for get_compliance_list + def test_retrieve_compliance(self) -> None: + """Test case for retrieve_compliance - Get Compliance List + Retrieve GPU compliance """ pass diff --git a/test/test_contract_instance_fields.py b/test/test_contract_instance_fields.py new file mode 100644 index 0000000..5cbb3e7 --- /dev/null +++ b/test/test_contract_instance_fields.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.contract_instance_fields import ContractInstanceFields + +class TestContractInstanceFields(unittest.TestCase): + """ContractInstanceFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ContractInstanceFields: + """Test ContractInstanceFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ContractInstanceFields` + """ + model = ContractInstanceFields() + if include_optional: + return ContractInstanceFields( + id = 56, + name = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavor_name = '', + gpu_count = 56 + ) + else: + return ContractInstanceFields( + ) + """ + + def testContractInstanceFields(self): + """Test ContractInstanceFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contract_instances_response.py b/test/test_contract_instances_response.py new file mode 100644 index 0000000..d29dc5c --- /dev/null +++ b/test/test_contract_instances_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.contract_instances_response import ContractInstancesResponse + +class TestContractInstancesResponse(unittest.TestCase): + """ContractInstancesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ContractInstancesResponse: + """Test ContractInstancesResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ContractInstancesResponse` + """ + model = ContractInstancesResponse() + if include_optional: + return ContractInstancesResponse( + status = True, + message = '', + instances = [ + hyperstack.models.contract_instance_fields.ContractInstanceFields( + id = 56, + name = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavor_name = '', + gpu_count = 56, ) + ] + ) + else: + return ContractInstancesResponse( + ) + """ + + def testContractInstancesResponse(self): + """Test ContractInstancesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_contarct_fields.py b/test/test_create_contarct_fields.py new file mode 100644 index 0000000..18a6ce6 --- /dev/null +++ b/test/test_create_contarct_fields.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.create_contarct_fields import CreateContarctFields + +class TestCreateContarctFields(unittest.TestCase): + """CreateContarctFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateContarctFields: + """Test CreateContarctFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateContarctFields` + """ + model = CreateContarctFields() + if include_optional: + return CreateContarctFields( + id = 56, + org_id = 56, + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + discount_plans = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CreateContarctFields( + ) + """ + + def testCreateContarctFields(self): + """Test CreateContarctFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_contract_payload.py b/test/test_create_contract_payload.py new file mode 100644 index 0000000..0438cb4 --- /dev/null +++ b/test/test_create_contract_payload.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.create_contract_payload import CreateContractPayload + +class TestCreateContractPayload(unittest.TestCase): + """CreateContractPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateContractPayload: + """Test CreateContractPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateContractPayload` + """ + model = CreateContractPayload() + if include_optional: + return CreateContractPayload( + org_id = 56, + description = '', + discount_resources = [ + hyperstack.models.resource_payload.ResourcePayload( + resource_id = 56, + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) + ], + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56 + ) + else: + return CreateContractPayload( + org_id = 56, + discount_resources = [ + hyperstack.models.resource_payload.ResourcePayload( + resource_id = 56, + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) + ], + expiration_policy = 56, + ) + """ + + def testCreateContractPayload(self): + """Test CreateContractPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_discount_response.py b/test/test_create_discount_response.py index 7c00133..a4efc18 100644 --- a/test/test_create_discount_response.py +++ b/test/test_create_discount_response.py @@ -38,8 +38,11 @@ def make_instance(self, include_optional) -> CreateDiscountResponse: status = True, message = '', discount_plan = hyperstack.models.insert_discount_plan_fields.InsertDiscountPlanFields( - org_id = 56, - org_name = '', + customers = [ + hyperstack.models.customer_fields.CustomerFields( + id = 56, + plan_type = '', ) + ], discount_resources = [ hyperstack.models.discount_resource_fields.DiscountResourceFields( resource_id = 56, diff --git a/test/test_create_discounts_payload.py b/test/test_create_discounts_payload.py index e076fd0..752ade1 100644 --- a/test/test_create_discounts_payload.py +++ b/test/test_create_discounts_payload.py @@ -35,11 +35,18 @@ def make_instance(self, include_optional) -> CreateDiscountsPayload: model = CreateDiscountsPayload() if include_optional: return CreateDiscountsPayload( - org_id = 56, + customers = [ + hyperstack.models.customer_payload.CustomerPayload( + id = 56, + plan_type = '', ) + ], discount_resources = [ hyperstack.models.resource_payload.ResourcePayload( resource_id = 56, - discount_percent = 1.337, ) + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) ], start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -47,11 +54,18 @@ def make_instance(self, include_optional) -> CreateDiscountsPayload: ) else: return CreateDiscountsPayload( - org_id = 56, + customers = [ + hyperstack.models.customer_payload.CustomerPayload( + id = 56, + plan_type = '', ) + ], discount_resources = [ hyperstack.models.resource_payload.ResourcePayload( resource_id = 56, - discount_percent = 1.337, ) + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) ], discount_status = '', ) diff --git a/test/test_create_firewall_payload.py b/test/test_create_firewall_payload.py new file mode 100644 index 0000000..200d473 --- /dev/null +++ b/test/test_create_firewall_payload.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.create_firewall_payload import CreateFirewallPayload + +class TestCreateFirewallPayload(unittest.TestCase): + """CreateFirewallPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFirewallPayload: + """Test CreateFirewallPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateFirewallPayload` + """ + model = CreateFirewallPayload() + if include_optional: + return CreateFirewallPayload( + name = '', + description = '', + environment_id = 56 + ) + else: + return CreateFirewallPayload( + name = '', + environment_id = 56, + ) + """ + + def testCreateFirewallPayload(self): + """Test CreateFirewallPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_firewall_rule_payload.py b/test/test_create_firewall_rule_payload.py new file mode 100644 index 0000000..e769986 --- /dev/null +++ b/test/test_create_firewall_rule_payload.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.create_firewall_rule_payload import CreateFirewallRulePayload + +class TestCreateFirewallRulePayload(unittest.TestCase): + """CreateFirewallRulePayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateFirewallRulePayload: + """Test CreateFirewallRulePayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateFirewallRulePayload` + """ + model = CreateFirewallRulePayload() + if include_optional: + return CreateFirewallRulePayload( + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '' + ) + else: + return CreateFirewallRulePayload( + direction = '', + protocol = '', + ethertype = '', + remote_ip_prefix = '', + ) + """ + + def testCreateFirewallRulePayload(self): + """Test CreateFirewallRulePayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_gpu.py b/test/test_create_gpu.py index 2a6dd00..2734dc0 100644 --- a/test/test_create_gpu.py +++ b/test/test_create_gpu.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> CreateGPU: regions = [ '' ], - example_metadata = '' + example_metadata = '{"key": "value"}' ) else: return CreateGPU( diff --git a/test/test_create_instances_payload.py b/test/test_create_instances_payload.py index 6eda197..ef9ca54 100644 --- a/test/test_create_instances_payload.py +++ b/test/test_create_instances_payload.py @@ -51,15 +51,26 @@ def make_instance(self, include_optional) -> CreateInstancesPayload: user_data = '', callback_url = '', assign_floating_ip = True, + security_rules = [ + hyperstack.models.create_security_rule_payload.CreateSecurityRulePayload( + direction = '', + protocol = 'any', + ethertype = '', + remote_ip_prefix = '', ) + ], profile = hyperstack.models.profile_object_fields.ProfileObjectFields( name = '', description = '', ), - count = 56 + count = 56, + labels = [ + '' + ] ) else: return CreateInstancesPayload( name = '', environment_name = '', + flavor_name = '', key_name = '', count = 56, ) diff --git a/test/test_create_security_rule_payload.py b/test/test_create_security_rule_payload.py index 9c144ac..2928abc 100644 --- a/test/test_create_security_rule_payload.py +++ b/test/test_create_security_rule_payload.py @@ -36,14 +36,14 @@ def make_instance(self, include_optional) -> CreateSecurityRulePayload: if include_optional: return CreateSecurityRulePayload( direction = '', - protocol = '', + protocol = 'any', ethertype = '', remote_ip_prefix = '' ) else: return CreateSecurityRulePayload( direction = '', - protocol = '', + protocol = 'any', ethertype = '', remote_ip_prefix = '', ) diff --git a/test/test_permission_payload.py b/test/test_create_update_permission_payload.py similarity index 62% rename from test/test_permission_payload.py rename to test/test_create_update_permission_payload.py index 8e23bc1..a5731ec 100644 --- a/test/test_permission_payload.py +++ b/test/test_create_update_permission_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.permission_payload import PermissionPayload +from hyperstack.models.create_update_permission_payload import CreateUpdatePermissionPayload -class TestPermissionPayload(unittest.TestCase): - """PermissionPayload unit test stubs""" +class TestCreateUpdatePermissionPayload(unittest.TestCase): + """CreateUpdatePermissionPayload unit test stubs""" def setUp(self): pass @@ -25,23 +25,23 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PermissionPayload: - """Test PermissionPayload + def make_instance(self, include_optional) -> CreateUpdatePermissionPayload: + """Test CreateUpdatePermissionPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `PermissionPayload` + # uncomment below to create an instance of `CreateUpdatePermissionPayload` """ - model = PermissionPayload() + model = CreateUpdatePermissionPayload() if include_optional: - return PermissionPayload( + return CreateUpdatePermissionPayload( resource = '', permission = '', method = '', endpoint = '' ) else: - return PermissionPayload( + return CreateUpdatePermissionPayload( resource = '', permission = '', method = '', @@ -49,8 +49,8 @@ def make_instance(self, include_optional) -> PermissionPayload: ) """ - def testPermissionPayload(self): - """Test PermissionPayload""" + def testCreateUpdatePermissionPayload(self): + """Test CreateUpdatePermissionPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_permission_response.py b/test/test_create_update_permission_response_model.py similarity index 63% rename from test/test_permission_response.py rename to test/test_create_update_permission_response_model.py index ed84e07..f40d21c 100644 --- a/test/test_permission_response.py +++ b/test/test_create_update_permission_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.permission_response import PermissionResponse +from hyperstack.models.create_update_permission_response_model import CreateUpdatePermissionResponseModel -class TestPermissionResponse(unittest.TestCase): - """PermissionResponse unit test stubs""" +class TestCreateUpdatePermissionResponseModel(unittest.TestCase): + """CreateUpdatePermissionResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PermissionResponse: - """Test PermissionResponse + def make_instance(self, include_optional) -> CreateUpdatePermissionResponseModel: + """Test CreateUpdatePermissionResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `PermissionResponse` + # uncomment below to create an instance of `CreateUpdatePermissionResponseModel` """ - model = PermissionResponse() + model = CreateUpdatePermissionResponseModel() if include_optional: - return PermissionResponse( + return CreateUpdatePermissionResponseModel( status = True, message = '', permission = hyperstack.models.permission_fields.PermissionFields( @@ -46,12 +46,12 @@ def make_instance(self, include_optional) -> PermissionResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ) else: - return PermissionResponse( + return CreateUpdatePermissionResponseModel( ) """ - def testPermissionResponse(self): - """Test PermissionResponse""" + def testCreateUpdatePermissionResponseModel(self): + """Test CreateUpdatePermissionResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_policy_payload.py b/test/test_create_update_policy_payload.py similarity index 66% rename from test/test_policy_payload.py rename to test/test_create_update_policy_payload.py index 3789598..ddc5f17 100644 --- a/test/test_policy_payload.py +++ b/test/test_create_update_policy_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.policy_payload import PolicyPayload +from hyperstack.models.create_update_policy_payload import CreateUpdatePolicyPayload -class TestPolicyPayload(unittest.TestCase): - """PolicyPayload unit test stubs""" +class TestCreateUpdatePolicyPayload(unittest.TestCase): + """CreateUpdatePolicyPayload unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PolicyPayload: - """Test PolicyPayload + def make_instance(self, include_optional) -> CreateUpdatePolicyPayload: + """Test CreateUpdatePolicyPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `PolicyPayload` + # uncomment below to create an instance of `CreateUpdatePolicyPayload` """ - model = PolicyPayload() + model = CreateUpdatePolicyPayload() if include_optional: - return PolicyPayload( + return CreateUpdatePolicyPayload( name = '', description = '', is_public = True, @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> PolicyPayload: ] ) else: - return PolicyPayload( + return CreateUpdatePolicyPayload( name = '', description = '', is_public = True, @@ -53,8 +53,8 @@ def make_instance(self, include_optional) -> PolicyPayload: ) """ - def testPolicyPayload(self): - """Test PolicyPayload""" + def testCreateUpdatePolicyPayload(self): + """Test CreateUpdatePolicyPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_policy_response.py b/test/test_create_update_policy_response_model.py similarity index 68% rename from test/test_policy_response.py rename to test/test_create_update_policy_response_model.py index d626e00..bb731bb 100644 --- a/test/test_policy_response.py +++ b/test/test_create_update_policy_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.policy_response import PolicyResponse +from hyperstack.models.create_update_policy_response_model import CreateUpdatePolicyResponseModel -class TestPolicyResponse(unittest.TestCase): - """PolicyResponse unit test stubs""" +class TestCreateUpdatePolicyResponseModel(unittest.TestCase): + """CreateUpdatePolicyResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PolicyResponse: - """Test PolicyResponse + def make_instance(self, include_optional) -> CreateUpdatePolicyResponseModel: + """Test CreateUpdatePolicyResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `PolicyResponse` + # uncomment below to create an instance of `CreateUpdatePolicyResponseModel` """ - model = PolicyResponse() + model = CreateUpdatePolicyResponseModel() if include_optional: - return PolicyResponse( + return CreateUpdatePolicyResponseModel( status = True, message = '', policy = hyperstack.models.policy_fields.PolicyFields( @@ -50,12 +50,12 @@ def make_instance(self, include_optional) -> PolicyResponse: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ) else: - return PolicyResponse( + return CreateUpdatePolicyResponseModel( ) """ - def testPolicyResponse(self): - """Test PolicyResponse""" + def testCreateUpdatePolicyResponseModel(self): + """Test CreateUpdatePolicyResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_rbac_role_payload.py b/test/test_create_update_rbac_role_payload.py similarity index 64% rename from test/test_rbac_role_payload.py rename to test/test_create_update_rbac_role_payload.py index bc8cfdc..052c3aa 100644 --- a/test/test_rbac_role_payload.py +++ b/test/test_create_update_rbac_role_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.rbac_role_payload import RBACRolePayload +from hyperstack.models.create_update_rbac_role_payload import CreateUpdateRbacRolePayload -class TestRBACRolePayload(unittest.TestCase): - """RBACRolePayload unit test stubs""" +class TestCreateUpdateRbacRolePayload(unittest.TestCase): + """CreateUpdateRbacRolePayload unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RBACRolePayload: - """Test RBACRolePayload + def make_instance(self, include_optional) -> CreateUpdateRbacRolePayload: + """Test CreateUpdateRbacRolePayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RBACRolePayload` + # uncomment below to create an instance of `CreateUpdateRbacRolePayload` """ - model = RBACRolePayload() + model = CreateUpdateRbacRolePayload() if include_optional: - return RBACRolePayload( + return CreateUpdateRbacRolePayload( name = '', description = '', policies = [ @@ -45,14 +45,14 @@ def make_instance(self, include_optional) -> RBACRolePayload: ] ) else: - return RBACRolePayload( + return CreateUpdateRbacRolePayload( name = '', description = '', ) """ - def testRBACRolePayload(self): - """Test RBACRolePayload""" + def testCreateUpdateRbacRolePayload(self): + """Test CreateUpdateRbacRolePayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_create_volume_payload.py b/test/test_create_volume_payload.py index c16628a..857f765 100644 --- a/test/test_create_volume_payload.py +++ b/test/test_create_volume_payload.py @@ -45,6 +45,11 @@ def make_instance(self, include_optional) -> CreateVolumePayload: ) else: return CreateVolumePayload( + name = '', + environment_name = '', + description = '', + volume_type = '', + size = 56, ) """ diff --git a/test/test_customer_contract_api.py b/test/test_customer_contract_api.py new file mode 100644 index 0000000..d3a0bbd --- /dev/null +++ b/test/test_customer_contract_api.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.api.customer_contract_api import CustomerContractApi + + +class TestCustomerContractApi(unittest.TestCase): + """CustomerContractApi unit test stubs""" + + def setUp(self) -> None: + self.api = CustomerContractApi() + + def tearDown(self) -> None: + pass + + def test_details_of_contract_by_id_for_customer(self) -> None: + """Test case for details_of_contract_by_id_for_customer + + Details of Contract by ID for Customer + """ + pass + + def test_list_contracts_for_customer(self) -> None: + """Test case for list_contracts_for_customer + + List Contracts for Customer + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_contract_detail_response_model.py b/test/test_customer_contract_detail_response_model.py new file mode 100644 index 0000000..c567751 --- /dev/null +++ b/test/test_customer_contract_detail_response_model.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.customer_contract_detail_response_model import CustomerContractDetailResponseModel + +class TestCustomerContractDetailResponseModel(unittest.TestCase): + """CustomerContractDetailResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomerContractDetailResponseModel: + """Test CustomerContractDetailResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomerContractDetailResponseModel` + """ + model = CustomerContractDetailResponseModel() + if include_optional: + return CustomerContractDetailResponseModel( + status = True, + message = '', + contracts = hyperstack.models.customer_contract_fields.CustomerContractFields( + id = 56, + org_id = 56, + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + status = '', + discounts = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return CustomerContractDetailResponseModel( + ) + """ + + def testCustomerContractDetailResponseModel(self): + """Test CustomerContractDetailResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_contract_fields.py b/test/test_customer_contract_fields.py new file mode 100644 index 0000000..6c28c12 --- /dev/null +++ b/test/test_customer_contract_fields.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.customer_contract_fields import CustomerContractFields + +class TestCustomerContractFields(unittest.TestCase): + """CustomerContractFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomerContractFields: + """Test CustomerContractFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomerContractFields` + """ + model = CustomerContractFields() + if include_optional: + return CustomerContractFields( + id = 56, + org_id = 56, + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + status = '', + discounts = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return CustomerContractFields( + ) + """ + + def testCustomerContractFields(self): + """Test CustomerContractFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_fields.py b/test/test_customer_fields.py new file mode 100644 index 0000000..6900e5e --- /dev/null +++ b/test/test_customer_fields.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.customer_fields import CustomerFields + +class TestCustomerFields(unittest.TestCase): + """CustomerFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomerFields: + """Test CustomerFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomerFields` + """ + model = CustomerFields() + if include_optional: + return CustomerFields( + id = 56, + plan_type = '' + ) + else: + return CustomerFields( + ) + """ + + def testCustomerFields(self): + """Test CustomerFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_customer_payload.py b/test/test_customer_payload.py new file mode 100644 index 0000000..24dda97 --- /dev/null +++ b/test/test_customer_payload.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.customer_payload import CustomerPayload + +class TestCustomerPayload(unittest.TestCase): + """CustomerPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CustomerPayload: + """Test CustomerPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CustomerPayload` + """ + model = CustomerPayload() + if include_optional: + return CustomerPayload( + id = 56, + plan_type = '' + ) + else: + return CustomerPayload( + id = 56, + plan_type = '', + ) + """ + + def testCustomerPayload(self): + """Test CustomerPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dashboard_api.py b/test/test_dashboard_api.py index f3aba19..2773b78 100644 --- a/test/test_dashboard_api.py +++ b/test/test_dashboard_api.py @@ -26,10 +26,10 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_get_instances_containers_and_volumes_overview(self) -> None: - """Test case for get_instances_containers_and_volumes_overview + def test_retrieve_dashboard(self) -> None: + """Test case for retrieve_dashboard - Get Instances, Containers and Volumes Overview + Retrieve Dashboard """ pass diff --git a/test/test_discount_entity_model.py b/test/test_discount_entity_model.py new file mode 100644 index 0000000..f864887 --- /dev/null +++ b/test/test_discount_entity_model.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.discount_entity_model import DiscountEntityModel + +class TestDiscountEntityModel(unittest.TestCase): + """DiscountEntityModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DiscountEntityModel: + """Test DiscountEntityModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DiscountEntityModel` + """ + model = DiscountEntityModel() + if include_optional: + return DiscountEntityModel( + entity = '', + data = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ] + ) + else: + return DiscountEntityModel( + ) + """ + + def testDiscountEntityModel(self): + """Test DiscountEntityModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_discount_fields.py b/test/test_discount_fields.py new file mode 100644 index 0000000..4fe44e4 --- /dev/null +++ b/test/test_discount_fields.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.discount_fields import DiscountFields + +class TestDiscountFields(unittest.TestCase): + """DiscountFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DiscountFields: + """Test DiscountFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DiscountFields` + """ + model = DiscountFields() + if include_optional: + return DiscountFields( + org_id = 56, + org_name = '', + plan_type = '', + vm_id = 56, + vm_name = '', + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + discount_status = '' + ) + else: + return DiscountFields( + ) + """ + + def testDiscountFields(self): + """Test DiscountFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_discount_plan_fields.py b/test/test_discount_plan_fields.py new file mode 100644 index 0000000..15f6148 --- /dev/null +++ b/test/test_discount_plan_fields.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.discount_plan_fields import DiscountPlanFields + +class TestDiscountPlanFields(unittest.TestCase): + """DiscountPlanFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DiscountPlanFields: + """Test DiscountPlanFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DiscountPlanFields` + """ + model = DiscountPlanFields() + if include_optional: + return DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '' + ) + else: + return DiscountPlanFields( + ) + """ + + def testDiscountPlanFields(self): + """Test DiscountPlanFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_editlabelofanexisting_vm_payload.py b/test/test_editlabelofanexisting_vm_payload.py new file mode 100644 index 0000000..6d90213 --- /dev/null +++ b/test/test_editlabelofanexisting_vm_payload.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.editlabelofanexisting_vm_payload import EditlabelofanexistingVMPayload + +class TestEditlabelofanexistingVMPayload(unittest.TestCase): + """EditlabelofanexistingVMPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EditlabelofanexistingVMPayload: + """Test EditlabelofanexistingVMPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EditlabelofanexistingVMPayload` + """ + model = EditlabelofanexistingVMPayload() + if include_optional: + return EditlabelofanexistingVMPayload( + labels = [ + '' + ] + ) + else: + return EditlabelofanexistingVMPayload( + ) + """ + + def testEditlabelofanexistingVMPayload(self): + """Test EditlabelofanexistingVMPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_environment_api.py b/test/test_environment_api.py index 85df516..415b80d 100644 --- a/test/test_environment_api.py +++ b/test/test_environment_api.py @@ -29,35 +29,35 @@ def tearDown(self) -> None: def test_create_environment(self) -> None: """Test case for create_environment - Create Environment + Create environment """ pass - def test_delete_an_environment(self) -> None: - """Test case for delete_an_environment + def test_delete_environment(self) -> None: + """Test case for delete_environment - Delete an environment + Delete environment """ pass - def test_get_an_environment_details(self) -> None: - """Test case for get_an_environment_details + def test_list_environments(self) -> None: + """Test case for list_environments - Get an environment detail + List environments """ pass - def test_list_environments(self) -> None: - """Test case for list_environments + def test_retrieve_environment(self) -> None: + """Test case for retrieve_environment - List Environments + Retrieve environment """ pass - def test_update_an_environment(self) -> None: - """Test case for update_an_environment + def test_update_environment(self) -> None: + """Test case for update_environment - Update Environment + Update environment """ pass diff --git a/test/test_envrionment_resources.py b/test/test_envrionment_resources.py deleted file mode 100644 index 195c0d9..0000000 --- a/test/test_envrionment_resources.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - Infrahub-API - - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - - The version of the OpenAPI document: 1.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hyperstack.models.envrionment_resources import EnvrionmentResources - -class TestEnvrionmentResources(unittest.TestCase): - """EnvrionmentResources unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnvrionmentResources: - """Test EnvrionmentResources - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnvrionmentResources` - """ - model = EnvrionmentResources() - if include_optional: - return EnvrionmentResources( - id = 56, - name = '', - region = '', - instances = [ - hyperstack.models.instance_resources.InstanceResources( - id = 56, - name = '', - host = '', - status = '', - flavor = hyperstack.models.flavor_resource.FlavorResource( - id = 56, - name = '', - cpu = 56, - ram = 1.337, - disk = 56, - gpu = '', - gpu_count = 56, ), - image_id = 56, - volume_id = 56, - keypair_name = '', - fixed_ip = '', - floating_ip = '', - floating_ip_status = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - volumes = [ - hyperstack.models.volume_resource.VolumeResource( - id = 56, - name = '', - type = '', - size = 56, - status = '', - bootable = True, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - containers = [ - hyperstack.models.container_resource.ContainerResource( - id = 56, - name = '', - flavor = hyperstack.models.flavor_resource.FlavorResource( - id = 56, - name = '', - cpu = 56, - ram = 1.337, - disk = 56, - gpu = '', - gpu_count = 56, ), - status = '', - image = '', - fixed_ip = '', - floating_ip = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - clusters = [ - hyperstack.models.cluster_resource.ClusterResource( - id = 56, - name = '', - kubernetes_version = '', - status = '', - master_count = 56, - node_count = 56, - node_flavor = hyperstack.models.flavor_resource.FlavorResource( - id = 56, - name = '', - cpu = 56, - ram = 1.337, - disk = 56, - gpu = '', - gpu_count = 56, ), - enable_public_ip = True, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return EnvrionmentResources( - ) - """ - - def testEnvrionmentResources(self): - """Test EnvrionmentResources""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_excludebillingpostpayload.py b/test/test_excludebillingpostpayload.py new file mode 100644 index 0000000..b2a6312 --- /dev/null +++ b/test/test_excludebillingpostpayload.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.excludebillingpostpayload import Excludebillingpostpayload + +class TestExcludebillingpostpayload(unittest.TestCase): + """Excludebillingpostpayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Excludebillingpostpayload: + """Test Excludebillingpostpayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Excludebillingpostpayload` + """ + model = Excludebillingpostpayload() + if include_optional: + return Excludebillingpostpayload( + resource_id = 56, + exclude = True + ) + else: + return Excludebillingpostpayload( + resource_id = 56, + exclude = True, + ) + """ + + def testExcludebillingpostpayload(self): + """Test Excludebillingpostpayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_excludebillingpostresponse.py b/test/test_excludebillingpostresponse.py new file mode 100644 index 0000000..b4ba83e --- /dev/null +++ b/test/test_excludebillingpostresponse.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.excludebillingpostresponse import Excludebillingpostresponse + +class TestExcludebillingpostresponse(unittest.TestCase): + """Excludebillingpostresponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Excludebillingpostresponse: + """Test Excludebillingpostresponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Excludebillingpostresponse` + """ + model = Excludebillingpostresponse() + if include_optional: + return Excludebillingpostresponse( + status = True, + message = '', + data = hyperstack.models.excludebillingpostpayload.Excludebillingpostpayload( + resource_id = 56, + exclude = True, ) + ) + else: + return Excludebillingpostresponse( + ) + """ + + def testExcludebillingpostresponse(self): + """Test Excludebillingpostresponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewall_attachment_api.py b/test/test_firewall_attachment_api.py new file mode 100644 index 0000000..18ceb0e --- /dev/null +++ b/test/test_firewall_attachment_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.api.firewall_attachment_api import FirewallAttachmentApi + + +class TestFirewallAttachmentApi(unittest.TestCase): + """FirewallAttachmentApi unit test stubs""" + + def setUp(self) -> None: + self.api = FirewallAttachmentApi() + + def tearDown(self) -> None: + pass + + def test_attach_firewall_to_vms(self) -> None: + """Test case for attach_firewall_to_vms + + Attach Firewalls to VMs + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_cluster_resource.py b/test/test_firewall_attachment_model.py similarity index 54% rename from test/test_cluster_resource.py rename to test/test_firewall_attachment_model.py index 319dd70..362ad02 100644 --- a/test/test_cluster_resource.py +++ b/test/test_firewall_attachment_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.cluster_resource import ClusterResource +from hyperstack.models.firewall_attachment_model import FirewallAttachmentModel -class TestClusterResource(unittest.TestCase): - """ClusterResource unit test stubs""" +class TestFirewallAttachmentModel(unittest.TestCase): + """FirewallAttachmentModel unit test stubs""" def setUp(self): pass @@ -25,40 +25,34 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ClusterResource: - """Test ClusterResource + def make_instance(self, include_optional) -> FirewallAttachmentModel: + """Test FirewallAttachmentModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `ClusterResource` + # uncomment below to create an instance of `FirewallAttachmentModel` """ - model = ClusterResource() + model = FirewallAttachmentModel() if include_optional: - return ClusterResource( + return FirewallAttachmentModel( id = 56, - name = '', - kubernetes_version = '', status = '', - master_count = 56, - node_count = 56, - node_flavor = hyperstack.models.flavor_resource.FlavorResource( + vm = hyperstack.models.firewall_attachment_vm_model.FirewallAttachmentVMModel( id = 56, name = '', - cpu = 56, - ram = 1.337, - disk = 56, - gpu = '', - gpu_count = 56, ), - enable_public_ip = True, + flavor = '', + environment = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return ClusterResource( + return FirewallAttachmentModel( ) """ - def testClusterResource(self): - """Test ClusterResource""" + def testFirewallAttachmentModel(self): + """Test FirewallAttachmentModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_firewall_attachment_vm_model.py b/test/test_firewall_attachment_vm_model.py new file mode 100644 index 0000000..69051f0 --- /dev/null +++ b/test/test_firewall_attachment_vm_model.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.firewall_attachment_vm_model import FirewallAttachmentVMModel + +class TestFirewallAttachmentVMModel(unittest.TestCase): + """FirewallAttachmentVMModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallAttachmentVMModel: + """Test FirewallAttachmentVMModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallAttachmentVMModel` + """ + model = FirewallAttachmentVMModel() + if include_optional: + return FirewallAttachmentVMModel( + id = 56, + name = '', + flavor = '', + environment = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return FirewallAttachmentVMModel( + ) + """ + + def testFirewallAttachmentVMModel(self): + """Test FirewallAttachmentVMModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewall_detail_fields.py b/test/test_firewall_detail_fields.py new file mode 100644 index 0000000..5dc83e0 --- /dev/null +++ b/test/test_firewall_detail_fields.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.firewall_detail_fields import FirewallDetailFields + +class TestFirewallDetailFields(unittest.TestCase): + """FirewallDetailFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallDetailFields: + """Test FirewallDetailFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallDetailFields` + """ + model = FirewallDetailFields() + if include_optional: + return FirewallDetailFields( + id = 56, + name = '', + description = '', + environment = hyperstack.models.firewall_environment_fields.FirewallEnvironmentFields( + id = 56, + name = '', + region = '', ), + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + rules = [ + hyperstack.models.security_group_rule_fields.SecurityGroupRuleFields( + id = 56, + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + attachments = [ + hyperstack.models.firewall_attachment_model.FirewallAttachmentModel( + id = 56, + status = '', + vm = hyperstack.models.firewall_attachment_vm_model.FirewallAttachmentVMModel( + id = 56, + name = '', + flavor = '', + environment = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return FirewallDetailFields( + ) + """ + + def testFirewallDetailFields(self): + """Test FirewallDetailFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewall_detail_response.py b/test/test_firewall_detail_response.py new file mode 100644 index 0000000..32de42a --- /dev/null +++ b/test/test_firewall_detail_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.firewall_detail_response import FirewallDetailResponse + +class TestFirewallDetailResponse(unittest.TestCase): + """FirewallDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallDetailResponse: + """Test FirewallDetailResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallDetailResponse` + """ + model = FirewallDetailResponse() + if include_optional: + return FirewallDetailResponse( + status = True, + message = '', + firewall = hyperstack.models.firewall_detail_fields.FirewallDetailFields( + id = 56, + name = '', + description = '', + environment = hyperstack.models.firewall_environment_fields.FirewallEnvironmentFields( + id = 56, + name = '', + region = '', ), + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + rules = [ + hyperstack.models.security_group_rule_fields.SecurityGroupRuleFields( + id = 56, + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + attachments = [ + hyperstack.models.firewall_attachment_model.FirewallAttachmentModel( + id = 56, + status = '', + vm = hyperstack.models.firewall_attachment_vm_model.FirewallAttachmentVMModel( + id = 56, + name = '', + flavor = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ) + ) + else: + return FirewallDetailResponse( + ) + """ + + def testFirewallDetailResponse(self): + """Test FirewallDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_resource.py b/test/test_firewall_environment_fields.py similarity index 58% rename from test/test_flavor_resource.py rename to test/test_firewall_environment_fields.py index 73f584c..df966a5 100644 --- a/test/test_flavor_resource.py +++ b/test/test_firewall_environment_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.flavor_resource import FlavorResource +from hyperstack.models.firewall_environment_fields import FirewallEnvironmentFields -class TestFlavorResource(unittest.TestCase): - """FlavorResource unit test stubs""" +class TestFirewallEnvironmentFields(unittest.TestCase): + """FirewallEnvironmentFields unit test stubs""" def setUp(self): pass @@ -25,31 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> FlavorResource: - """Test FlavorResource + def make_instance(self, include_optional) -> FirewallEnvironmentFields: + """Test FirewallEnvironmentFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `FlavorResource` + # uncomment below to create an instance of `FirewallEnvironmentFields` """ - model = FlavorResource() + model = FirewallEnvironmentFields() if include_optional: - return FlavorResource( + return FirewallEnvironmentFields( id = 56, name = '', - cpu = 56, - ram = 1.337, - disk = 56, - gpu = '', - gpu_count = 56 + region = '' ) else: - return FlavorResource( + return FirewallEnvironmentFields( ) """ - def testFlavorResource(self): - """Test FlavorResource""" + def testFirewallEnvironmentFields(self): + """Test FirewallEnvironmentFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_container_resource.py b/test/test_firewall_fields.py similarity index 56% rename from test/test_container_resource.py rename to test/test_firewall_fields.py index 940df78..ea4dcd2 100644 --- a/test/test_container_resource.py +++ b/test/test_firewall_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.container_resource import ContainerResource +from hyperstack.models.firewall_fields import FirewallFields -class TestContainerResource(unittest.TestCase): - """ContainerResource unit test stubs""" +class TestFirewallFields(unittest.TestCase): + """FirewallFields unit test stubs""" def setUp(self): pass @@ -25,39 +25,33 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ContainerResource: - """Test ContainerResource + def make_instance(self, include_optional) -> FirewallFields: + """Test FirewallFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `ContainerResource` + # uncomment below to create an instance of `FirewallFields` """ - model = ContainerResource() + model = FirewallFields() if include_optional: - return ContainerResource( + return FirewallFields( id = 56, name = '', - flavor = hyperstack.models.flavor_resource.FlavorResource( + description = '', + environment = hyperstack.models.firewall_environment_fields.FirewallEnvironmentFields( id = 56, name = '', - cpu = 56, - ram = 1.337, - disk = 56, - gpu = '', - gpu_count = 56, ), + region = '', ), status = '', - image = '', - fixed_ip = '', - floating_ip = '', created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return ContainerResource( + return FirewallFields( ) """ - def testContainerResource(self): - """Test ContainerResource""" + def testFirewallFields(self): + """Test FirewallFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_firewall_response.py b/test/test_firewall_response.py new file mode 100644 index 0000000..ffe9c40 --- /dev/null +++ b/test/test_firewall_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.firewall_response import FirewallResponse + +class TestFirewallResponse(unittest.TestCase): + """FirewallResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallResponse: + """Test FirewallResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallResponse` + """ + model = FirewallResponse() + if include_optional: + return FirewallResponse( + status = True, + message = '', + firewall = hyperstack.models.firewall_fields.FirewallFields( + id = 56, + name = '', + description = '', + environment = hyperstack.models.firewall_environment_fields.FirewallEnvironmentFields( + id = 56, + name = '', + region = '', ), + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return FirewallResponse( + ) + """ + + def testFirewallResponse(self): + """Test FirewallResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewall_rule.py b/test/test_firewall_rule.py new file mode 100644 index 0000000..5a59667 --- /dev/null +++ b/test/test_firewall_rule.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.firewall_rule import FirewallRule + +class TestFirewallRule(unittest.TestCase): + """FirewallRule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallRule: + """Test FirewallRule + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallRule` + """ + model = FirewallRule() + if include_optional: + return FirewallRule( + status = True, + message = '', + firewall_rule = hyperstack.models.security_group_rule_fields.SecurityGroupRuleFields( + id = 56, + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return FirewallRule( + ) + """ + + def testFirewallRule(self): + """Test FirewallRule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewalls_api.py b/test/test_firewalls_api.py new file mode 100644 index 0000000..307ca16 --- /dev/null +++ b/test/test_firewalls_api.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.api.firewalls_api import FirewallsApi + + +class TestFirewallsApi(unittest.TestCase): + """FirewallsApi unit test stubs""" + + def setUp(self) -> None: + self.api = FirewallsApi() + + def tearDown(self) -> None: + pass + + def test_add_rules_to_firewall(self) -> None: + """Test case for add_rules_to_firewall + + Add Rules to Firewall + """ + pass + + def test_create_firewall(self) -> None: + """Test case for create_firewall + + Create Firewall + """ + pass + + def test_delete_firewall(self) -> None: + """Test case for delete_firewall + + Delete Firewall + """ + pass + + def test_delete_firewall_rules_from_firewall(self) -> None: + """Test case for delete_firewall_rules_from_firewall + + Delete Firewall Rules from Firewall + """ + pass + + def test_details_of_firewall_by_id(self) -> None: + """Test case for details_of_firewall_by_id + + Details of Firewall by ID + """ + pass + + def test_retrieve_firewalls(self) -> None: + """Test case for retrieve_firewalls + + Retrieve Firewalls + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_firewalls_list_response.py b/test/test_firewalls_list_response.py new file mode 100644 index 0000000..7343c30 --- /dev/null +++ b/test/test_firewalls_list_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.firewalls_list_response import FirewallsListResponse + +class TestFirewallsListResponse(unittest.TestCase): + """FirewallsListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FirewallsListResponse: + """Test FirewallsListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FirewallsListResponse` + """ + model = FirewallsListResponse() + if include_optional: + return FirewallsListResponse( + status = True, + message = '', + firewalls = [ + hyperstack.models.firewall_detail_fields.FirewallDetailFields( + id = 56, + name = '', + description = '', + environment = hyperstack.models.firewall_environment_fields.FirewallEnvironmentFields( + id = 56, + name = '', + region = '', ), + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + rules = [ + hyperstack.models.security_group_rule_fields.SecurityGroupRuleFields( + id = 56, + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + attachments = [ + hyperstack.models.firewall_attachment_model.FirewallAttachmentModel( + id = 56, + status = '', + vm = hyperstack.models.firewall_attachment_vm_model.FirewallAttachmentVMModel( + id = 56, + name = '', + flavor = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], ) + ] + ) + else: + return FirewallsListResponse( + ) + """ + + def testFirewallsListResponse(self): + """Test FirewallsListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_admin_response.py b/test/test_flavor_admin_response.py new file mode 100644 index 0000000..8a676e0 --- /dev/null +++ b/test/test_flavor_admin_response.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.flavor_admin_response import FlavorAdminResponse + +class TestFlavorAdminResponse(unittest.TestCase): + """FlavorAdminResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorAdminResponse: + """Test FlavorAdminResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorAdminResponse` + """ + model = FlavorAdminResponse() + if include_optional: + return FlavorAdminResponse( + status = True, + message = '', + flavor = hyperstack.models.flavor_admin_response_flavors.FlavorAdminResponseFlavors( + id = 56, + name = '', + description = '', + openstack_id = '', + region_id = 56, + region = '', + cpu = 56, + ram = 1.337, + disk = 56, + ephemeral = 56, + gpu = '', + gpu_count = 56, + order = 56, + is_public = True, + is_custom = True, + status = '', + organizations = [ + 56 + ], + flavors = [ + '' + ], + projects = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return FlavorAdminResponse( + ) + """ + + def testFlavorAdminResponse(self): + """Test FlavorAdminResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_admin_response_flavors.py b/test/test_flavor_admin_response_flavors.py new file mode 100644 index 0000000..fdedfa8 --- /dev/null +++ b/test/test_flavor_admin_response_flavors.py @@ -0,0 +1,79 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.flavor_admin_response_flavors import FlavorAdminResponseFlavors + +class TestFlavorAdminResponseFlavors(unittest.TestCase): + """FlavorAdminResponseFlavors unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorAdminResponseFlavors: + """Test FlavorAdminResponseFlavors + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorAdminResponseFlavors` + """ + model = FlavorAdminResponseFlavors() + if include_optional: + return FlavorAdminResponseFlavors( + id = 56, + name = '', + description = '', + openstack_id = '', + region_id = 56, + region = '', + cpu = 56, + ram = 1.337, + disk = 56, + ephemeral = 56, + gpu = '', + gpu_count = 56, + order = 56, + is_public = True, + is_custom = True, + status = '', + organizations = [ + 56 + ], + flavors = [ + '' + ], + projects = [ + '' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return FlavorAdminResponseFlavors( + organizations = [ + 56 + ], + ) + """ + + def testFlavorAdminResponseFlavors(self): + """Test FlavorAdminResponseFlavors""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_api.py b/test/test_flavor_api.py index 9c9cecc..532cab6 100644 --- a/test/test_flavor_api.py +++ b/test/test_flavor_api.py @@ -26,10 +26,10 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_retrieve_flavors(self) -> None: - """Test case for retrieve_flavors + def test_list_flavors(self) -> None: + """Test case for list_flavors - Retrieve Flavors + List flavors """ pass diff --git a/test/test_flavor_detail_response.py b/test/test_flavor_detail_response.py new file mode 100644 index 0000000..001d229 --- /dev/null +++ b/test/test_flavor_detail_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.flavor_detail_response import FlavorDetailResponse + +class TestFlavorDetailResponse(unittest.TestCase): + """FlavorDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorDetailResponse: + """Test FlavorDetailResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorDetailResponse` + """ + model = FlavorDetailResponse() + if include_optional: + return FlavorDetailResponse( + status = True, + message = '', + flavor = hyperstack.models.admin_flavor_detail_fields.AdminFlavorDetailFields( + id = 56, + openstack_id = '', + name = '', + region_name = '', + cpu = 56, + ram = 1.337, + disk = 56, + gpu = '', + status = '', + gpu_count = 56, + stock_available = True, + nodes = [ + hyperstack.models.admin_flavor_detail_node_fields.AdminFlavorDetailNodeFields( + id = 56, + openstack_id = '', + name = '', + available = 56, + status = '', + provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + projects = [ + '' + ], ) + ], + vms = [ + 56 + ], + is_public = True, + is_custom = True, + org_ids = [ + 56 + ], + ephemeral = 56, + description = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return FlavorDetailResponse( + ) + """ + + def testFlavorDetailResponse(self): + """Test FlavorDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_fields.py b/test/test_flavor_fields.py index c1971b6..e1642dd 100644 --- a/test/test_flavor_fields.py +++ b/test/test_flavor_fields.py @@ -41,6 +41,7 @@ def make_instance(self, include_optional) -> FlavorFields: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56, stock_available = True, diff --git a/test/test_flavor_item_get_response.py b/test/test_flavor_item_get_response.py index 489341e..638745e 100644 --- a/test/test_flavor_item_get_response.py +++ b/test/test_flavor_item_get_response.py @@ -45,6 +45,7 @@ def make_instance(self, include_optional) -> FlavorItemGetResponse: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56, stock_available = True, diff --git a/test/test_flavor_list_response.py b/test/test_flavor_list_response.py index 1c618c7..0fec806 100644 --- a/test/test_flavor_list_response.py +++ b/test/test_flavor_list_response.py @@ -49,6 +49,7 @@ def make_instance(self, include_optional) -> FlavorListResponse: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56, stock_available = True, diff --git a/test/test_flavor_response.py b/test/test_flavor_response.py index 4c2f497..f7f250f 100644 --- a/test/test_flavor_response.py +++ b/test/test_flavor_response.py @@ -44,6 +44,7 @@ def make_instance(self, include_optional) -> FlavorResponse: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56, stock_available = True, diff --git a/test/test_flavor_vm_fields.py b/test/test_flavor_vm_fields.py new file mode 100644 index 0000000..125f64e --- /dev/null +++ b/test/test_flavor_vm_fields.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.flavor_vm_fields import FlavorVMFields + +class TestFlavorVMFields(unittest.TestCase): + """FlavorVMFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorVMFields: + """Test FlavorVMFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorVMFields` + """ + model = FlavorVMFields() + if include_optional: + return FlavorVMFields( + id = 56, + openstack_id = '', + name = '', + host = '', + org_id = 56, + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return FlavorVMFields( + ) + """ + + def testFlavorVMFields(self): + """Test FlavorVMFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flavor_vms_response.py b/test/test_flavor_vms_response.py new file mode 100644 index 0000000..6006206 --- /dev/null +++ b/test/test_flavor_vms_response.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.flavor_vms_response import FlavorVMsResponse + +class TestFlavorVMsResponse(unittest.TestCase): + """FlavorVMsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FlavorVMsResponse: + """Test FlavorVMsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FlavorVMsResponse` + """ + model = FlavorVMsResponse() + if include_optional: + return FlavorVMsResponse( + status = True, + message = '', + flavor_vms = [ + hyperstack.models.flavor_vm_fields.FlavorVMFields( + id = 56, + openstack_id = '', + name = '', + host = '', + org_id = 56, + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return FlavorVMsResponse( + ) + """ + + def testFlavorVMsResponse(self): + """Test FlavorVMsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_floating_ip_api.py b/test/test_floating_ip_api.py index 457663b..94f1851 100644 --- a/test/test_floating_ip_api.py +++ b/test/test_floating_ip_api.py @@ -26,17 +26,17 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_attach_floating_ip_to_instance(self) -> None: - """Test case for attach_floating_ip_to_instance + def test_attach_public_ip_to_virtual_machine(self) -> None: + """Test case for attach_public_ip_to_virtual_machine - Attach Floating IP to Instance + Attach public IP to virtual machine """ pass - def test_detach_floating_ip_to_instance(self) -> None: - """Test case for detach_floating_ip_to_instance + def test_detach_public_ip_from_virtual_machine(self) -> None: + """Test case for detach_public_ip_from_virtual_machine - Detach Floating IP to Instance + Detach public IP from virtual machine """ pass diff --git a/test/test_generate_api_key_response_model.py b/test/test_generate_api_key_response_model.py new file mode 100644 index 0000000..e8f6edc --- /dev/null +++ b/test/test_generate_api_key_response_model.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.generate_api_key_response_model import GenerateApiKeyResponseModel + +class TestGenerateApiKeyResponseModel(unittest.TestCase): + """GenerateApiKeyResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GenerateApiKeyResponseModel: + """Test GenerateApiKeyResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GenerateApiKeyResponseModel` + """ + model = GenerateApiKeyResponseModel() + if include_optional: + return GenerateApiKeyResponseModel( + status = True, + message = '', + api_key = '' + ) + else: + return GenerateApiKeyResponseModel( + ) + """ + + def testGenerateApiKeyResponseModel(self): + """Test GenerateApiKeyResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_all_discount_for_all_organization_response.py b/test/test_get_all_discount_for_all_organization_response.py index 5d95823..2f96f75 100644 --- a/test/test_get_all_discount_for_all_organization_response.py +++ b/test/test_get_all_discount_for_all_organization_response.py @@ -38,17 +38,17 @@ def make_instance(self, include_optional) -> GetAllDiscountForAllOrganizationRes status = True, message = '', discount_plans = [ - hyperstack.models.insert_discount_plan_fields.InsertDiscountPlanFields( + hyperstack.models.get_all_discounts_fields.GetAllDiscountsFields( org_id = 56, org_name = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + discount_status = '', discount_resources = [ hyperstack.models.discount_resource_fields.DiscountResourceFields( resource_id = 56, discount_percent = 1.337, ) - ], - start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - discount_status = '', ) + ], ) ] ) else: diff --git a/test/test_get_all_discounts_fields.py b/test/test_get_all_discounts_fields.py new file mode 100644 index 0000000..4bc810b --- /dev/null +++ b/test/test_get_all_discounts_fields.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_all_discounts_fields import GetAllDiscountsFields + +class TestGetAllDiscountsFields(unittest.TestCase): + """GetAllDiscountsFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetAllDiscountsFields: + """Test GetAllDiscountsFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetAllDiscountsFields` + """ + model = GetAllDiscountsFields() + if include_optional: + return GetAllDiscountsFields( + org_id = 56, + org_name = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + discount_status = '', + discount_resources = [ + hyperstack.models.discount_resource_fields.DiscountResourceFields( + resource_id = 56, + discount_percent = 1.337, ) + ] + ) + else: + return GetAllDiscountsFields( + ) + """ + + def testGetAllDiscountsFields(self): + """Test GetAllDiscountsFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_api_key_response_model.py b/test/test_get_api_key_response_model.py new file mode 100644 index 0000000..83ecb2a --- /dev/null +++ b/test/test_get_api_key_response_model.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_api_key_response_model import GetApiKeyResponseModel + +class TestGetApiKeyResponseModel(unittest.TestCase): + """GetApiKeyResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetApiKeyResponseModel: + """Test GetApiKeyResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetApiKeyResponseModel` + """ + model = GetApiKeyResponseModel() + if include_optional: + return GetApiKeyResponseModel( + status = True, + message = '', + api_key = hyperstack.models.api_key_fields.ApiKeyFields( + key = '', ) + ) + else: + return GetApiKeyResponseModel( + ) + """ + + def testGetApiKeyResponseModel(self): + """Test GetApiKeyResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_contract_detail_response_model.py b/test/test_get_contract_detail_response_model.py new file mode 100644 index 0000000..7f98e6d --- /dev/null +++ b/test/test_get_contract_detail_response_model.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_contract_detail_response_model import GetContractDetailResponseModel + +class TestGetContractDetailResponseModel(unittest.TestCase): + """GetContractDetailResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetContractDetailResponseModel: + """Test GetContractDetailResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetContractDetailResponseModel` + """ + model = GetContractDetailResponseModel() + if include_optional: + return GetContractDetailResponseModel( + status = True, + message = '', + contract = hyperstack.models.admin_get_contract_detail_fields.AdminGetContractDetailFields( + id = 56, + org_id = 56, + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + discount_plans = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ] + ) + else: + return GetContractDetailResponseModel( + ) + """ + + def testGetContractDetailResponseModel(self): + """Test GetContractDetailResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_contract_events_response_model.py b/test/test_get_contract_events_response_model.py new file mode 100644 index 0000000..587f158 --- /dev/null +++ b/test/test_get_contract_events_response_model.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_contract_events_response_model import GetContractEventsResponseModel + +class TestGetContractEventsResponseModel(unittest.TestCase): + """GetContractEventsResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetContractEventsResponseModel: + """Test GetContractEventsResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetContractEventsResponseModel` + """ + model = GetContractEventsResponseModel() + if include_optional: + return GetContractEventsResponseModel( + status = True, + message = '', + contract_events = [ + hyperstack.models.admin_contract_event_fields.AdminContractEventFields( + id = 56, + user_id = 56, + org_id = 56, + time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + type = '', + reason = '', + message = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + count = 56 + ) + else: + return GetContractEventsResponseModel( + ) + """ + + def testGetContractEventsResponseModel(self): + """Test GetContractEventsResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_contracts_list_response_model.py b/test/test_get_contracts_list_response_model.py new file mode 100644 index 0000000..837613a --- /dev/null +++ b/test/test_get_contracts_list_response_model.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_contracts_list_response_model import GetContractsListResponseModel + +class TestGetContractsListResponseModel(unittest.TestCase): + """GetContractsListResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetContractsListResponseModel: + """Test GetContractsListResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetContractsListResponseModel` + """ + model = GetContractsListResponseModel() + if include_optional: + return GetContractsListResponseModel( + status = True, + message = '', + contracts = [ + hyperstack.models.admin_contract_fields.AdminContractFields( + id = 56, + org_name = '', + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + status = '', + gpu_name = '', + percent = 1.337, + amount = 1.337, + discount_type = '', + resource_count = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + count = 56 + ) + else: + return GetContractsListResponseModel( + ) + """ + + def testGetContractsListResponseModel(self): + """Test GetContractsListResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_customer_contracts_list_response_model.py b/test/test_get_customer_contracts_list_response_model.py new file mode 100644 index 0000000..5849766 --- /dev/null +++ b/test/test_get_customer_contracts_list_response_model.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_customer_contracts_list_response_model import GetCustomerContractsListResponseModel + +class TestGetCustomerContractsListResponseModel(unittest.TestCase): + """GetCustomerContractsListResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetCustomerContractsListResponseModel: + """Test GetCustomerContractsListResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetCustomerContractsListResponseModel` + """ + model = GetCustomerContractsListResponseModel() + if include_optional: + return GetCustomerContractsListResponseModel( + status = True, + message = '', + contracts = [ + hyperstack.models.customer_contract_fields.CustomerContractFields( + id = 56, + org_id = 56, + description = '', + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56, + status = '', + discounts = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + count = 56 + ) + else: + return GetCustomerContractsListResponseModel( + ) + """ + + def testGetCustomerContractsListResponseModel(self): + """Test GetCustomerContractsListResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_discount_detail_response.py b/test/test_get_discount_detail_response.py new file mode 100644 index 0000000..a022e24 --- /dev/null +++ b/test/test_get_discount_detail_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_discount_detail_response import GetDiscountDetailResponse + +class TestGetDiscountDetailResponse(unittest.TestCase): + """GetDiscountDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetDiscountDetailResponse: + """Test GetDiscountDetailResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetDiscountDetailResponse` + """ + model = GetDiscountDetailResponse() + if include_optional: + return GetDiscountDetailResponse( + status = True, + message = '', + discounts_entity = hyperstack.models.discount_entity_model.DiscountEntityModel( + entity = '', + data = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ], ) + ) + else: + return GetDiscountDetailResponse( + ) + """ + + def testGetDiscountDetailResponse(self): + """Test GetDiscountDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_discount_detail_response.py b/test/test_get_discount_response.py similarity index 51% rename from test/test_discount_detail_response.py rename to test/test_get_discount_response.py index 4c561d6..168e908 100644 --- a/test/test_discount_detail_response.py +++ b/test/test_get_discount_response.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.discount_detail_response import DiscountDetailResponse +from hyperstack.models.get_discount_response import GetDiscountResponse -class TestDiscountDetailResponse(unittest.TestCase): - """DiscountDetailResponse unit test stubs""" +class TestGetDiscountResponse(unittest.TestCase): + """GetDiscountResponse unit test stubs""" def setUp(self): pass @@ -25,39 +25,36 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> DiscountDetailResponse: - """Test DiscountDetailResponse + def make_instance(self, include_optional) -> GetDiscountResponse: + """Test GetDiscountResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `DiscountDetailResponse` + # uncomment below to create an instance of `GetDiscountResponse` """ - model = DiscountDetailResponse() + model = GetDiscountResponse() if include_optional: - return DiscountDetailResponse( + return GetDiscountResponse( status = True, message = '', - discount_plan = [ - hyperstack.models.insert_discount_plan_fields.InsertDiscountPlanFields( + discount_entites = [ + hyperstack.models.discount_fields.DiscountFields( org_id = 56, org_name = '', - discount_resources = [ - hyperstack.models.discount_resource_fields.DiscountResourceFields( - resource_id = 56, - discount_percent = 1.337, ) - ], - start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + plan_type = '', + vm_id = 56, + vm_name = '', end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), discount_status = '', ) ] ) else: - return DiscountDetailResponse( + return GetDiscountResponse( ) """ - def testDiscountDetailResponse(self): - """Test DiscountDetailResponse""" + def testGetDiscountResponse(self): + """Test GetDiscountResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_get_entity_discount_detail_response.py b/test/test_get_entity_discount_detail_response.py new file mode 100644 index 0000000..d07feea --- /dev/null +++ b/test/test_get_entity_discount_detail_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.get_entity_discount_detail_response import GetEntityDiscountDetailResponse + +class TestGetEntityDiscountDetailResponse(unittest.TestCase): + """GetEntityDiscountDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GetEntityDiscountDetailResponse: + """Test GetEntityDiscountDetailResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GetEntityDiscountDetailResponse` + """ + model = GetEntityDiscountDetailResponse() + if include_optional: + return GetEntityDiscountDetailResponse( + status = True, + message = '', + organization = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ], + virtual_machine = [ + hyperstack.models.discount_plan_fields.DiscountPlanFields( + id = 56, + resource_id = 56, + resource_name = '', + resource_count = 56, + discount_type = '', + discount_code = '', + discount_percent = 1.337, + discount_amount = 1.337, + discount_status = '', ) + ] + ) + else: + return GetEntityDiscountDetailResponse( + ) + """ + + def testGetEntityDiscountDetailResponse(self): + """Test GetEntityDiscountDetailResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_invites.py b/test/test_get_invites_response_model.py similarity index 68% rename from test/test_invites.py rename to test/test_get_invites_response_model.py index 417ac9b..869e24b 100644 --- a/test/test_invites.py +++ b/test/test_get_invites_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.invites import Invites +from hyperstack.models.get_invites_response_model import GetInvitesResponseModel -class TestInvites(unittest.TestCase): - """Invites unit test stubs""" +class TestGetInvitesResponseModel(unittest.TestCase): + """GetInvitesResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Invites: - """Test Invites + def make_instance(self, include_optional) -> GetInvitesResponseModel: + """Test GetInvitesResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Invites` + # uncomment below to create an instance of `GetInvitesResponseModel` """ - model = Invites() + model = GetInvitesResponseModel() if include_optional: - return Invites( + return GetInvitesResponseModel( status = True, message = '', invites = [ @@ -46,12 +46,12 @@ def make_instance(self, include_optional) -> Invites: ] ) else: - return Invites( + return GetInvitesResponseModel( ) """ - def testInvites(self): - """Test Invites""" + def testGetInvitesResponseModel(self): + """Test GetInvitesResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_organization_model.py b/test/test_get_organization_response_model.py similarity index 56% rename from test/test_organization_model.py rename to test/test_get_organization_response_model.py index 64e33bc..e08cd4f 100644 --- a/test/test_organization_model.py +++ b/test/test_get_organization_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organization_model import OrganizationModel +from hyperstack.models.get_organization_response_model import GetOrganizationResponseModel -class TestOrganizationModel(unittest.TestCase): - """OrganizationModel unit test stubs""" +class TestGetOrganizationResponseModel(unittest.TestCase): + """GetOrganizationResponseModel unit test stubs""" def setUp(self): pass @@ -25,23 +25,29 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationModel: - """Test OrganizationModel + def make_instance(self, include_optional) -> GetOrganizationResponseModel: + """Test GetOrganizationResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationModel` + # uncomment below to create an instance of `GetOrganizationResponseModel` """ - model = OrganizationModel() + model = GetOrganizationResponseModel() if include_optional: - return OrganizationModel( + return GetOrganizationResponseModel( status = True, message = '', - organization = hyperstack.models.organization_info_model.OrganizationInfoModel( + organization = hyperstack.models.organization_fields.OrganizationFields( id = 56, name = '', + credit = 56, + threshold = 56, + total_instances = 56, + total_volumes = 56, + total_containers = 56, + total_clusters = 56, users = [ - hyperstack.models.organization_user_model.OrganizationUserModel( + hyperstack.models.organization_user_response_model.OrganizationUserResponseModel( id = 56, sub = '', email = '', @@ -49,20 +55,21 @@ def make_instance(self, include_optional) -> OrganizationModel: name = '', role = '', rbac_roles = [ - hyperstack.models.rbac_role_fieldfor_organization.RBACRoleFieldforOrganization( + hyperstack.models.rbac_role_field.RbacRoleField( name = '', ) ], - joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ) else: - return OrganizationModel( + return GetOrganizationResponseModel( ) """ - def testOrganizationModel(self): - """Test OrganizationModel""" + def testGetOrganizationResponseModel(self): + """Test GetOrganizationResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_permissions.py b/test/test_get_permissions_response_model.py similarity index 68% rename from test/test_permissions.py rename to test/test_get_permissions_response_model.py index fb6911d..dceb267 100644 --- a/test/test_permissions.py +++ b/test/test_get_permissions_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.permissions import Permissions +from hyperstack.models.get_permissions_response_model import GetPermissionsResponseModel -class TestPermissions(unittest.TestCase): - """Permissions unit test stubs""" +class TestGetPermissionsResponseModel(unittest.TestCase): + """GetPermissionsResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Permissions: - """Test Permissions + def make_instance(self, include_optional) -> GetPermissionsResponseModel: + """Test GetPermissionsResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Permissions` + # uncomment below to create an instance of `GetPermissionsResponseModel` """ - model = Permissions() + model = GetPermissionsResponseModel() if include_optional: - return Permissions( + return GetPermissionsResponseModel( status = True, message = '', permissions = [ @@ -48,12 +48,12 @@ def make_instance(self, include_optional) -> Permissions: ] ) else: - return Permissions( + return GetPermissionsResponseModel( ) """ - def testPermissions(self): - """Test Permissions""" + def testGetPermissionsResponseModel(self): + """Test GetPermissionsResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_policies.py b/test/test_get_policies_response_model.py similarity index 72% rename from test/test_policies.py rename to test/test_get_policies_response_model.py index fff7997..d688220 100644 --- a/test/test_policies.py +++ b/test/test_get_policies_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.policies import Policies +from hyperstack.models.get_policies_response_model import GetPoliciesResponseModel -class TestPolicies(unittest.TestCase): - """Policies unit test stubs""" +class TestGetPoliciesResponseModel(unittest.TestCase): + """GetPoliciesResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Policies: - """Test Policies + def make_instance(self, include_optional) -> GetPoliciesResponseModel: + """Test GetPoliciesResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Policies` + # uncomment below to create an instance of `GetPoliciesResponseModel` """ - model = Policies() + model = GetPoliciesResponseModel() if include_optional: - return Policies( + return GetPoliciesResponseModel( status = True, message = '', policies = [ @@ -52,12 +52,12 @@ def make_instance(self, include_optional) -> Policies: ] ) else: - return Policies( + return GetPoliciesResponseModel( ) """ - def testPolicies(self): - """Test Policies""" + def testGetPoliciesResponseModel(self): + """Test GetPoliciesResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_rbac_roles.py b/test/test_get_rbac_roles_response_model.py similarity index 72% rename from test/test_rbac_roles.py rename to test/test_get_rbac_roles_response_model.py index 7af564d..251ccc0 100644 --- a/test/test_rbac_roles.py +++ b/test/test_get_rbac_roles_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.rbac_roles import RBACRoles +from hyperstack.models.get_rbac_roles_response_model import GetRbacRolesResponseModel -class TestRBACRoles(unittest.TestCase): - """RBACRoles unit test stubs""" +class TestGetRbacRolesResponseModel(unittest.TestCase): + """GetRbacRolesResponseModel unit test stubs""" def setUp(self): pass @@ -25,20 +25,20 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RBACRoles: - """Test RBACRoles + def make_instance(self, include_optional) -> GetRbacRolesResponseModel: + """Test GetRbacRolesResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RBACRoles` + # uncomment below to create an instance of `GetRbacRolesResponseModel` """ - model = RBACRoles() + model = GetRbacRolesResponseModel() if include_optional: - return RBACRoles( + return GetRbacRolesResponseModel( status = True, message = '', roles = [ - hyperstack.models.rbac_role_fields.RBACRoleFields( + hyperstack.models.rbac_role_fields.RbacRoleFields( id = 56, name = '', description = '', @@ -58,12 +58,12 @@ def make_instance(self, include_optional) -> RBACRoles: ] ) else: - return RBACRoles( + return GetRbacRolesResponseModel( ) """ - def testRBACRoles(self): - """Test RBACRoles""" + def testGetRbacRolesResponseModel(self): + """Test GetRbacRolesResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_get_token.py b/test/test_get_token_payload.py similarity index 67% rename from test/test_get_token.py rename to test/test_get_token_payload.py index e0bf9a8..8f7a50d 100644 --- a/test/test_get_token.py +++ b/test/test_get_token_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.get_token import GetToken +from hyperstack.models.get_token_payload import GetTokenPayload -class TestGetToken(unittest.TestCase): - """GetToken unit test stubs""" +class TestGetTokenPayload(unittest.TestCase): + """GetTokenPayload unit test stubs""" def setUp(self): pass @@ -25,28 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> GetToken: - """Test GetToken + def make_instance(self, include_optional) -> GetTokenPayload: + """Test GetTokenPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `GetToken` + # uncomment below to create an instance of `GetTokenPayload` """ - model = GetToken() + model = GetTokenPayload() if include_optional: - return GetToken( + return GetTokenPayload( session_id = '', callback_code = '' ) else: - return GetToken( + return GetTokenPayload( session_id = '', callback_code = '', ) """ - def testGetToken(self): - """Test GetToken""" + def testGetTokenPayload(self): + """Test GetTokenPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_permissionsfor_user_permission.py b/test/test_get_user_permissions_response_model.py similarity index 58% rename from test/test_permissionsfor_user_permission.py rename to test/test_get_user_permissions_response_model.py index 5cfa207..ad99537 100644 --- a/test/test_permissionsfor_user_permission.py +++ b/test/test_get_user_permissions_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.permissionsfor_user_permission import PermissionsforUserPermission +from hyperstack.models.get_user_permissions_response_model import GetUserPermissionsResponseModel -class TestPermissionsforUserPermission(unittest.TestCase): - """PermissionsforUserPermission unit test stubs""" +class TestGetUserPermissionsResponseModel(unittest.TestCase): + """GetUserPermissionsResponseModel unit test stubs""" def setUp(self): pass @@ -25,32 +25,32 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PermissionsforUserPermission: - """Test PermissionsforUserPermission + def make_instance(self, include_optional) -> GetUserPermissionsResponseModel: + """Test GetUserPermissionsResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `PermissionsforUserPermission` + # uncomment below to create an instance of `GetUserPermissionsResponseModel` """ - model = PermissionsforUserPermission() + model = GetUserPermissionsResponseModel() if include_optional: - return PermissionsforUserPermission( + return GetUserPermissionsResponseModel( status = True, message = '', permissions = [ - hyperstack.models.permission_fieldsfor_user_permission.PermissionFieldsforUserPermission( + hyperstack.models.user_permission_fields.UserPermissionFields( id = 56, resource = '', permission = '', ) ] ) else: - return PermissionsforUserPermission( + return GetUserPermissionsResponseModel( ) """ - def testPermissionsforUserPermission(self): - """Test PermissionsforUserPermission""" + def testGetUserPermissionsResponseModel(self): + """Test GetUserPermissionsResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_api_keygeneration.py b/test/test_get_version_response.py similarity index 62% rename from test/test_api_keygeneration.py rename to test/test_get_version_response.py index 0c9d101..d041db9 100644 --- a/test/test_api_keygeneration.py +++ b/test/test_get_version_response.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.api_keygeneration import APIKeygeneration +from hyperstack.models.get_version_response import GetVersionResponse -class TestAPIKeygeneration(unittest.TestCase): - """APIKeygeneration unit test stubs""" +class TestGetVersionResponse(unittest.TestCase): + """GetVersionResponse unit test stubs""" def setUp(self): pass @@ -25,27 +25,27 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> APIKeygeneration: - """Test APIKeygeneration + def make_instance(self, include_optional) -> GetVersionResponse: + """Test GetVersionResponse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `APIKeygeneration` + # uncomment below to create an instance of `GetVersionResponse` """ - model = APIKeygeneration() + model = GetVersionResponse() if include_optional: - return APIKeygeneration( + return GetVersionResponse( status = True, message = '', - api_key = '' + version = '' ) else: - return APIKeygeneration( + return GetVersionResponse( ) """ - def testAPIKeygeneration(self): - """Test APIKeygeneration""" + def testGetVersionResponse(self): + """Test GetVersionResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_gpu_api.py b/test/test_gpu_api.py index ebe2495..7c22a43 100644 --- a/test/test_gpu_api.py +++ b/test/test_gpu_api.py @@ -26,10 +26,10 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_get_gpu_list(self) -> None: - """Test case for get_gpu_list + def test_list_gpus(self) -> None: + """Test case for list_gpus - Get GPU List + List GPUs """ pass diff --git a/test/test_image_api.py b/test/test_image_api.py index 9c0577e..05d01db 100644 --- a/test/test_image_api.py +++ b/test/test_image_api.py @@ -26,10 +26,10 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_retrieve_images(self) -> None: - """Test case for retrieve_images + def test_list_images(self) -> None: + """Test case for list_images - Retrieve Images + List images """ pass diff --git a/test/test_image_fields.py b/test/test_image_fields.py index 2290bc9..c1e5f92 100644 --- a/test/test_image_fields.py +++ b/test/test_image_fields.py @@ -41,7 +41,14 @@ def make_instance(self, include_optional) -> ImageFields: type = '', version = '', size = 56, - display_size = '' + display_size = '', + description = '', + labels = [ + hyperstack.models.lable_resonse.LableResonse( + id = 56, + label = '', ) + ], + is_public = True ) else: return ImageFields( diff --git a/test/test_image_get_response.py b/test/test_image_get_response.py index 2e54934..990ed23 100644 --- a/test/test_image_get_response.py +++ b/test/test_image_get_response.py @@ -46,7 +46,14 @@ def make_instance(self, include_optional) -> ImageGetResponse: type = '', version = '', size = 56, - display_size = '', ) + display_size = '', + description = '', + labels = [ + hyperstack.models.lable_resonse.LableResonse( + id = 56, + label = '', ) + ], + is_public = True, ) ] ) else: diff --git a/test/test_images.py b/test/test_images.py index ca5891a..694d9c8 100644 --- a/test/test_images.py +++ b/test/test_images.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> Images: return Images( status = True, message = '', - data = [ + images = [ hyperstack.models.image_get_response.ImageGetResponse( region_name = '', type = '', @@ -50,7 +50,14 @@ def make_instance(self, include_optional) -> Images: type = '', version = '', size = 56, - display_size = '', ) + display_size = '', + description = '', + labels = [ + hyperstack.models.lable_resonse.LableResonse( + id = 56, + label = '', ) + ], + is_public = True, ) ], ) ] ) diff --git a/test/test_insert_discount_plan_fields.py b/test/test_insert_discount_plan_fields.py index b5b0cb0..c1f2858 100644 --- a/test/test_insert_discount_plan_fields.py +++ b/test/test_insert_discount_plan_fields.py @@ -35,8 +35,11 @@ def make_instance(self, include_optional) -> InsertDiscountPlanFields: model = InsertDiscountPlanFields() if include_optional: return InsertDiscountPlanFields( - org_id = 56, - org_name = '', + customers = [ + hyperstack.models.customer_fields.CustomerFields( + id = 56, + plan_type = '', ) + ], discount_resources = [ hyperstack.models.discount_resource_fields.DiscountResourceFields( resource_id = 56, diff --git a/test/test_instance.py b/test/test_instance.py index 9ebbb8b..b17c9da 100644 --- a/test/test_instance.py +++ b/test/test_instance.py @@ -37,11 +37,12 @@ def make_instance(self, include_optional) -> Instance: return Instance( status = True, message = '', - instance = hyperstack.models.instance_admin_fields.InstanceAdminFields( + instance = hyperstack.models.instance_fields.InstanceFields( id = 56, name = '', status = '', environment = hyperstack.models.instance_environment_fields.InstanceEnvironmentFields( + id = 56, name = '', org_id = 56, region = '', ), @@ -53,8 +54,10 @@ def make_instance(self, include_optional) -> Instance: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56, ), + os = '', keypair = hyperstack.models.instance_keypair_fields.InstanceKeypairFields( name = '', ), volume_attachments = [ @@ -86,8 +89,12 @@ def make_instance(self, include_optional) -> Instance: fixed_ip = '', floating_ip = '', floating_ip_status = '', + locked = True, + contract_id = 56, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - openstack_id = '', ) + labels = [ + '' + ], ) ) else: return Instance( diff --git a/test/test_instance_admin.py b/test/test_instance_admin.py new file mode 100644 index 0000000..740132e --- /dev/null +++ b/test/test_instance_admin.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.instance_admin import InstanceAdmin + +class TestInstanceAdmin(unittest.TestCase): + """InstanceAdmin unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceAdmin: + """Test InstanceAdmin + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceAdmin` + """ + model = InstanceAdmin() + if include_optional: + return InstanceAdmin( + status = True, + message = '', + instance = hyperstack.models.instance_admin_fields.InstanceAdminFields( + id = 56, + name = '', + status = '', + environment = hyperstack.models.instance_environment_fields.InstanceEnvironmentFields( + id = 56, + name = '', + org_id = 56, + region = '', ), + image = hyperstack.models.instance_image_fields.InstanceImageFields( + name = '', ), + flavor = hyperstack.models.instance_flavor_fields.InstanceFlavorFields( + id = 56, + name = '', + cpu = 56, + ram = 1.337, + disk = 56, + ephemeral = 56, + gpu = '', + gpu_count = 56, ), + os = '', + keypair = hyperstack.models.instance_keypair_fields.InstanceKeypairFields( + name = '', ), + volume_attachments = [ + hyperstack.models.volume_attachment_fields.VolumeAttachmentFields( + volume = hyperstack.models.volume_fieldsfor_instance.VolumeFieldsforInstance( + id = 56, + name = '', + description = '', + volume_type = '', + size = 56, ), + status = '', + device = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + security_rules = [ + hyperstack.models.security_rules_fieldsfor_instance.SecurityRulesFieldsforInstance( + id = 56, + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + power_state = '', + vm_state = '', + fixed_ip = '', + floating_ip = '', + floating_ip_status = '', + locked = True, + contract_id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + labels = [ + '' + ], + openstack_id = '', + host = '', ) + ) + else: + return InstanceAdmin( + ) + """ + + def testInstanceAdmin(self): + """Test InstanceAdmin""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_admin_fields.py b/test/test_instance_admin_fields.py index 3125fd8..c64dbc0 100644 --- a/test/test_instance_admin_fields.py +++ b/test/test_instance_admin_fields.py @@ -39,6 +39,7 @@ def make_instance(self, include_optional) -> InstanceAdminFields: name = '', status = '', environment = hyperstack.models.instance_environment_fields.InstanceEnvironmentFields( + id = 56, name = '', org_id = 56, region = '', ), @@ -50,8 +51,10 @@ def make_instance(self, include_optional) -> InstanceAdminFields: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56, ), + os = '', keypair = hyperstack.models.instance_keypair_fields.InstanceKeypairFields( name = '', ), volume_attachments = [ @@ -83,8 +86,14 @@ def make_instance(self, include_optional) -> InstanceAdminFields: fixed_ip = '', floating_ip = '', floating_ip_status = '', + locked = True, + contract_id = 56, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - openstack_id = '' + labels = [ + '' + ], + openstack_id = '', + host = '' ) else: return InstanceAdminFields( diff --git a/test/test_instance_environment_fields.py b/test/test_instance_environment_fields.py index e61c3f2..d0a22c0 100644 --- a/test/test_instance_environment_fields.py +++ b/test/test_instance_environment_fields.py @@ -35,6 +35,7 @@ def make_instance(self, include_optional) -> InstanceEnvironmentFields: model = InstanceEnvironmentFields() if include_optional: return InstanceEnvironmentFields( + id = 56, name = '', org_id = 56, region = '' diff --git a/test/test_instance_fields.py b/test/test_instance_fields.py new file mode 100644 index 0000000..6ff2b25 --- /dev/null +++ b/test/test_instance_fields.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.instance_fields import InstanceFields + +class TestInstanceFields(unittest.TestCase): + """InstanceFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstanceFields: + """Test InstanceFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstanceFields` + """ + model = InstanceFields() + if include_optional: + return InstanceFields( + id = 56, + name = '', + status = '', + environment = hyperstack.models.instance_environment_fields.InstanceEnvironmentFields( + id = 56, + name = '', + org_id = 56, + region = '', ), + image = hyperstack.models.instance_image_fields.InstanceImageFields( + name = '', ), + flavor = hyperstack.models.instance_flavor_fields.InstanceFlavorFields( + id = 56, + name = '', + cpu = 56, + ram = 1.337, + disk = 56, + ephemeral = 56, + gpu = '', + gpu_count = 56, ), + os = '', + keypair = hyperstack.models.instance_keypair_fields.InstanceKeypairFields( + name = '', ), + volume_attachments = [ + hyperstack.models.volume_attachment_fields.VolumeAttachmentFields( + volume = hyperstack.models.volume_fieldsfor_instance.VolumeFieldsforInstance( + id = 56, + name = '', + description = '', + volume_type = '', + size = 56, ), + status = '', + device = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + security_rules = [ + hyperstack.models.security_rules_fieldsfor_instance.SecurityRulesFieldsforInstance( + id = 56, + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + power_state = '', + vm_state = '', + fixed_ip = '', + floating_ip = '', + floating_ip_status = '', + locked = True, + contract_id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + labels = [ + '' + ] + ) + else: + return InstanceFields( + ) + """ + + def testInstanceFields(self): + """Test InstanceFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_flavor_fields.py b/test/test_instance_flavor_fields.py index a8bc69c..8b8be72 100644 --- a/test/test_instance_flavor_fields.py +++ b/test/test_instance_flavor_fields.py @@ -40,6 +40,7 @@ def make_instance(self, include_optional) -> InstanceFlavorFields: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56 ) diff --git a/test/test_instances.py b/test/test_instances.py index 897515e..fefc03b 100644 --- a/test/test_instances.py +++ b/test/test_instances.py @@ -38,11 +38,12 @@ def make_instance(self, include_optional) -> Instances: status = True, message = '', instances = [ - hyperstack.models.instance_admin_fields.InstanceAdminFields( + hyperstack.models.instance_fields.InstanceFields( id = 56, name = '', status = '', environment = hyperstack.models.instance_environment_fields.InstanceEnvironmentFields( + id = 56, name = '', org_id = 56, region = '', ), @@ -54,8 +55,10 @@ def make_instance(self, include_optional) -> Instances: cpu = 56, ram = 1.337, disk = 56, + ephemeral = 56, gpu = '', gpu_count = 56, ), + os = '', keypair = hyperstack.models.instance_keypair_fields.InstanceKeypairFields( name = '', ), volume_attachments = [ @@ -87,10 +90,13 @@ def make_instance(self, include_optional) -> Instances: fixed_ip = '', floating_ip = '', floating_ip_status = '', + locked = True, + contract_id = 56, created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - openstack_id = '', ) - ], - instance_count = 56 + labels = [ + '' + ], ) + ] ) else: return Instances( diff --git a/test/test_instances_admin.py b/test/test_instances_admin.py new file mode 100644 index 0000000..05642b8 --- /dev/null +++ b/test/test_instances_admin.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.instances_admin import InstancesAdmin + +class TestInstancesAdmin(unittest.TestCase): + """InstancesAdmin unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstancesAdmin: + """Test InstancesAdmin + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstancesAdmin` + """ + model = InstancesAdmin() + if include_optional: + return InstancesAdmin( + status = True, + message = '', + instances = [ + hyperstack.models.instance_admin_fields.InstanceAdminFields( + id = 56, + name = '', + status = '', + environment = hyperstack.models.instance_environment_fields.InstanceEnvironmentFields( + id = 56, + name = '', + org_id = 56, + region = '', ), + image = hyperstack.models.instance_image_fields.InstanceImageFields( + name = '', ), + flavor = hyperstack.models.instance_flavor_fields.InstanceFlavorFields( + id = 56, + name = '', + cpu = 56, + ram = 1.337, + disk = 56, + ephemeral = 56, + gpu = '', + gpu_count = 56, ), + os = '', + keypair = hyperstack.models.instance_keypair_fields.InstanceKeypairFields( + name = '', ), + volume_attachments = [ + hyperstack.models.volume_attachment_fields.VolumeAttachmentFields( + volume = hyperstack.models.volume_fieldsfor_instance.VolumeFieldsforInstance( + id = 56, + name = '', + description = '', + volume_type = '', + size = 56, ), + status = '', + device = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + security_rules = [ + hyperstack.models.security_rules_fieldsfor_instance.SecurityRulesFieldsforInstance( + id = 56, + direction = '', + protocol = '', + port_range_min = 56, + port_range_max = 56, + ethertype = '', + remote_ip_prefix = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + power_state = '', + vm_state = '', + fixed_ip = '', + floating_ip = '', + floating_ip_status = '', + locked = True, + contract_id = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + labels = [ + '' + ], + openstack_id = '', + host = '', ) + ], + instance_count = 56 + ) + else: + return InstancesAdmin( + ) + """ + + def testInstancesAdmin(self): + """Test InstancesAdmin""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instances_summary_admin.py b/test/test_instances_summary_admin.py new file mode 100644 index 0000000..4268cdd --- /dev/null +++ b/test/test_instances_summary_admin.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.instances_summary_admin import InstancesSummaryAdmin + +class TestInstancesSummaryAdmin(unittest.TestCase): + """InstancesSummaryAdmin unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InstancesSummaryAdmin: + """Test InstancesSummaryAdmin + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InstancesSummaryAdmin` + """ + model = InstancesSummaryAdmin() + if include_optional: + return InstancesSummaryAdmin( + status = True, + message = '', + instances = [ + hyperstack.models.instances_summary_fields.InstancesSummaryFields( + id = 56, + name = '', + environment = '', + org_id = 56, + environment_id = 56, + image = '', + image_id = 56, + flavor = '', + flavor_id = 56, + keypair = '', + keypair_id = 56, + fixed_ip = '', + floating_ip = '', + floating_ip_status = '', + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else: + return InstancesSummaryAdmin( + ) + """ + + def testInstancesSummaryAdmin(self): + """Test InstancesSummaryAdmin""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_instance_resources.py b/test/test_instances_summary_fields.py similarity index 56% rename from test/test_instance_resources.py rename to test/test_instances_summary_fields.py index ce9521c..5553ae4 100644 --- a/test/test_instance_resources.py +++ b/test/test_instances_summary_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.instance_resources import InstanceResources +from hyperstack.models.instances_summary_fields import InstancesSummaryFields -class TestInstanceResources(unittest.TestCase): - """InstanceResources unit test stubs""" +class TestInstancesSummaryFields(unittest.TestCase): + """InstancesSummaryFields unit test stubs""" def setUp(self): pass @@ -25,43 +25,41 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> InstanceResources: - """Test InstanceResources + def make_instance(self, include_optional) -> InstancesSummaryFields: + """Test InstancesSummaryFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `InstanceResources` + # uncomment below to create an instance of `InstancesSummaryFields` """ - model = InstanceResources() + model = InstancesSummaryFields() if include_optional: - return InstanceResources( + return InstancesSummaryFields( id = 56, name = '', - host = '', - status = '', - flavor = hyperstack.models.flavor_resource.FlavorResource( - id = 56, - name = '', - cpu = 56, - ram = 1.337, - disk = 56, - gpu = '', - gpu_count = 56, ), + environment = '', + org_id = 56, + environment_id = 56, + image = '', image_id = 56, - volume_id = 56, - keypair_name = '', + flavor = '', + flavor_id = 56, + keypair = '', + keypair_id = 56, fixed_ip = '', floating_ip = '', floating_ip_status = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + status = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return InstanceResources( + return InstancesSummaryFields( ) """ - def testInstanceResources(self): - """Test InstanceResources""" + def testInstancesSummaryFields(self): + """Test InstancesSummaryFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_removemember.py b/test/test_invite_user_payload.py similarity index 64% rename from test/test_removemember.py rename to test/test_invite_user_payload.py index a23c408..6c19404 100644 --- a/test/test_removemember.py +++ b/test/test_invite_user_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.removemember import Removemember +from hyperstack.models.invite_user_payload import InviteUserPayload -class TestRemovemember(unittest.TestCase): - """Removemember unit test stubs""" +class TestInviteUserPayload(unittest.TestCase): + """InviteUserPayload unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Removemember: - """Test Removemember + def make_instance(self, include_optional) -> InviteUserPayload: + """Test InviteUserPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Removemember` + # uncomment below to create an instance of `InviteUserPayload` """ - model = Removemember() + model = InviteUserPayload() if include_optional: - return Removemember( + return InviteUserPayload( email = '' ) else: - return Removemember( + return InviteUserPayload( email = '', ) """ - def testRemovemember(self): - """Test Removemember""" + def testInviteUserPayload(self): + """Test InviteUserPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_invite.py b/test/test_invite_user_response_model.py similarity index 67% rename from test/test_invite.py rename to test/test_invite_user_response_model.py index ab15755..efe502a 100644 --- a/test/test_invite.py +++ b/test/test_invite_user_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.invite import Invite +from hyperstack.models.invite_user_response_model import InviteUserResponseModel -class TestInvite(unittest.TestCase): - """Invite unit test stubs""" +class TestInviteUserResponseModel(unittest.TestCase): + """InviteUserResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Invite: - """Test Invite + def make_instance(self, include_optional) -> InviteUserResponseModel: + """Test InviteUserResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Invite` + # uncomment below to create an instance of `InviteUserResponseModel` """ - model = Invite() + model = InviteUserResponseModel() if include_optional: - return Invite( + return InviteUserResponseModel( status = True, message = '', invite = hyperstack.models.invite_fields.InviteFields( @@ -44,12 +44,12 @@ def make_instance(self, include_optional) -> Invite: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ) else: - return Invite( + return InviteUserResponseModel( ) """ - def testInvite(self): - """Test Invite""" + def testInviteUserResponseModel(self): + """Test InviteUserResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_keypair_api.py b/test/test_keypair_api.py index e0f4b69..4f945d3 100644 --- a/test/test_keypair_api.py +++ b/test/test_keypair_api.py @@ -26,31 +26,31 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_delete_keypair(self) -> None: - """Test case for delete_keypair + def test_delete_key_pair(self) -> None: + """Test case for delete_key_pair - Delete Keypair + Delete key pair """ pass - def test_import_keypair(self) -> None: - """Test case for import_keypair + def test_import_key_pair(self) -> None: + """Test case for import_key_pair - Import Keypair + Import key pair """ pass - def test_retrieve_user_keypairs(self) -> None: - """Test case for retrieve_user_keypairs + def test_list_key_pairs(self) -> None: + """Test case for list_key_pairs - Retrieve Keypairs + List key pairs """ pass - def test_update_keypair_name(self) -> None: - """Test case for update_keypair_name + def test_update_key_pair_name(self) -> None: + """Test case for update_key_pair_name - Update Keypair name + Update key pair name """ pass diff --git a/test/test_invite_user.py b/test/test_lable_resonse.py similarity index 63% rename from test/test_invite_user.py rename to test/test_lable_resonse.py index 65723a5..4b073a6 100644 --- a/test/test_invite_user.py +++ b/test/test_lable_resonse.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.invite_user import InviteUser +from hyperstack.models.lable_resonse import LableResonse -class TestInviteUser(unittest.TestCase): - """InviteUser unit test stubs""" +class TestLableResonse(unittest.TestCase): + """LableResonse unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> InviteUser: - """Test InviteUser + def make_instance(self, include_optional) -> LableResonse: + """Test LableResonse include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `InviteUser` + # uncomment below to create an instance of `LableResonse` """ - model = InviteUser() + model = LableResonse() if include_optional: - return InviteUser( - email = '' + return LableResonse( + id = 56, + label = '' ) else: - return InviteUser( - email = '', + return LableResonse( ) """ - def testInviteUser(self): - """Test InviteUser""" + def testLableResonse(self): + """Test LableResonse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_logout.py b/test/test_logout_payload.py similarity index 66% rename from test/test_logout.py rename to test/test_logout_payload.py index 5274515..29a43f7 100644 --- a/test/test_logout.py +++ b/test/test_logout_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.logout import Logout +from hyperstack.models.logout_payload import LogoutPayload -class TestLogout(unittest.TestCase): - """Logout unit test stubs""" +class TestLogoutPayload(unittest.TestCase): + """LogoutPayload unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Logout: - """Test Logout + def make_instance(self, include_optional) -> LogoutPayload: + """Test LogoutPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `Logout` + # uncomment below to create an instance of `LogoutPayload` """ - model = Logout() + model = LogoutPayload() if include_optional: - return Logout( + return LogoutPayload( refresh_token = '' ) else: - return Logout( + return LogoutPayload( refresh_token = '', ) """ - def testLogout(self): - """Test Logout""" + def testLogoutPayload(self): + """Test LogoutPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_metric_item_fields.py b/test/test_metric_item_fields.py new file mode 100644 index 0000000..0f840e5 --- /dev/null +++ b/test/test_metric_item_fields.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.metric_item_fields import MetricItemFields + +class TestMetricItemFields(unittest.TestCase): + """MetricItemFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MetricItemFields: + """Test MetricItemFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MetricItemFields` + """ + model = MetricItemFields() + if include_optional: + return MetricItemFields( + unit = '', + columns = ["time","granularity","value"], + data = [["2023-09-01T01:19:00+00:00",60,1041433070000000],["2023-09-01T01:24:00+00:00",60,1041441320000000]] + ) + else: + return MetricItemFields( + ) + """ + + def testMetricItemFields(self): + """Test MetricItemFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_metrics_fields.py b/test/test_metrics_fields.py new file mode 100644 index 0000000..56fcb7d --- /dev/null +++ b/test/test_metrics_fields.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.metrics_fields import MetricsFields + +class TestMetricsFields(unittest.TestCase): + """MetricsFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MetricsFields: + """Test MetricsFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MetricsFields` + """ + model = MetricsFields() + if include_optional: + return MetricsFields( + cpu = hyperstack.models.metric_item_fields.MetricItemFields( + unit = '', + columns = ["time","granularity","value"], + data = [["2023-09-01T01:19:00+00:00",60,1041433070000000],["2023-09-01T01:24:00+00:00",60,1041441320000000]], ), + memory_usages = hyperstack.models.metric_item_fields.MetricItemFields( + unit = '', + columns = ["time","granularity","value"], + data = [["2023-09-01T01:19:00+00:00",60,1041433070000000],["2023-09-01T01:24:00+00:00",60,1041441320000000]], ), + network_in = hyperstack.models.metric_item_fields.MetricItemFields( + unit = '', + columns = ["time","granularity","value"], + data = [["2023-09-01T01:19:00+00:00",60,1041433070000000],["2023-09-01T01:24:00+00:00",60,1041441320000000]], ), + network_out = hyperstack.models.metric_item_fields.MetricItemFields( + unit = '', + columns = ["time","granularity","value"], + data = [["2023-09-01T01:19:00+00:00",60,1041433070000000],["2023-09-01T01:24:00+00:00",60,1041441320000000]], ), + disk_read = hyperstack.models.metric_item_fields.MetricItemFields( + unit = '', + columns = ["time","granularity","value"], + data = [["2023-09-01T01:19:00+00:00",60,1041433070000000],["2023-09-01T01:24:00+00:00",60,1041441320000000]], ), + disk_write = hyperstack.models.metric_item_fields.MetricItemFields( + unit = '', + columns = ["time","granularity","value"], + data = [["2023-09-01T01:19:00+00:00",60,1041433070000000],["2023-09-01T01:24:00+00:00",60,1041441320000000]], ) + ) + else: + return MetricsFields( + ) + """ + + def testMetricsFields(self): + """Test MetricsFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_node_model.py b/test/test_node_model.py index 3405112..eadec74 100644 --- a/test/test_node_model.py +++ b/test/test_node_model.py @@ -41,12 +41,21 @@ def make_instance(self, include_optional) -> NodeModel: status = '', provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sunset_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavors = [ + '' + ], + projects = [ + '' + ], stocks = [ hyperstack.models.node_stocks_payload.NodeStocksPayload( name = '', type = '', total = 56, in_use = 56, ) + ], + organizations = [ + 56 ] ) else: diff --git a/test/test_node_payload_model.py b/test/test_node_payload_model.py index b31bbb1..43b2c45 100644 --- a/test/test_node_payload_model.py +++ b/test/test_node_payload_model.py @@ -44,6 +44,12 @@ def make_instance(self, include_optional) -> NodePayloadModel: status = '', provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sunset_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavors = [ + '' + ], + projects = [ + '' + ], stocks = [ hyperstack.models.node_stocks_payload.NodeStocksPayload( name = '', @@ -51,6 +57,9 @@ def make_instance(self, include_optional) -> NodePayloadModel: total = 56, in_use = 56, ) ], + organizations = [ + 56 + ], power_usages = hyperstack.models.power_usage_model.PowerUsageModel( value = 1.337, unit = '', ), ) diff --git a/test/test_node_power_usage_model.py b/test/test_node_power_usage_model.py index 98050be..d5a6b00 100644 --- a/test/test_node_power_usage_model.py +++ b/test/test_node_power_usage_model.py @@ -41,6 +41,12 @@ def make_instance(self, include_optional) -> NodePowerUsageModel: status = '', provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sunset_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavors = [ + '' + ], + projects = [ + '' + ], stocks = [ hyperstack.models.node_stocks_payload.NodeStocksPayload( name = '', @@ -48,6 +54,9 @@ def make_instance(self, include_optional) -> NodePowerUsageModel: total = 56, in_use = 56, ) ], + organizations = [ + 56 + ], power_usages = hyperstack.models.power_usage_model.PowerUsageModel( value = 1.337, unit = '', ) diff --git a/test/test_node_response_model.py b/test/test_node_response_model.py index 4b4e87e..eef0c50 100644 --- a/test/test_node_response_model.py +++ b/test/test_node_response_model.py @@ -44,12 +44,21 @@ def make_instance(self, include_optional) -> NodeResponseModel: status = '', provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sunset_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavors = [ + '' + ], + projects = [ + '' + ], stocks = [ hyperstack.models.node_stocks_payload.NodeStocksPayload( name = '', type = '', total = 56, in_use = 56, ) + ], + organizations = [ + 56 ], ) ] ) diff --git a/test/test_node_stock_payload_model.py b/test/test_node_stock_payload_model.py index 1f2cdc4..f38ac8a 100644 --- a/test/test_node_stock_payload_model.py +++ b/test/test_node_stock_payload_model.py @@ -46,6 +46,12 @@ def make_instance(self, include_optional) -> NodeStockPayloadModel: status = '', provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sunset_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavors = [ + '' + ], + projects = [ + '' + ], stocks = [ hyperstack.models.node_stocks_payload.NodeStocksPayload( name = '', @@ -53,6 +59,9 @@ def make_instance(self, include_optional) -> NodeStockPayloadModel: total = 56, in_use = 56, ) ], + organizations = [ + 56 + ], power_usages = hyperstack.models.power_usage_model.PowerUsageModel( value = 1.337, unit = '', ), ) diff --git a/test/test_node_stock_response_model.py b/test/test_node_stock_response_model.py index ce9d0b0..aa0e314 100644 --- a/test/test_node_stock_response_model.py +++ b/test/test_node_stock_response_model.py @@ -46,12 +46,21 @@ def make_instance(self, include_optional) -> NodeStockResponseModel: status = '', provision_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sunset_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + flavors = [ + '' + ], + projects = [ + '' + ], stocks = [ hyperstack.models.node_stocks_payload.NodeStocksPayload( name = '', type = '', total = 56, in_use = 56, ) + ], + organizations = [ + 56 ], ) ], ) ] diff --git a/test/test_organization_api.py b/test/test_organization_api.py index 00f5882..1f2bec7 100644 --- a/test/test_organization_api.py +++ b/test/test_organization_api.py @@ -40,6 +40,13 @@ def test_remove_a_member_from_organization(self) -> None: """ pass + def test_update_organization_info(self) -> None: + """Test case for update_organization_info + + Update organization info + """ + pass + if __name__ == '__main__': unittest.main() diff --git a/test/test_organization_info_model.py b/test/test_organization_fields.py similarity index 60% rename from test/test_organization_info_model.py rename to test/test_organization_fields.py index 51e51bc..ebe4440 100644 --- a/test/test_organization_info_model.py +++ b/test/test_organization_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organization_info_model import OrganizationInfoModel +from hyperstack.models.organization_fields import OrganizationFields -class TestOrganizationInfoModel(unittest.TestCase): - """OrganizationInfoModel unit test stubs""" +class TestOrganizationFields(unittest.TestCase): + """OrganizationFields unit test stubs""" def setUp(self): pass @@ -25,20 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationInfoModel: - """Test OrganizationInfoModel + def make_instance(self, include_optional) -> OrganizationFields: + """Test OrganizationFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationInfoModel` + # uncomment below to create an instance of `OrganizationFields` """ - model = OrganizationInfoModel() + model = OrganizationFields() if include_optional: - return OrganizationInfoModel( + return OrganizationFields( id = 56, name = '', + credit = 56, + threshold = 56, + total_instances = 56, + total_volumes = 56, + total_containers = 56, + total_clusters = 56, users = [ - hyperstack.models.organization_user_model.OrganizationUserModel( + hyperstack.models.organization_user_response_model.OrganizationUserResponseModel( id = 56, sub = '', email = '', @@ -46,22 +52,23 @@ def make_instance(self, include_optional) -> OrganizationInfoModel: name = '', role = '', rbac_roles = [ - hyperstack.models.rbac_role_fieldfor_organization.RBACRoleFieldforOrganization( + hyperstack.models.rbac_role_field.RbacRoleField( name = '', ) ], - joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ], created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return OrganizationInfoModel( + return OrganizationFields( id = 56, name = '', ) """ - def testOrganizationInfoModel(self): - """Test OrganizationInfoModel""" + def testOrganizationFields(self): + """Test OrganizationFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_organization_user_model.py b/test/test_organization_user_response_model.py similarity index 63% rename from test/test_organization_user_model.py rename to test/test_organization_user_response_model.py index 8ccda67..041e54f 100644 --- a/test/test_organization_user_model.py +++ b/test/test_organization_user_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.organization_user_model import OrganizationUserModel +from hyperstack.models.organization_user_response_model import OrganizationUserResponseModel -class TestOrganizationUserModel(unittest.TestCase): - """OrganizationUserModel unit test stubs""" +class TestOrganizationUserResponseModel(unittest.TestCase): + """OrganizationUserResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> OrganizationUserModel: - """Test OrganizationUserModel + def make_instance(self, include_optional) -> OrganizationUserResponseModel: + """Test OrganizationUserResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `OrganizationUserModel` + # uncomment below to create an instance of `OrganizationUserResponseModel` """ - model = OrganizationUserModel() + model = OrganizationUserResponseModel() if include_optional: - return OrganizationUserModel( + return OrganizationUserResponseModel( id = 56, sub = '', email = '', @@ -42,18 +42,19 @@ def make_instance(self, include_optional) -> OrganizationUserModel: name = '', role = '', rbac_roles = [ - hyperstack.models.rbac_role_fieldfor_organization.RBACRoleFieldforOrganization( + hyperstack.models.rbac_role_field.RbacRoleField( name = '', ) ], - joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + joined_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + last_login = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return OrganizationUserModel( + return OrganizationUserResponseModel( ) """ - def testOrganizationUserModel(self): - """Test OrganizationUserModel""" + def testOrganizationUserResponseModel(self): + """Test OrganizationUserResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_profile_api.py b/test/test_profile_api.py index de0d015..982a9c6 100644 --- a/test/test_profile_api.py +++ b/test/test_profile_api.py @@ -29,28 +29,28 @@ def tearDown(self) -> None: def test_create_profile(self) -> None: """Test case for create_profile - Create a profile + Create profile """ pass def test_delete_profile(self) -> None: """Test case for delete_profile - Delete Profile + Delete profile """ pass - def test_get_a_profile_detail(self) -> None: - """Test case for get_a_profile_detail + def test_list_profiles(self) -> None: + """Test case for list_profiles - Get a Profile Detail + List profiles """ pass - def test_get_profile_list(self) -> None: - """Test case for get_profile_list + def test_retrieve_profile_details(self) -> None: + """Test case for retrieve_profile_details - Get Profile List + Retrieve profile details """ pass diff --git a/test/test_rbac_role.py b/test/test_rbac_role_detail_response_model.py similarity index 70% rename from test/test_rbac_role.py rename to test/test_rbac_role_detail_response_model.py index f6b90c8..93835e5 100644 --- a/test/test_rbac_role.py +++ b/test/test_rbac_role_detail_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.rbac_role import RBACRole +from hyperstack.models.rbac_role_detail_response_model import RbacRoleDetailResponseModel -class TestRBACRole(unittest.TestCase): - """RBACRole unit test stubs""" +class TestRbacRoleDetailResponseModel(unittest.TestCase): + """RbacRoleDetailResponseModel unit test stubs""" def setUp(self): pass @@ -25,19 +25,19 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RBACRole: - """Test RBACRole + def make_instance(self, include_optional) -> RbacRoleDetailResponseModel: + """Test RbacRoleDetailResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RBACRole` + # uncomment below to create an instance of `RbacRoleDetailResponseModel` """ - model = RBACRole() + model = RbacRoleDetailResponseModel() if include_optional: - return RBACRole( + return RbacRoleDetailResponseModel( status = True, message = '', - role = hyperstack.models.rbac_role_fields.RBACRoleFields( + role = hyperstack.models.rbac_role_fields.RbacRoleFields( id = 56, name = '', description = '', @@ -56,12 +56,12 @@ def make_instance(self, include_optional) -> RBACRole: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) ) else: - return RBACRole( + return RbacRoleDetailResponseModel( ) """ - def testRBACRole(self): - """Test RBACRole""" + def testRbacRoleDetailResponseModel(self): + """Test RbacRoleDetailResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_api_key_payload.py b/test/test_rbac_role_field.py similarity index 63% rename from test/test_api_key_payload.py rename to test/test_rbac_role_field.py index d62e77e..d4c495c 100644 --- a/test/test_api_key_payload.py +++ b/test/test_rbac_role_field.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.api_key_payload import APIKeyPayload +from hyperstack.models.rbac_role_field import RbacRoleField -class TestAPIKeyPayload(unittest.TestCase): - """APIKeyPayload unit test stubs""" +class TestRbacRoleField(unittest.TestCase): + """RbacRoleField unit test stubs""" def setUp(self): pass @@ -25,25 +25,25 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> APIKeyPayload: - """Test APIKeyPayload + def make_instance(self, include_optional) -> RbacRoleField: + """Test RbacRoleField include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `APIKeyPayload` + # uncomment below to create an instance of `RbacRoleField` """ - model = APIKeyPayload() + model = RbacRoleField() if include_optional: - return APIKeyPayload( - api_key = '' + return RbacRoleField( + name = '' ) else: - return APIKeyPayload( + return RbacRoleField( ) """ - def testAPIKeyPayload(self): - """Test APIKeyPayload""" + def testRbacRoleField(self): + """Test RbacRoleField""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_rbac_role_fields.py b/test/test_rbac_role_fields.py index 0f025fa..ea2ae78 100644 --- a/test/test_rbac_role_fields.py +++ b/test/test_rbac_role_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.rbac_role_fields import RBACRoleFields +from hyperstack.models.rbac_role_fields import RbacRoleFields -class TestRBACRoleFields(unittest.TestCase): - """RBACRoleFields unit test stubs""" +class TestRbacRoleFields(unittest.TestCase): + """RbacRoleFields unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RBACRoleFields: - """Test RBACRoleFields + def make_instance(self, include_optional) -> RbacRoleFields: + """Test RbacRoleFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RBACRoleFields` + # uncomment below to create an instance of `RbacRoleFields` """ - model = RBACRoleFields() + model = RbacRoleFields() if include_optional: - return RBACRoleFields( + return RbacRoleFields( id = 56, name = '', description = '', @@ -53,12 +53,12 @@ def make_instance(self, include_optional) -> RBACRoleFields: created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: - return RBACRoleFields( + return RbacRoleFields( ) """ - def testRBACRoleFields(self): - """Test RBACRoleFields""" + def testRbacRoleFields(self): + """Test RbacRoleFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_refresh_token.py b/test/test_refresh_token_payload.py similarity index 69% rename from test/test_refresh_token.py rename to test/test_refresh_token_payload.py index a4734dd..caf7553 100644 --- a/test/test_refresh_token.py +++ b/test/test_refresh_token_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.refresh_token import RefreshToken +from hyperstack.models.refresh_token_payload import RefreshTokenPayload -class TestRefreshToken(unittest.TestCase): - """RefreshToken unit test stubs""" +class TestRefreshTokenPayload(unittest.TestCase): + """RefreshTokenPayload unit test stubs""" def setUp(self): pass @@ -25,28 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RefreshToken: - """Test RefreshToken + def make_instance(self, include_optional) -> RefreshTokenPayload: + """Test RefreshTokenPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RefreshToken` + # uncomment below to create an instance of `RefreshTokenPayload` """ - model = RefreshToken() + model = RefreshTokenPayload() if include_optional: - return RefreshToken( + return RefreshTokenPayload( id_token = '', refresh_token = '' ) else: - return RefreshToken( + return RefreshTokenPayload( id_token = '', refresh_token = '', ) """ - def testRefreshToken(self): - """Test RefreshToken""" + def testRefreshTokenPayload(self): + """Test RefreshTokenPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_region_api.py b/test/test_region_api.py index 3c6d110..35fe515 100644 --- a/test/test_region_api.py +++ b/test/test_region_api.py @@ -26,10 +26,10 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_getting_regions(self) -> None: - """Test case for getting_regions + def test_list_regions(self) -> None: + """Test case for list_regions - Getting regions + List regions """ pass diff --git a/test/test_remove_member_from_organization_response_model.py b/test/test_remove_member_from_organization_response_model.py new file mode 100644 index 0000000..036ce5a --- /dev/null +++ b/test/test_remove_member_from_organization_response_model.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.remove_member_from_organization_response_model import RemoveMemberFromOrganizationResponseModel + +class TestRemoveMemberFromOrganizationResponseModel(unittest.TestCase): + """RemoveMemberFromOrganizationResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RemoveMemberFromOrganizationResponseModel: + """Test RemoveMemberFromOrganizationResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RemoveMemberFromOrganizationResponseModel` + """ + model = RemoveMemberFromOrganizationResponseModel() + if include_optional: + return RemoveMemberFromOrganizationResponseModel( + status = True, + message = '' + ) + else: + return RemoveMemberFromOrganizationResponseModel( + ) + """ + + def testRemoveMemberFromOrganizationResponseModel(self): + """Test RemoveMemberFromOrganizationResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_remove_member_response.py b/test/test_remove_member_payload.py similarity index 62% rename from test/test_remove_member_response.py rename to test/test_remove_member_payload.py index f3c776b..4869571 100644 --- a/test/test_remove_member_response.py +++ b/test/test_remove_member_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.remove_member_response import RemoveMemberResponse +from hyperstack.models.remove_member_payload import RemoveMemberPayload -class TestRemoveMemberResponse(unittest.TestCase): - """RemoveMemberResponse unit test stubs""" +class TestRemoveMemberPayload(unittest.TestCase): + """RemoveMemberPayload unit test stubs""" def setUp(self): pass @@ -25,26 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RemoveMemberResponse: - """Test RemoveMemberResponse + def make_instance(self, include_optional) -> RemoveMemberPayload: + """Test RemoveMemberPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RemoveMemberResponse` + # uncomment below to create an instance of `RemoveMemberPayload` """ - model = RemoveMemberResponse() + model = RemoveMemberPayload() if include_optional: - return RemoveMemberResponse( - status = True, - message = '' + return RemoveMemberPayload( + email = '' ) else: - return RemoveMemberResponse( + return RemoveMemberPayload( + email = '', ) """ - def testRemoveMemberResponse(self): - """Test RemoveMemberResponse""" + def testRemoveMemberPayload(self): + """Test RemoveMemberPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_resource_payload.py b/test/test_resource_payload.py index 29eef48..142d961 100644 --- a/test/test_resource_payload.py +++ b/test/test_resource_payload.py @@ -36,12 +36,15 @@ def make_instance(self, include_optional) -> ResourcePayload: if include_optional: return ResourcePayload( resource_id = 56, - discount_percent = 1.337 + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56 ) else: return ResourcePayload( resource_id = 56, - discount_percent = 1.337, + discount_type = '', ) """ diff --git a/test/test_security_rules_api.py b/test/test_security_rules_api.py index 0ef522a..d0dd25d 100644 --- a/test/test_security_rules_api.py +++ b/test/test_security_rules_api.py @@ -26,10 +26,10 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_retrieve_security_rule_protocols(self) -> None: - """Test case for retrieve_security_rule_protocols + def test_list_firewall_rule_protocols(self) -> None: + """Test case for list_firewall_rule_protocols - Retrieve Security Rule Protocols + List firewall rule protocols """ pass diff --git a/test/test_set_defaults_payload.py b/test/test_set_defaults_payload.py new file mode 100644 index 0000000..6a357f7 --- /dev/null +++ b/test/test_set_defaults_payload.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.set_defaults_payload import SetDefaultsPayload + +class TestSetDefaultsPayload(unittest.TestCase): + """SetDefaultsPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetDefaultsPayload: + """Test SetDefaultsPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetDefaultsPayload` + """ + model = SetDefaultsPayload() + if include_optional: + return SetDefaultsPayload( + flavors = [ + 56 + ], + images = [ + 56 + ] + ) + else: + return SetDefaultsPayload( + flavors = [ + 56 + ], + images = [ + 56 + ], + ) + """ + + def testSetDefaultsPayload(self): + """Test SetDefaultsPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stock_api.py b/test/test_stock_api.py index 493daa3..e52db77 100644 --- a/test/test_stock_api.py +++ b/test/test_stock_api.py @@ -26,8 +26,8 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_retrieve_stocks(self) -> None: - """Test case for retrieve_stocks + def test_retrieve_gpu_stocks(self) -> None: + """Test case for retrieve_gpu_stocks """ pass diff --git a/test/test_stock_visibility_user_payload.py b/test/test_stock_visibility_user_payload.py index bdf1265..9344c8e 100644 --- a/test/test_stock_visibility_user_payload.py +++ b/test/test_stock_visibility_user_payload.py @@ -41,6 +41,9 @@ def make_instance(self, include_optional) -> StockVisibilityUserPayload: ) else: return StockVisibilityUserPayload( + user_ids = [ + 56 + ], ) """ diff --git a/test/test_template_api.py b/test/test_template_api.py index 629b721..7eaa1f7 100644 --- a/test/test_template_api.py +++ b/test/test_template_api.py @@ -29,35 +29,35 @@ def tearDown(self) -> None: def test_create_template(self) -> None: """Test case for create_template - Create Template + Create template """ pass - def test_delete_a_template(self) -> None: - """Test case for delete_a_template + def test_delete_template(self) -> None: + """Test case for delete_template - Delete a Template + Delete template """ pass - def test_details_of_a_template_by_id(self) -> None: - """Test case for details_of_a_template_by_id + def test_list_templates(self) -> None: + """Test case for list_templates - Details of a Template by ID + List templates """ pass - def test_list_templates(self) -> None: - """Test case for list_templates + def test_retrieve_template_details(self) -> None: + """Test case for retrieve_template_details - List Templates + Retrieve template details """ pass def test_update_template(self) -> None: """Test case for update_template - Update Template + Update template """ pass diff --git a/test/test_update_contract_payload.py b/test/test_update_contract_payload.py new file mode 100644 index 0000000..767a1dc --- /dev/null +++ b/test/test_update_contract_payload.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.update_contract_payload import UpdateContractPayload + +class TestUpdateContractPayload(unittest.TestCase): + """UpdateContractPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateContractPayload: + """Test UpdateContractPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateContractPayload` + """ + model = UpdateContractPayload() + if include_optional: + return UpdateContractPayload( + description = '', + discount_resources = [ + hyperstack.models.resource_payload.ResourcePayload( + resource_id = 56, + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) + ], + start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + expiration_policy = 56 + ) + else: + return UpdateContractPayload( + discount_resources = [ + hyperstack.models.resource_payload.ResourcePayload( + resource_id = 56, + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) + ], + expiration_policy = 56, + ) + """ + + def testUpdateContractPayload(self): + """Test UpdateContractPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_discounts_payload.py b/test/test_update_discounts_payload.py index 5f537f0..b88b62b 100644 --- a/test/test_update_discounts_payload.py +++ b/test/test_update_discounts_payload.py @@ -38,7 +38,10 @@ def make_instance(self, include_optional) -> UpdateDiscountsPayload: discount_resources = [ hyperstack.models.resource_payload.ResourcePayload( resource_id = 56, - discount_percent = 1.337, ) + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) ], start_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), end_date = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), @@ -49,7 +52,10 @@ def make_instance(self, include_optional) -> UpdateDiscountsPayload: discount_resources = [ hyperstack.models.resource_payload.ResourcePayload( resource_id = 56, - discount_percent = 1.337, ) + discount_percent = 1.337, + discount_type = '', + discount_amount = 1.337, + resource_count = 56, ) ], discount_status = '', ) diff --git a/test/test_update_gpu.py b/test/test_update_gpu.py index 79923e6..6ae1930 100644 --- a/test/test_update_gpu.py +++ b/test/test_update_gpu.py @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> UpdateGPU: regions = [ '' ], - example_metadata = '' + example_metadata = '{"key": "value"}' ) else: return UpdateGPU( diff --git a/test/test_rbac_role_fieldfor_organization.py b/test/test_update_organization_payload.py similarity index 57% rename from test/test_rbac_role_fieldfor_organization.py rename to test/test_update_organization_payload.py index 190e187..56cf540 100644 --- a/test/test_rbac_role_fieldfor_organization.py +++ b/test/test_update_organization_payload.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.rbac_role_fieldfor_organization import RBACRoleFieldforOrganization +from hyperstack.models.update_organization_payload import UpdateOrganizationPayload -class TestRBACRoleFieldforOrganization(unittest.TestCase): - """RBACRoleFieldforOrganization unit test stubs""" +class TestUpdateOrganizationPayload(unittest.TestCase): + """UpdateOrganizationPayload unit test stubs""" def setUp(self): pass @@ -25,25 +25,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> RBACRoleFieldforOrganization: - """Test RBACRoleFieldforOrganization + def make_instance(self, include_optional) -> UpdateOrganizationPayload: + """Test UpdateOrganizationPayload include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `RBACRoleFieldforOrganization` + # uncomment below to create an instance of `UpdateOrganizationPayload` """ - model = RBACRoleFieldforOrganization() + model = UpdateOrganizationPayload() if include_optional: - return RBACRoleFieldforOrganization( + return UpdateOrganizationPayload( name = '' ) else: - return RBACRoleFieldforOrganization( + return UpdateOrganizationPayload( + name = '', ) """ - def testRBACRoleFieldforOrganization(self): - """Test RBACRoleFieldforOrganization""" + def testUpdateOrganizationPayload(self): + """Test UpdateOrganizationPayload""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_update_organization_response_model.py b/test/test_update_organization_response_model.py new file mode 100644 index 0000000..15defa1 --- /dev/null +++ b/test/test_update_organization_response_model.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.update_organization_response_model import UpdateOrganizationResponseModel + +class TestUpdateOrganizationResponseModel(unittest.TestCase): + """UpdateOrganizationResponseModel unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateOrganizationResponseModel: + """Test UpdateOrganizationResponseModel + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateOrganizationResponseModel` + """ + model = UpdateOrganizationResponseModel() + if include_optional: + return UpdateOrganizationResponseModel( + status = True, + message = '' + ) + else: + return UpdateOrganizationResponseModel( + ) + """ + + def testUpdateOrganizationResponseModel(self): + """Test UpdateOrganizationResponseModel""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_api.py b/test/test_user_api.py new file mode 100644 index 0000000..f043f69 --- /dev/null +++ b/test/test_user_api.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.api.user_api import UserApi + + +class TestUserApi(unittest.TestCase): + """UserApi unit test stubs""" + + def setUp(self) -> None: + self.api = UserApi() + + def tearDown(self) -> None: + pass + + def test_get_user(self) -> None: + """Test case for get_user + + GET: Fetch User Info + """ + pass + + def test_post_user(self) -> None: + """Test case for post_user + + POST: Insert user info + """ + pass + + def test_update_user_info(self) -> None: + """Test case for update_user_info + + PUT: Update user info + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_permission_fieldsfor_user_permission.py b/test/test_user_default_choice_for_admin_fields.py similarity index 53% rename from test/test_permission_fieldsfor_user_permission.py rename to test/test_user_default_choice_for_admin_fields.py index b970dd2..9f58633 100644 --- a/test/test_permission_fieldsfor_user_permission.py +++ b/test/test_user_default_choice_for_admin_fields.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.permission_fieldsfor_user_permission import PermissionFieldsforUserPermission +from hyperstack.models.user_default_choice_for_admin_fields import UserDefaultChoiceForAdminFields -class TestPermissionFieldsforUserPermission(unittest.TestCase): - """PermissionFieldsforUserPermission unit test stubs""" +class TestUserDefaultChoiceForAdminFields(unittest.TestCase): + """UserDefaultChoiceForAdminFields unit test stubs""" def setUp(self): pass @@ -25,27 +25,28 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> PermissionFieldsforUserPermission: - """Test PermissionFieldsforUserPermission + def make_instance(self, include_optional) -> UserDefaultChoiceForAdminFields: + """Test UserDefaultChoiceForAdminFields include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `PermissionFieldsforUserPermission` + # uncomment below to create an instance of `UserDefaultChoiceForAdminFields` """ - model = PermissionFieldsforUserPermission() + model = UserDefaultChoiceForAdminFields() if include_optional: - return PermissionFieldsforUserPermission( + return UserDefaultChoiceForAdminFields( id = 56, - resource = '', - permission = '' + region_name = '', + flavor_id = 56, + image_id = 56 ) else: - return PermissionFieldsforUserPermission( + return UserDefaultChoiceForAdminFields( ) """ - def testPermissionFieldsforUserPermission(self): - """Test PermissionFieldsforUserPermission""" + def testUserDefaultChoiceForAdminFields(self): + """Test UserDefaultChoiceForAdminFields""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_user_default_choice_for_user_fields.py b/test/test_user_default_choice_for_user_fields.py new file mode 100644 index 0000000..e4a96ae --- /dev/null +++ b/test/test_user_default_choice_for_user_fields.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.user_default_choice_for_user_fields import UserDefaultChoiceForUserFields + +class TestUserDefaultChoiceForUserFields(unittest.TestCase): + """UserDefaultChoiceForUserFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserDefaultChoiceForUserFields: + """Test UserDefaultChoiceForUserFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDefaultChoiceForUserFields` + """ + model = UserDefaultChoiceForUserFields() + if include_optional: + return UserDefaultChoiceForUserFields( + region_id = 56, + environment_id = 56, + keypair_id = 56, + flavor_id = 56, + image_id = 56 + ) + else: + return UserDefaultChoiceForUserFields( + ) + """ + + def testUserDefaultChoiceForUserFields(self): + """Test UserDefaultChoiceForUserFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_default_choices_for_admin_response.py b/test/test_user_default_choices_for_admin_response.py new file mode 100644 index 0000000..9a58538 --- /dev/null +++ b/test/test_user_default_choices_for_admin_response.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.user_default_choices_for_admin_response import UserDefaultChoicesForAdminResponse + +class TestUserDefaultChoicesForAdminResponse(unittest.TestCase): + """UserDefaultChoicesForAdminResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserDefaultChoicesForAdminResponse: + """Test UserDefaultChoicesForAdminResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDefaultChoicesForAdminResponse` + """ + model = UserDefaultChoicesForAdminResponse() + if include_optional: + return UserDefaultChoicesForAdminResponse( + status = True, + message = '', + user_default_choices = [ + hyperstack.models.user_default_choice_for_admin_fields.UserDefaultChoiceForAdminFields( + id = 56, + region_name = '', + flavor_id = 56, + image_id = 56, ) + ] + ) + else: + return UserDefaultChoicesForAdminResponse( + ) + """ + + def testUserDefaultChoicesForAdminResponse(self): + """Test UserDefaultChoicesForAdminResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_default_choices_for_user_response.py b/test/test_user_default_choices_for_user_response.py new file mode 100644 index 0000000..3993011 --- /dev/null +++ b/test/test_user_default_choices_for_user_response.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse + +class TestUserDefaultChoicesForUserResponse(unittest.TestCase): + """UserDefaultChoicesForUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserDefaultChoicesForUserResponse: + """Test UserDefaultChoicesForUserResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserDefaultChoicesForUserResponse` + """ + model = UserDefaultChoicesForUserResponse() + if include_optional: + return UserDefaultChoicesForUserResponse( + status = True, + message = '', + user_default_choices = [ + hyperstack.models.user_default_choice_for_user_fields.UserDefaultChoiceForUserFields( + region_id = 56, + environment_id = 56, + keypair_id = 56, + flavor_id = 56, + image_id = 56, ) + ] + ) + else: + return UserDefaultChoicesForUserResponse( + ) + """ + + def testUserDefaultChoicesForUserResponse(self): + """Test UserDefaultChoicesForUserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_detail_choice_api.py b/test/test_user_detail_choice_api.py new file mode 100644 index 0000000..3b174d6 --- /dev/null +++ b/test/test_user_detail_choice_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.api.user_detail_choice_api import UserDetailChoiceApi + + +class TestUserDetailChoiceApi(unittest.TestCase): + """UserDetailChoiceApi unit test stubs""" + + def setUp(self) -> None: + self.api = UserDetailChoiceApi() + + def tearDown(self) -> None: + pass + + def test_retrieve_default_flavors_and_images_for_user(self) -> None: + """Test case for retrieve_default_flavors_and_images_for_user + + Retrieve default flavors and images for user + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_permission_fields.py b/test/test_user_permission_fields.py new file mode 100644 index 0000000..442b75e --- /dev/null +++ b/test/test_user_permission_fields.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.user_permission_fields import UserPermissionFields + +class TestUserPermissionFields(unittest.TestCase): + """UserPermissionFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserPermissionFields: + """Test UserPermissionFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserPermissionFields` + """ + model = UserPermissionFields() + if include_optional: + return UserPermissionFields( + id = 56, + resource = '', + permission = '' + ) + else: + return UserPermissionFields( + ) + """ + + def testUserPermissionFields(self): + """Test UserPermissionFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_transfer_payload.py b/test/test_user_transfer_payload.py new file mode 100644 index 0000000..9926070 --- /dev/null +++ b/test/test_user_transfer_payload.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.user_transfer_payload import UserTransferPayload + +class TestUserTransferPayload(unittest.TestCase): + """UserTransferPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserTransferPayload: + """Test UserTransferPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserTransferPayload` + """ + model = UserTransferPayload() + if include_optional: + return UserTransferPayload( + org_id = 56, + role = '' + ) + else: + return UserTransferPayload( + org_id = 56, + role = '', + ) + """ + + def testUserTransferPayload(self): + """Test UserTransferPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_userinfopostpayload.py b/test/test_userinfopostpayload.py new file mode 100644 index 0000000..632d37b --- /dev/null +++ b/test/test_userinfopostpayload.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.userinfopostpayload import Userinfopostpayload + +class TestUserinfopostpayload(unittest.TestCase): + """Userinfopostpayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Userinfopostpayload: + """Test Userinfopostpayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Userinfopostpayload` + """ + model = Userinfopostpayload() + if include_optional: + return Userinfopostpayload( + business = True, + name = '', + email = '', + company_name = '', + vat_number = '', + phone = '', + billing_address1 = '', + billing_address2 = '', + zip_code = '', + country = '', + state = '' + ) + else: + return Userinfopostpayload( + business = True, + zip_code = '', + country = '', + ) + """ + + def testUserinfopostpayload(self): + """Test Userinfopostpayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_users_info_fields.py b/test/test_users_info_fields.py new file mode 100644 index 0000000..fc04c3a --- /dev/null +++ b/test/test_users_info_fields.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.users_info_fields import UsersInfoFields + +class TestUsersInfoFields(unittest.TestCase): + """UsersInfoFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UsersInfoFields: + """Test UsersInfoFields + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UsersInfoFields` + """ + model = UsersInfoFields() + if include_optional: + return UsersInfoFields( + id = 56, + organization_id = 56, + name = '', + email = '', + business = True, + company_name = '', + vat_number = '', + phone = '', + billing_address1 = '', + billing_address2 = '', + zip_code = '', + country = '', + state = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return UsersInfoFields( + ) + """ + + def testUsersInfoFields(self): + """Test UsersInfoFields""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_users_info_list_response.py b/test/test_users_info_list_response.py new file mode 100644 index 0000000..59f7e56 --- /dev/null +++ b/test/test_users_info_list_response.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.users_info_list_response import UsersInfoListResponse + +class TestUsersInfoListResponse(unittest.TestCase): + """UsersInfoListResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UsersInfoListResponse: + """Test UsersInfoListResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UsersInfoListResponse` + """ + model = UsersInfoListResponse() + if include_optional: + return UsersInfoListResponse( + status = True, + message = '', + users_info = hyperstack.models.users_info_fields.UsersInfoFields( + id = 56, + organization_id = 56, + name = '', + email = '', + business = True, + company_name = '', + vat_number = '', + phone = '', + billing_address1 = '', + billing_address2 = '', + zip_code = '', + country = '', + state = '', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ) + else: + return UsersInfoListResponse( + ) + """ + + def testUsersInfoListResponse(self): + """Test UsersInfoListResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_verify_api_key_payload.py b/test/test_verify_api_key_payload.py new file mode 100644 index 0000000..491a64a --- /dev/null +++ b/test/test_verify_api_key_payload.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Infrahub-API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from hyperstack.models.verify_api_key_payload import VerifyApiKeyPayload + +class TestVerifyApiKeyPayload(unittest.TestCase): + """VerifyApiKeyPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VerifyApiKeyPayload: + """Test VerifyApiKeyPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VerifyApiKeyPayload` + """ + model = VerifyApiKeyPayload() + if include_optional: + return VerifyApiKeyPayload( + api_key = '' + ) + else: + return VerifyApiKeyPayload( + ) + """ + + def testVerifyApiKeyPayload(self): + """Test VerifyApiKeyPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_key_verify_response.py b/test/test_verify_api_key_response_model.py similarity index 65% rename from test/test_api_key_verify_response.py rename to test/test_verify_api_key_response_model.py index 0e2258a..df4126b 100644 --- a/test/test_api_key_verify_response.py +++ b/test/test_verify_api_key_response_model.py @@ -14,10 +14,10 @@ import unittest -from hyperstack.models.api_key_verify_response import ApiKeyVerifyResponse +from hyperstack.models.verify_api_key_response_model import VerifyApiKeyResponseModel -class TestApiKeyVerifyResponse(unittest.TestCase): - """ApiKeyVerifyResponse unit test stubs""" +class TestVerifyApiKeyResponseModel(unittest.TestCase): + """VerifyApiKeyResponseModel unit test stubs""" def setUp(self): pass @@ -25,16 +25,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ApiKeyVerifyResponse: - """Test ApiKeyVerifyResponse + def make_instance(self, include_optional) -> VerifyApiKeyResponseModel: + """Test VerifyApiKeyResponseModel include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `ApiKeyVerifyResponse` + # uncomment below to create an instance of `VerifyApiKeyResponseModel` """ - model = ApiKeyVerifyResponse() + model = VerifyApiKeyResponseModel() if include_optional: - return ApiKeyVerifyResponse( + return VerifyApiKeyResponseModel( status = True, message = '', api_key = hyperstack.models.api_key_verify_fields.ApiKeyVerifyFields( @@ -44,12 +44,12 @@ def make_instance(self, include_optional) -> ApiKeyVerifyResponse: sub = '', ) ) else: - return ApiKeyVerifyResponse( + return VerifyApiKeyResponseModel( ) """ - def testApiKeyVerifyResponse(self): - """Test ApiKeyVerifyResponse""" + def testVerifyApiKeyResponseModel(self): + """Test VerifyApiKeyResponseModel""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_virtual_machine_api.py b/test/test_virtual_machine_api.py index 6ecf019..a438ef0 100644 --- a/test/test_virtual_machine_api.py +++ b/test/test_virtual_machine_api.py @@ -26,94 +26,115 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_add_security_rule(self) -> None: - """Test case for add_security_rule + def test_add_firewall_rule_to_virtual_machine(self) -> None: + """Test case for add_firewall_rule_to_virtual_machine - Add Security Rule + Add firewall rule to virtual machine """ pass - def test_create_instances(self) -> None: - """Test case for create_instances + def test_attach_firewalls_to_a_vm(self) -> None: + """Test case for attach_firewalls_to_a_vm - Create Instances + Attach Firewalls to a VM """ pass - def test_delete_a_security_rule(self) -> None: - """Test case for delete_a_security_rule + def test_create_virtual_machine(self) -> None: + """Test case for create_virtual_machine - Delete a security group rule + Create virtual machine """ pass - def test_delete_an_instance(self) -> None: - """Test case for delete_an_instance + def test_delete_firewall_rule_from_virtual_machine(self) -> None: + """Test case for delete_firewall_rule_from_virtual_machine - Delete an instance + Delete firewall rule from virtual machine """ pass - def test_get_an_instance_details(self) -> None: - """Test case for get_an_instance_details + def test_delete_virtual_machine(self) -> None: + """Test case for delete_virtual_machine - Get an instance details + Delete virtual machine """ pass - def test_hard_reboot_instance(self) -> None: - """Test case for hard_reboot_instance + def test_edit_labels_of_an_existing_vm(self) -> None: + """Test case for edit_labels_of_an_existing_vm - Hard Reboot Instance + Edit labels of an existing VM """ pass - def test_hibernate_instance(self) -> None: - """Test case for hibernate_instance + def test_hard_reboot_virtual_machine(self) -> None: + """Test case for hard_reboot_virtual_machine - Hibernate Instance + Hard reboot virtual machine """ pass - def test_list_instances(self) -> None: - """Test case for list_instances + def test_hibernate_virtual_machine(self) -> None: + """Test case for hibernate_virtual_machine - List Instances + Hibernate virtual machine + """ + pass + + def test_list_virtual_machines(self) -> None: + """Test case for list_virtual_machines + + List all virtual machines """ pass def test_resize_virtual_machine(self) -> None: """Test case for resize_virtual_machine - Resize Virtual Machine + Resize virtual machine + """ + pass + + def test_restore_virtual_machine_from_hibernation(self) -> None: + """Test case for restore_virtual_machine_from_hibernation + + Restore virtual machine from hibernation + """ + pass + + def test_retrieve_virtual_machine_details(self) -> None: + """Test case for retrieve_virtual_machine_details + + Retrieve virtual machine details """ pass - def test_restore_instance_from_hibernation(self) -> None: - """Test case for restore_instance_from_hibernation + def test_retrieve_virtual_machine_performance_metrics(self) -> None: + """Test case for retrieve_virtual_machine_performance_metrics - Restore Instance from Hibernation + Retrieve virtual machine performance metrics """ pass - def test_retrieved_metrics_successfully(self) -> None: - """Test case for retrieved_metrics_successfully + def test_retrieve_virtual_machines_associated_with_a_contract(self) -> None: + """Test case for retrieve_virtual_machines_associated_with_a_contract - Get instance metrics + Retrieve virtual machines associated with a contract """ pass - def test_start_instance(self) -> None: - """Test case for start_instance + def test_start_virtual_machine(self) -> None: + """Test case for start_virtual_machine - Start Instance + Start virtual machine """ pass - def test_stop_instance(self) -> None: - """Test case for stop_instance + def test_stop_virtual_machine(self) -> None: + """Test case for stop_virtual_machine - Stop Instance + Stop virtual machine """ pass diff --git a/test/test_virtual_machine_events_api.py b/test/test_virtual_machine_events_api.py index 259ee25..479b168 100644 --- a/test/test_virtual_machine_events_api.py +++ b/test/test_virtual_machine_events_api.py @@ -26,10 +26,10 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_fetch_all_of_the_instance_events(self) -> None: - """Test case for fetch_all_of_the_instance_events + def test_list_virtual_machine_events(self) -> None: + """Test case for list_virtual_machine_events - Fetch all of the instance events + List virtual machine events """ pass diff --git a/test/test_volume_api.py b/test/test_volume_api.py index 7787b3f..afc2a78 100644 --- a/test/test_volume_api.py +++ b/test/test_volume_api.py @@ -29,28 +29,28 @@ def tearDown(self) -> None: def test_create_volume(self) -> None: """Test case for create_volume - Create Volume + Create volume """ pass def test_delete_volume(self) -> None: """Test case for delete_volume - Delete Volume + Delete volume """ pass - def test_get_volume_types(self) -> None: - """Test case for get_volume_types + def test_list_volume_types(self) -> None: + """Test case for list_volume_types - GET Volume Types + List volume types """ pass def test_list_volumes(self) -> None: """Test case for list_volumes - List Volumes + List volumes """ pass diff --git a/test/test_volume_attachment_api.py b/test/test_volume_attachment_api.py index 96aa203..1ba82f7 100644 --- a/test/test_volume_attachment_api.py +++ b/test/test_volume_attachment_api.py @@ -26,17 +26,17 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_attach_volumes(self) -> None: - """Test case for attach_volumes + def test_attach_volumes_to_virtual_machine(self) -> None: + """Test case for attach_volumes_to_virtual_machine - Attach Volumes + Attach volumes to virtual machine """ pass - def test_detach_volumes(self) -> None: - """Test case for detach_volumes + def test_detach_volumes_from_virtual_machine(self) -> None: + """Test case for detach_volumes_from_virtual_machine - Detach Volumes + Detach volumes from virtual machine """ pass From 62f5981a189d1023f5799a2c728ec31fee4b36b1 Mon Sep 17 00:00:00 2001 From: Grzegorz Szczudlik <2914011+szczad@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:20:34 +0200 Subject: [PATCH 3/3] fix(generator): Fix git repository --- README.md | 4 ++-- config.json | 5 ----- git_push.sh | 4 ++-- openapi/config.yaml | 2 ++ pyproject.toml | 2 +- setup.py | 4 ++-- 6 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 config.json diff --git a/README.md b/README.md index b657ec4..838fc14 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install git+https://github.com/szczad/hyperstack-api-python.git ``` -(you may need to run `pip` with root permission: `sudo 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/szczad/hyperstack-api-python.git`) Then import the package: ```python diff --git a/config.json b/config.json deleted file mode 100644 index dd2ec67..0000000 --- a/config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "packageName": "hyperstack", - "packageVersion": "3.0.1", - "packageUrl": "https://github.com/szczad/hyperstack-api" -} diff --git a/git_push.sh b/git_push.sh index f53a75d..d8d54ef 100644 --- a/git_push.sh +++ b/git_push.sh @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="szczad" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="hyperstack-api-python" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/openapi/config.yaml b/openapi/config.yaml index 9e42c5c..21e9d5c 100644 --- a/openapi/config.yaml +++ b/openapi/config.yaml @@ -1,6 +1,8 @@ generatorName: python inputSpec: /local/openapi/api.json outputDir: /local/ +gitUserId: szczad +gitRepoId: hyperstack-api-python additionalProperties: packageName: hyperstack packageVersion: 1.1.0 diff --git a/pyproject.toml b/pyproject.toml index fafd106..bfc4cb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Infrahub-API" authors = ["OpenAPI Generator Community "] license = "NoLicense" readme = "README.md" -repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +repository = "https://github.com/szczad/hyperstack-api-python" keywords = ["OpenAPI", "OpenAPI-Generator", "Infrahub-API"] include = ["hyperstack/py.typed"] diff --git a/setup.py b/setup.py index f44cbb8..8e2ee16 100644 --- a/setup.py +++ b/setup.py @@ -36,12 +36,12 @@ description="Infrahub-API", author="OpenAPI Generator community", author_email="team@openapitools.org", - url="https://github.com/szczad/hyperstack-api", + url="https://github.com/szczad/hyperstack-api-python", keywords=["OpenAPI", "OpenAPI-Generator", "Infrahub-API"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description_content_type='text/markdown', + long_description_content_type="text/markdown", long_description="""\ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) """, # noqa: E501